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 ""
154
154
msgid "Upload some content or sync with your devices!"
155
155
msgstr ""
156
156
157
+ msgid "You are currently identified as {nickname}."
158
+ msgstr ""
159
+
157
160
msgid "You are currently not identified."
158
161
msgstr ""
159
162
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export interface PublicAuthPromptProps {
52
52
53
53
const props = withDefaults (defineProps <PublicAuthPromptProps >(), {
54
54
nickname: ' ' ,
55
- notice: t ( ' You are currently not identified. ' ) ,
55
+ notice: ' ' ,
56
56
submitLabel: t (' Submit name' ),
57
57
text: ' ' ,
58
58
title: t (' Guest identification' ),
@@ -104,6 +104,20 @@ const buttons = computed(() => {
104
104
return [submitButton ]
105
105
})
106
106
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
+
107
121
/**
108
122
* Handle saving the nickname and return it.
109
123
*/
@@ -169,7 +183,7 @@ function onSubmit() {
169
183
<!-- Header -->
170
184
<NcNoteCard
171
185
class =" public-auth-prompt__header"
172
- :text =" notice "
186
+ :text =" defaultNotice "
173
187
type =" info" />
174
188
175
189
<!-- Form -->
You can’t perform that action at this time.
0 commit comments