File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,9 @@ msgstr ""
154154msgid "Upload some content or sync with your devices!"
155155msgstr ""
156156
157+ msgid "You are currently identified as {nickname}."
158+ msgstr ""
159+
157160msgid "You are currently not identified."
158161msgstr ""
159162
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export interface PublicAuthPromptProps {
5252
5353const props = withDefaults (defineProps <PublicAuthPromptProps >(), {
5454 nickname: ' ' ,
55- notice: t ( ' You are currently not identified. ' ) ,
55+ notice: ' ' ,
5656 submitLabel: t (' Submit name' ),
5757 text: ' ' ,
5858 title: t (' Guest identification' ),
@@ -104,6 +104,20 @@ const buttons = computed(() => {
104104 return [submitButton ]
105105})
106106
107+ const defaultNotice = computed (() => {
108+ if (props .notice ) {
109+ return props .notice
110+ }
111+
112+ // If no notice is provided, use a default one
113+ // that changes based on the nickname definition
114+ if (name .value ) {
115+ return t (' You are currently identified as {nickname}.' , { nickname: name .value })
116+ }
117+
118+ return t (' You are currently not identified.' )
119+ })
120+
107121/**
108122 * Handle saving the nickname and return it.
109123 */
@@ -169,7 +183,7 @@ function onSubmit() {
169183 <!-- Header -->
170184 <NcNoteCard
171185 class =" public-auth-prompt__header"
172- :text =" notice "
186+ :text =" defaultNotice "
173187 type =" info" />
174188
175189 <!-- Form -->
You can’t perform that action at this time.
0 commit comments