From 988ecaaa03116c2c4fa9a4cbb4ce4e284fa4c7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Marseault?= <22910497+Larsluph@users.noreply.github.com> Date: Sun, 26 Nov 2023 16:39:06 +0100 Subject: [PATCH] perf: Add download path management (#1359) --- .../Dashboard/TRC/RightClickMenu.vue | 19 +++++++--- src/components/Dialogs/MoveTorrentDialog.vue | 24 +++++++++---- src/components/TorrentDetail/Overview.vue | 35 ++++++++++++++----- src/services/qbit.ts | 18 ++++++++-- src/stores/torrents.ts | 9 +++-- 5 files changed, 81 insertions(+), 24 deletions(-) diff --git a/src/components/Dashboard/TRC/RightClickMenu.vue b/src/components/Dashboard/TRC/RightClickMenu.vue index d885bcb5..0f973516 100644 --- a/src/components/Dashboard/TRC/RightClickMenu.vue +++ b/src/components/Dashboard/TRC/RightClickMenu.vue @@ -52,8 +52,12 @@ function deleteTorrents() { dialogStore.createDialog(ConfirmDeleteDialog, { hashes: [...dashboardStore.selectedTorrents] }) } -function moveTorrents() { - dialogStore.createDialog(MoveTorrentDialog, { hashes: [...dashboardStore.selectedTorrents] }) +function setDownloadPath() { + dialogStore.createDialog(MoveTorrentDialog, { hashes: [...dashboardStore.selectedTorrents], mode: 'dl' }) +} + +function setSavePath() { + dialogStore.createDialog(MoveTorrentDialog, { hashes: [...dashboardStore.selectedTorrents], mode: 'save' }) } function renameTorrents() { @@ -126,9 +130,14 @@ const menuData = computed(() => [ icon: 'mdi-head-cog', children: [ { - text: t('dashboard.right_click.advanced.change_location'), - icon: 'mdi-folder', - action: moveTorrents + text: t('dashboard.right_click.advanced.download_path'), + icon: 'mdi-tray-arrow-down', + action: setDownloadPath + }, + { + text: t('dashboard.right_click.advanced.save_path'), + icon: 'mdi-content-save', + action: setSavePath }, { text: t('dashboard.right_click.advanced.rename'), diff --git a/src/components/Dialogs/MoveTorrentDialog.vue b/src/components/Dialogs/MoveTorrentDialog.vue index 37d3273a..e67b0ca4 100644 --- a/src/components/Dialogs/MoveTorrentDialog.vue +++ b/src/components/Dialogs/MoveTorrentDialog.vue @@ -1,17 +1,19 @@