From 6d9217d41975483ef07a0b879e45cccc85883f79 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Thu, 1 Dec 2022 16:13:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=94=E7=94=A8=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/app_utils.go | 4 +- frontend/src/lang/modules/zh.ts | 4 +- .../src/views/app-store/installed/backups.vue | 54 +++++++++++++++---- .../src/views/app-store/installed/index.vue | 5 +- 4 files changed, 52 insertions(+), 15 deletions(-) diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index 01216bffe..ca9cf07e5 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -246,8 +246,8 @@ func backupInstall(ctx context.Context, install model.AppInstall) error { backupDir := path.Join(constant.BackupDir, install.App.Key, install.Name) fileOp := files.NewFileOp() now := time.Now() - day := now.Format("2006-01-02-15-04") - fileName := fmt.Sprintf("%s-%s-%s%s", install.Name, install.Version, day, ".tar.gz") + day := now.Format("20060102150405") + fileName := fmt.Sprintf("%s_%s%s", install.Name, day, ".tar.gz") if err := fileOp.Compress([]string{appPath}, backupDir, fileName, files.TarGz); err != nil { return err } diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index aebfe46cb..1f3b98412 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -724,8 +724,8 @@ export default { backupName: '文件名称', backupPath: '文件路径', backupdate: '备份时间', - restore: '回滚', - restoreWarn: '回滚操作会重启应用,并替换数据,此操作不可回滚,是否继续?', + restore: '恢复', + restoreWarn: '恢复操作会重启应用,并替换数据,此操作不可回滚,是否继续?', update: '升级', versioneSelect: '请选择版本', operatorHelper: '将对选中应用进行 {0} 操作,是否继续?', diff --git a/frontend/src/views/app-store/installed/backups.vue b/frontend/src/views/app-store/installed/backups.vue index a8eecb23f..8b79b24f3 100644 --- a/frontend/src/views/app-store/installed/backups.vue +++ b/frontend/src/views/app-store/installed/backups.vue @@ -1,11 +1,38 @@