From e9a0ad72ff85a7034c7a8e4e3b2303ffc9541c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Marseault?= <22910497+Larsluph@users.noreply.github.com> Date: Sun, 4 Jun 2023 22:03:12 +0200 Subject: [PATCH] perf(rss-rules): Add Select All / None buttons (#849) --- src/components/Modals/Rss/RuleForm.vue | 22 +++++++++++++++++++--- src/lang/en.json | 3 ++- src/views/Dashboard.vue | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/Modals/Rss/RuleForm.vue b/src/components/Modals/Rss/RuleForm.vue index 7fdbd287..bc077920 100644 --- a/src/components/Modals/Rss/RuleForm.vue +++ b/src/components/Modals/Rss/RuleForm.vue @@ -39,7 +39,7 @@ - +

{{ $t('modals.newRule.def.addPaused.title') }}

@@ -57,6 +57,16 @@ {{ $t('modals.newRule.def.affectedFeeds') }} + + + + {{ $t('selectAll') }} + + + {{ $t('selectNone') }} + + + @@ -81,7 +91,7 @@ {{ $t('save') }} - + {{ $t('close') }} @@ -98,7 +108,7 @@ import { Modal } from '@/mixins' import { mdiClose, mdiContentSave } from '@mdi/js' import i18n from '@/plugins/i18n' import { AppPreferences } from '@/enums/qbit' -import { Category } from '@/types/vuetorrent' +import {Category, Feed} from '@/types/vuetorrent' type FormattedArticle = { type: string; value?: string } @@ -210,6 +220,12 @@ export default defineComponent({ this.matchingArticles = formattedArticles this.loading = false }, + selectNone() { + this.rule.affectedFeeds = [] + }, + selectAll() { + this.rule.affectedFeeds = this.availableFeeds.map((feed: Feed) => feed.url) + }, close() { this.dialog = false }, diff --git a/src/lang/en.json b/src/lang/en.json index fd96b19f..7b5667cd 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -52,12 +52,13 @@ "filter": "Filter", "close": "Close", "useGlobalSettings": "Use Global Settings", + "selectAll": "Select All", + "selectNone": "Select None", "dashboard": { "tooltips": { "toggleSearch": "Toggle Search Filter", "toggleSelect": "Toggle Select Mode", "toggleSort": "Sort Torrents", - "selectAll": "Select All", "selectAllCaption": "Select / Release All (Ctrl + A)" }, "emptyTorrentList": "Nothing to see here!", diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 5df63797..625366a9 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -94,7 +94,7 @@ - {{ $t('dashboard.tooltips.selectAll') }} + {{ $t('selectAll') }} {{ $t('dashboard.tooltips.selectAllCaption') }}