diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-07-30 14:42:46 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-30 14:42:46 +0900 |
| commit | 45f909ef33056ac8f429d2a1707d1d7da96d2970 (patch) | |
| tree | 64e0888519c7121064a649318c96957e95f4cf00 /packages/frontend/src/scripts | |
| parent | enhance(frontend): デッキのアンテナ・リスト選択画面からそ... (diff) | |
| download | sharkey-45f909ef33056ac8f429d2a1707d1d7da96d2970.tar.gz sharkey-45f909ef33056ac8f429d2a1707d1d7da96d2970.tar.bz2 sharkey-45f909ef33056ac8f429d2a1707d1d7da96d2970.zip | |
enhance(frontend): ドライブのファイル・フォルダをドラッグしなくても移動できるように (#14318)
* feat(drive): ファイルをフォルダに移動するメニューを実装
(cherry picked from commit b89c2af6945c6a9f9f10e83f54d2bcf0f240b0b4)
* tweak ui
* Update Changelog
* ファイル詳細からも移動できるように
* feat(drive) フォルダのネストを移動するメニューを実装
(cherry picked from commit 8a7d710c6acb83f50c83f050bd1423c764d60a99)
* Update Changelog
* Update Changelog
* lint
* tweak ui
---------
Co-authored-by: nafu-at <satsuki@nafusoft.dev>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/get-drive-file-menu.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/get-drive-file-menu.ts b/packages/frontend/src/scripts/get-drive-file-menu.ts index 7c6c4b4db4..108648d640 100644 --- a/packages/frontend/src/scripts/get-drive-file-menu.ts +++ b/packages/frontend/src/scripts/get-drive-file-menu.ts @@ -41,6 +41,15 @@ function describe(file: Misskey.entities.DriveFile) { }); } +function move(file: Misskey.entities.DriveFile) { + os.selectDriveFolder(false).then(folder => { + misskeyApi('drive/files/update', { + fileId: file.id, + folderId: folder[0] ? folder[0].id : null, + }); + }); +} + function toggleSensitive(file: Misskey.entities.DriveFile) { misskeyApi('drive/files/update', { fileId: file.id, @@ -89,6 +98,10 @@ export function getDriveFileMenu(file: Misskey.entities.DriveFile, folder?: Miss icon: 'ti ti-forms', action: () => rename(file), }, { + text: i18n.ts.move, + icon: 'ti ti-folder-symlink', + action: () => move(file), + }, { text: file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive, icon: file.isSensitive ? 'ti ti-eye' : 'ti ti-eye-exclamation', action: () => toggleSensitive(file), |