A full-featured download manager.
fix: on download pause message
Dr_rOotc826a7dd770b
diff --git a/src/renderer/components/Native/EngineClient.vue b/src/renderer/components/Native/EngineClient.vueindex e4b496d8..f9b2673f 100644--- a/src/renderer/components/Native/EngineClient.vue+++ b/src/renderer/components/Native/EngineClient.vue@@ -144,7 +144,7 @@},bindEngineEvents: function () {api.client.on('onDownloadStart', this.onDownloadStart)- api.client.on('onDownloadPause', this.onDownloadPause)+ // api.client.on('onDownloadPause', this.onDownloadPause)api.client.on('onDownloadStop', this.onDownloadStop)api.client.on('onDownloadComplete', this.onDownloadComplete)api.client.on('onDownloadError', this.onDownloadError)@@ -152,7 +152,7 @@},unbindEngineEvents: function () {api.client.removeListener('onDownloadStart', this.onDownloadStart)- api.client.removeListener('onDownloadPause', this.onDownloadPause)+ // api.client.removeListener('onDownloadPause', this.onDownloadPause)api.client.removeListener('onDownloadStop', this.onDownloadStop)api.client.removeListener('onDownloadComplete', this.onDownloadComplete)api.client.removeListener('onDownloadError', this.onDownloadError)diff --git a/src/renderer/components/Task/TaskItemActions.vue b/src/renderer/components/Task/TaskItemActions.vueindex 46975b85..8bdbb2c3 100644--- a/src/renderer/components/Task/TaskItemActions.vue+++ b/src/renderer/components/Task/TaskItemActions.vue@@ -130,12 +130,12 @@})},onPauseClick: function () {+ const { taskName } = this+ this.$msg.info(this.$t('task.download-pause-message', { taskName }))this.$store.dispatch('task/pauseTask', this.task).catch(({ code }) => {if (code === 1) {- this.$msg.error(this.$t('task.pause-task-fail', {- taskName: this.taskName- }))+ this.$msg.error(this.$t('task.pause-task-fail', { taskName }))}})},diff --git a/src/renderer/store/modules/task.js b/src/renderer/store/modules/task.jsindex 593b13ea..fb197227 100644--- a/src/renderer/store/modules/task.js+++ b/src/renderer/store/modules/task.js@@ -77,7 +77,7 @@ const actions = {const { gid } = taskreturn api.forcePauseTask({ gid }).catch((e) => {- console.log(e.message)+ console.log(`[Motrix] removeTask.forcePauseTask#[${gid}] fail`, e.message)}).finally(() => {return api.removeTask({ gid })