From de93d68c5460918c19c3022a25dc7d3fa38db008 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:18:51 +0900 Subject: [PATCH] fix --- packages/frontend/src/components/MkDrive.vue | 5 ++--- packages/frontend/src/scripts/select-file.ts | 11 +++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue index fe44c33c6b..8b5dcad887 100644 --- a/packages/frontend/src/components/MkDrive.vue +++ b/packages/frontend/src/components/MkDrive.vue @@ -635,12 +635,11 @@ function getMenu() { type: 'switch', text: i18n.ts.keepOriginalUploading, ref: keepOriginal, - }, ...($i?.policies.canUseWatermark ? [{ + }, { type: 'switch', text: i18n.ts.useWatermark, ref: useWatermark, - }] as MenuItem[] : [] - ), { type: 'divider' }, { + }, { type: 'divider' }, { text: i18n.ts.addFile, type: 'label', }, { diff --git a/packages/frontend/src/scripts/select-file.ts b/packages/frontend/src/scripts/select-file.ts index d0d874d428..667226ed68 100644 --- a/packages/frontend/src/scripts/select-file.ts +++ b/packages/frontend/src/scripts/select-file.ts @@ -94,12 +94,11 @@ function select(src: HTMLElement | EventTarget | null, label: string | null, mul type: 'switch', text: i18n.ts.keepOriginalUploading, ref: keepOriginal, - }, ...($i?.policies.canUseWatermark ? [{ - type: 'switch', - text: i18n.ts.useWatermark, - ref: useWatermark, - }] as MenuItem[] : [] - ), { + }, { + type: 'switch', + text: i18n.ts.useWatermark, + ref: useWatermark, + }, { text: i18n.ts.upload, icon: 'ti ti-upload', action: () => chooseFileFromPc(multiple, keepOriginal.value, useWatermark.value).then(files => res(files)),