switch cancel text

This commit is contained in:
Michael Genson
2026-03-28 16:28:57 +00:00
parent 5f28a60d61
commit 21db1b66ef
3 changed files with 19 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
v-model="dialog"
:title="$t('announcements.announcements')"
:icon="$globals.icons.bullhornVariant"
:cancel-text="$t('general.done')"
width="100%"
max-width="1200"
>
@@ -44,7 +45,7 @@ watch(
async function setLastRead(key: string) {
const user = auth.user.value!;
if (user.lastReadAnnouncement && key < user.lastReadAnnouncement) {
if (user.lastReadAnnouncement && key <= user.lastReadAnnouncement) {
// Don't update the last read announcement if it's older than the current one
return;
}

View File

@@ -51,7 +51,7 @@
emit('cancel');
"
>
{{ $t("general.cancel") }}
{{ cancelText }}
</v-btn>
<v-spacer />
@@ -116,10 +116,16 @@ interface DialogProps {
maxWidth?: number | string | null;
loading?: boolean;
top?: boolean | null;
keepOpen?: boolean;
// submit
submitIcon?: string | null;
submitText?: string;
submitDisabled?: boolean;
keepOpen?: boolean;
// cancel
cancelText?: string;
// actions
canDelete?: boolean;
canConfirm?: boolean;
@@ -141,10 +147,17 @@ const props = withDefaults(defineProps<DialogProps>(), {
maxWidth: null,
loading: false,
top: null,
keepOpen: false,
// submit
submitIcon: null,
submitText: () => useNuxtApp().$i18n.t("general.create"),
submitDisabled: false,
keepOpen: false,
// cancel
cancelText: () => useNuxtApp().$i18n.t("general.cancel"),
// actions
canDelete: false,
canConfirm: false,
canSubmit: false,

View File

@@ -98,6 +98,7 @@
"dashboard": "Dashboard",
"delete": "Delete",
"disabled": "Disabled",
"done": "Done",
"download": "Download",
"duplicate": "Duplicate",
"edit": "Edit",