diff --git a/console/src/locales/en.yaml b/console/src/locales/en.yaml index b014d9c0a..80456d1bd 100644 --- a/console/src/locales/en.yaml +++ b/console/src/locales/en.yaml @@ -1003,6 +1003,9 @@ core: toast_success: Requested to restart remote_download: button: Download and restore + restore_by_backup: + button: Restore + title: Are you sure you want to restore from this backup? list: phases: pending: Pending @@ -1025,6 +1028,8 @@ core: label: Remote fields: url: Remote URL + backup: + label: Restore from backup exception: not_found: message: Page not found diff --git a/console/src/locales/zh-CN.yaml b/console/src/locales/zh-CN.yaml index 8cffb00ca..093a353da 100644 --- a/console/src/locales/zh-CN.yaml +++ b/console/src/locales/zh-CN.yaml @@ -1003,6 +1003,9 @@ core: toast_success: 已请求重启 remote_download: button: 下载并恢复 + restore_by_backup: + button: 恢复 + title: 确认要从此备份进行恢复吗? list: phases: pending: 准备中 @@ -1025,6 +1028,8 @@ core: label: 远程恢复 fields: url: 下载地址 + backup: + label: 从备份恢复 exception: not_found: message: 没有找到该页面 diff --git a/console/src/locales/zh-TW.yaml b/console/src/locales/zh-TW.yaml index 713eb82b5..4f79c03e8 100644 --- a/console/src/locales/zh-TW.yaml +++ b/console/src/locales/zh-TW.yaml @@ -1003,6 +1003,9 @@ core: toast_success: 已請求重啟 remote_download: button: 下載並還原 + restore_by_backup: + button: 還原 + title: 確認要從此備份進行還原嗎? list: phases: pending: 準備中 @@ -1016,15 +1019,17 @@ core: first: 1. 還原過程可能需要較長時間,期間請勿重新整理頁面。 second: 2. 在還原過程中,雖然已有的資料不會被清除,但若有衝突的資料將被覆蓋。 third: 3. 還原完成後需要重新啟動 Halo 才能正常載入系統資源。 - complete: 恢復完成,等待重啟... + complete: 還原完成,等待重啟... start: 開始還原 tabs: local: label: 上傳 remote: - label: 遠程恢復 + label: 遠程還原 fields: url: 下載地址 + backup: + label: 從備份還原 exception: not_found: message: 沒有找到該頁面 diff --git a/console/src/modules/system/backup/components/BackupListItem.vue b/console/src/modules/system/backup/components/BackupListItem.vue index 97ff79879..6afc3ffa6 100644 --- a/console/src/modules/system/backup/components/BackupListItem.vue +++ b/console/src/modules/system/backup/components/BackupListItem.vue @@ -23,9 +23,15 @@ import type { OperationItem } from "packages/shared/dist"; const queryClient = useQueryClient(); const { t } = useI18n(); -const props = defineProps<{ - backup: Backup; -}>(); +const props = withDefaults( + defineProps<{ + backup: Backup; + showOperations: boolean; + }>(), + { + showOperations: true, + } +); const { backup } = toRefs(props); @@ -185,8 +191,9 @@ const { operationItems } = useOperationItemExtensionPoint( + -