From b6ff3a837477d2ff3c0e77baf752f917f87414f8 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Tue, 10 Jun 2025 18:14:03 +0200 Subject: [PATCH] fix(PublicAuthPrompt): change default notice if identified Signed-off-by: skjnldsv --- l10n/messages.pot | 3 +++ lib/components/PublicAuthPrompt.vue | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) 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: {