diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-05-23 12:28:30 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-05-23 12:28:30 +0900 |
| commit | 4ad8b59b49ad9f5bcb8392df585bc937e084d244 (patch) | |
| tree | d5d29da27da0c8d82687fc09613eb172d9ce46b3 /packages/frontend/src | |
| parent | fix(frontend): 一定時間操作がなかったら動画プレイヤーの... (diff) | |
| download | misskey-4ad8b59b49ad9f5bcb8392df585bc937e084d244.tar.gz misskey-4ad8b59b49ad9f5bcb8392df585bc937e084d244.tar.bz2 misskey-4ad8b59b49ad9f5bcb8392df585bc937e084d244.zip | |
enhance(frontend): アップロード前のリネームを可能に
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/components/MkUploaderDialog.vue | 17 |
1 files changed, 17 insertions, 0 deletions
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', |