diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts
index 0299a8ec2..49ef629ba 100644
--- a/frontend/src/lang/modules/en.ts
+++ b/frontend/src/lang/modules/en.ts
@@ -1026,6 +1026,7 @@ export default {
noDefaulServer: 'Not set',
defaultServerHelper:
'After setting the default site, all unbound domain names and IPs are directed to the default site\n which can effectively prevent malicious analysis',
+ restoreHelper: 'Are you sure to restore using this backup?',
},
nginx: {
serverNamesHashBucketSizeHelper: 'The hash table size of the server name',
diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts
index 4b4c2617f..bab87fb12 100644
--- a/frontend/src/lang/modules/zh.ts
+++ b/frontend/src/lang/modules/zh.ts
@@ -1055,6 +1055,7 @@ export default {
websiteStatictHelper: '在主机上创建网站目录',
websiteProxyHelper:
'代理已有服务,例如本机已安装使用 8080 端口的 halo 服务,那么代理地址为 http://127.0.0.1:8080',
+ restoreHelper: '确认使用此备份恢复?',
},
nginx: {
serverNamesHashBucketSizeHelper: '服务器名字的hash表大小',
diff --git a/frontend/src/views/website/website/backup/index.vue b/frontend/src/views/website/website/backup/index.vue
index d3dac7cc3..4aaf1e922 100644
--- a/frontend/src/views/website/website/backup/index.vue
+++ b/frontend/src/views/website/website/backup/index.vue
@@ -14,7 +14,7 @@
{{ $t('database.backup') }}
-
+
{{ $t('commons.button.delete') }}
@@ -43,6 +43,7 @@ import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@
import { Backup } from '@/api/interface/backup';
import { BackupWebsite, RecoverWebsite } from '@/api/modules/website';
import { MsgSuccess } from '@/utils/message';
+import { ElMessageBox } from 'element-plus';
const selects = ref([]);
const loading = ref(false);
@@ -90,6 +91,16 @@ const search = async () => {
};
const onRecover = async (row: Backup.RecordInfo) => {
+ ElMessageBox.confirm(i18n.global.t('website.restoreHelper'), i18n.global.t('commons.button.recover'), {
+ confirmButtonText: i18n.global.t('commons.button.confirm'),
+ cancelButtonText: i18n.global.t('commons.button.cancel'),
+ type: 'info',
+ }).then(() => {
+ recover(row);
+ });
+};
+
+const recover = async (row: Backup.RecordInfo) => {
let params = {
websiteName: websiteName.value,
type: websiteType.value,
diff --git a/frontend/src/views/website/website/upload/index.vue b/frontend/src/views/website/website/upload/index.vue
index f670aa46e..a3092a734 100644
--- a/frontend/src/views/website/website/upload/index.vue
+++ b/frontend/src/views/website/website/upload/index.vue
@@ -29,7 +29,6 @@