Skip to content

Conversation

@skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Sep 15, 2021

image

Fix #6

Signed-off-by: John Molakvoæ <[email protected]>
@skjnldsv skjnldsv changed the title Add share link entry Add limit message on public page Sep 15, 2021
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 merged commit c39bbee into feat/front-menu-entry Sep 15, 2021
@delete-merged-branch delete-merged-branch bot deleted the feat/public branch September 15, 2021 15:29
import { translatePlural as n } from '@nextcloud/l10n'

const { limit, downloads } = loadState(appName, 'download_limit', { limit: -1, downloads: 0 })
console.debug('[DEBUG]', appName, { limit, downloads })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use @nextcloud/logger here instead as a followup?

const span = document.createElement('span')

span.style = 'color: var(--color-primary-text); padding: 0 10px;'
span.innerText = n('files_downloadlimit', '1 more download allowed', '{count} more downloads allowed', count, { count })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely workable, I would suggest 1 remaining download allowed for singular and {count} remaining downloads allowed for the plural version :)

@Pytal Pytal linked an issue Sep 15, 2021 that may be closed by this pull request
This was referenced Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add limit message on public page

4 participants