Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions l10n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ msgstr ""
msgid "Upload some content or sync with your devices!"
msgstr ""

msgid "You are currently identified as {nickname}."
msgstr ""

msgid "You are currently not identified."
msgstr ""

Expand Down
17 changes: 15 additions & 2 deletions lib/components/PublicAuthPrompt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- Header -->
<NcNoteCard class="public-auth-prompt__header"
:text="notice"
:text="defaultNotice"
type="info" />

<!-- Form -->
Expand Down Expand Up @@ -91,7 +91,7 @@ export default defineComponent({
*/
notice: {
type: String,
default: t('You are currently not identified.'),
default: '',
},

/**
Expand Down Expand Up @@ -148,6 +148,19 @@ export default defineComponent({

return [submitButton]
},

defaultNotice() {
if (this.notice) {
return this.notice
}

// If no notice is provided, use a default one
// that changes based on the nickname definition
if (this.nickname) {
return t('You are currently identified as {nickname}.', { nickname: this.nickname })
}
return t('You are currently not identified.')
},
},

watch: {
Expand Down