From 4ad8b59b49ad9f5bcb8392df585bc937e084d244 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 23 May 2025 12:28:30 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=BC=E3=83=89=E5=89=8D=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=8D=E3=83=BC=E3=83=A0=E3=82=92=E5=8F=AF=E8=83=BD=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/MkUploaderDialog.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/frontend/src/components/MkUploaderDialog.vue b/packages/frontend/src/components/MkUploaderDialog.vue index eb8026a480..4c928c7f6a 100644 --- a/packages/frontend/src/components/MkUploaderDialog.vue +++ b/packages/frontend/src/components/MkUploaderDialog.vue @@ -254,6 +254,23 @@ async function done() { function showMenu(ev: MouseEvent, item: typeof items.value[0]) { const menu: MenuItem[] = []; + menu.push({ + icon: 'ti ti-cursor-text', + text: i18n.ts.rename, + action: async () => { + const { result, canceled } = await os.inputText({ + type: 'text', + title: i18n.ts.rename, + placeholder: item.name, + default: item.name, + }); + if (canceled) return; + if (result.trim() === '') return; + + item.name = result; + }, + }); + if (CROPPING_SUPPORTED_TYPES.includes(item.file.type) && !item.waiting && !item.uploading && !item.uploaded) { menu.push({ icon: 'ti ti-crop',