From 05dafca9295da16395e10dfcdd49066b0b17d30f Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 27 Apr 2024 15:07:51 +0200 Subject: [PATCH] refactor: simplify question output of delete selected jobs dialog Signed-off-by: Stefan Dej --- .../HistoryListPanelDeleteSelectedDialog.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/dialogs/HistoryListPanelDeleteSelectedDialog.vue b/src/components/dialogs/HistoryListPanelDeleteSelectedDialog.vue index dab8d43f3..163efe922 100644 --- a/src/components/dialogs/HistoryListPanelDeleteSelectedDialog.vue +++ b/src/components/dialogs/HistoryListPanelDeleteSelectedDialog.vue @@ -7,12 +7,7 @@ -

- {{ $t('History.DeleteSingleJobQuestion') }} -

-

- {{ $t('History.DeleteSelectedQuestion', { count: selectedJobs.length }) }} -

+

{{ question }}

@@ -46,6 +41,12 @@ export default class HistoryListPanelDeleteSelectedDialog extends Mixins(BaseMix this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.history.selectedJobs', value: newVal }) } + get question() { + if (this.selectedJobs.length === 1) return this.$t('History.DeleteSingleJobQuestion') + + return this.$t('History.DeleteSelectedQuestion', { count: this.selectedJobs.length }) + } + closeDialog() { this.$emit('close') }