diff --git a/l10n/messages.pot b/l10n/messages.pot index ad6eded33..a858a7e9e 100644 --- a/l10n/messages.pot +++ b/l10n/messages.pot @@ -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 "" diff --git a/lib/components/PublicAuthPrompt.vue b/lib/components/PublicAuthPrompt.vue index 7a3beb5bb..8c0c70bba 100644 --- a/lib/components/PublicAuthPrompt.vue +++ b/lib/components/PublicAuthPrompt.vue @@ -17,7 +17,7 @@ @@ -91,7 +91,7 @@ export default defineComponent({ */ notice: { type: String, - default: t('You are currently not identified.'), + default: '', }, /** @@ -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: {