From bc8d4cbb0f2fc673f59614c3977e4d953d1b19a7 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:46:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BA=94=E7=94=A8=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=20(#1362)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/upload/index.vue | 11 ++++++++++- frontend/src/lang/modules/en.ts | 2 +- frontend/src/lang/modules/zh.ts | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/upload/index.vue b/frontend/src/components/upload/index.vue index ed309ead4..c9f6c5044 100644 --- a/frontend/src/components/upload/index.vue +++ b/frontend/src/components/upload/index.vue @@ -280,7 +280,16 @@ const buttons = [ { label: i18n.global.t('commons.button.recover'), click: (row: File.File) => { - onRecover(row); + if (type.value !== 'app') { + onRecover(row); + } else { + ElMessageBox.confirm(i18n.global.t('app.restoreWarn'), i18n.global.t('commons.button.recover'), { + confirmButtonText: i18n.global.t('commons.button.confirm'), + cancelButtonText: i18n.global.t('commons.button.cancel'), + }).then(async () => { + onRecover(row); + }); + } }, }, { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index c3e3e9fc1..8e42c7aa3 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1142,7 +1142,7 @@ const message = { backupdate: 'Backup time', restore: 'Restore', restoreWarn: - 'The restore operation will restart the application and replace the data. This operation cannot be rolled back. Do you want to continue?', + 'The recovery operation will delete the current data of this application and perform a restart. This action is irreversible. Do you wish to continue?', update: 'update', upgrade: 'upgrade', versionSelect: 'Please select a version', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index d5bbbb715..67b350fac 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1109,7 +1109,7 @@ const message = { backupPath: '文件路径', backupdate: '备份时间', restore: '恢复', - restoreWarn: '恢复操作会重启应用,并替换数据,此操作不可回滚,是否继续?', + restoreWarn: '恢复操作将删除该应用当前数据并重启。此操作不可回滚,是否继续?', update: '更新', upgrade: '升级', versionSelect: '请选择版本',