Skip to content

A full-featured download manager.

feat: shift delete task auto checked remove files

Dr_rOot1f27f88aa729
diff --git a/src/renderer/components/Task/TaskItemActions.vue b/src/renderer/components/Task/TaskItemActions.vue
index e4209c3f..1772a981 100644
--- a/src/renderer/components/Task/TaskItemActions.vue
+++ b/src/renderer/components/Task/TaskItemActions.vue
@@ -245,16 +245,18 @@
}
})
},
- onDeleteClick () {
+ onDeleteClick (event) {
const self = this
const { task } = this
+ const isChecked = !!event.shiftKey
this.$electron.remote.dialog.showMessageBox({
type: 'warning',
title: this.$t('task.delete-task'),
message: this.$t('task.delete-task-confirm', { taskName: this.taskName }),
buttons: [this.$t('app.yes'), this.$t('app.no')],
cancelId: 1,
- checkboxLabel: this.$t('task.delete-task-label')
+ checkboxLabel: this.$t('task.delete-task-label'),
+ checkboxChecked: isChecked
}, (buttonIndex, checkboxChecked) => {
if (buttonIndex === 0) {
self.removeTaskItem(task, checkboxChecked)