From 2e06b784099522be40f2e1f5d73024c925b12730 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Fri, 22 Aug 2025 18:29:47 +0800 Subject: [PATCH] style: Optimize cache cleaning interface styling (#10113) --- agent/app/service/device_clean.go | 6 +++--- agent/i18n/lang/en.yaml | 4 ++-- agent/i18n/lang/ja.yaml | 4 ++-- agent/i18n/lang/ko.yaml | 4 ++-- agent/i18n/lang/ms.yaml | 4 ++-- agent/i18n/lang/pt-BR.yaml | 4 ++-- agent/i18n/lang/ru.yaml | 4 ++-- agent/i18n/lang/tr.yaml | 4 ++-- agent/i18n/lang/zh-Hant.yaml | 4 ++-- agent/i18n/lang/zh.yaml | 4 ++-- frontend/src/styles/element-dark.scss | 3 +-- 11 files changed, 22 insertions(+), 23 deletions(-) diff --git a/agent/app/service/device_clean.go b/agent/app/service/device_clean.go index 893b9977f..11130ba29 100644 --- a/agent/app/service/device_clean.go +++ b/agent/app/service/device_clean.go @@ -274,7 +274,7 @@ func doSystemClean(taskItem *task.Task) func(t *task.Task) error { } dropWithTask(path.Join(global.Dir.BaseDir, snapshotTmpPath), taskItem, &size, &fileCount) - dropWithTask(path.Join(global.Dir.LocalBackupDir, "system"), taskItem, &size, &fileCount) + dropWithTask(path.Join(global.Dir.LocalBackupDir, "tmp/system"), taskItem, &size, &fileCount) dropWithTask(path.Join(global.Dir.BaseDir, rollbackPath, "app"), taskItem, &size, &fileCount) dropWithTask(path.Join(global.Dir.BaseDir, rollbackPath, "website"), taskItem, &size, &fileCount) @@ -615,11 +615,11 @@ func dropWithTask(itemPath string, taskItem *task.Task, size *int64, count *int) *size += itemSize *count += itemCount if err := os.RemoveAll(itemPath); err != nil { - taskItem.Log(i18n.GetMsgWithDetail("FileDropFailed", err.Error())) + taskItem.Log(i18n.GetWithNameAndErr("FileDropFailed", itemPath, err)) return } if itemCount != 0 { - taskItem.Log(i18n.GetMsgWithMap("FileDropSuccess", map[string]interface{}{"count": itemCount, "size": common.LoadSizeUnit2F(float64(itemSize))})) + taskItem.Log(i18n.GetMsgWithMap("FileDropSuccess", map[string]interface{}{"name": itemPath, "count": itemCount, "size": common.LoadSizeUnit2F(float64(itemSize))})) } } diff --git a/agent/i18n/lang/en.yaml b/agent/i18n/lang/en.yaml index e820a677c..ed8e502ca 100644 --- a/agent/i18n/lang/en.yaml +++ b/agent/i18n/lang/en.yaml @@ -108,8 +108,8 @@ ErrFavoriteExist: 'This path has already been favorited' ErrInvalidChar: 'Illegal characters are not allowed' ErrPathNotDelete: 'The selected directory cannot be deleted' ErrLogFileToLarge: "The log file exceeds 500MB and cannot be opened" -FileDropFailed: "File cleanup failed {{ .detail }}" -FileDropSuccess: "File cleanup successful, cleaned {{ .count }} files, freed {{ .size }} disk space" +FileDropFailed: "Failed to clean up file {{ .name }}: {{ .err }}" +FileDropSuccess: "Successfully cleaned up file {{ .name }}, cleaned {{ .count }} files, freed {{ .size }} disk space" FileDropSum: "File cleanup completed successfully, total {{ .count }} files cleaned, total {{ .size }} disk space freed" #website diff --git a/agent/i18n/lang/ja.yaml b/agent/i18n/lang/ja.yaml index 73ff924aa..d21c1562e 100644 --- a/agent/i18n/lang/ja.yaml +++ b/agent/i18n/lang/ja.yaml @@ -108,8 +108,8 @@ ErrFavoriteExist: 'このパスはすでにお気に入りに登録されてい ErrInvalidChar: '不正な文字は許可されません' ErrPathNotDelete: '選択されたディレクトリは削除できません' ErrLogFileToLarge: "ログファイルが500MBを超えており、開くことができません" -FileDropFailed: "ファイルのクリーンアップに失敗しました {{ .detail }}" -FileDropSuccess: "ファイルのクリーンアップ成功、{{ .count }} ファイルを削除、{{ .size }} のディスク領域を解放" +FileDropFailed: "ファイル {{ .name }} のクリーンアップに失敗しました: {{ .err }}" +FileDropSuccess: "ファイル {{ .name }} のクリーンアップに成功しました、{{ .count }} ファイルを削除、{{ .size }} のディスク領域を解放" FileDropSum: "ファイルのクリーンアップが完了しました、合計 {{ .count }} ファイルを削除、合計 {{ .size }} のディスク領域を解放" #website diff --git a/agent/i18n/lang/ko.yaml b/agent/i18n/lang/ko.yaml index 109cbb4c6..ef51907e0 100644 --- a/agent/i18n/lang/ko.yaml +++ b/agent/i18n/lang/ko.yaml @@ -108,8 +108,8 @@ ErrFavoriteExist: '이 경로는 이미 즐겨찾기되었습니다' ErrInvalidChar: '불법 문자는 허용되지 않습니다' ErrPathNotDelete: '선택한 디렉토리를 삭제할 수 없습니다' ErrLogFileToLarge: "로그 파일이 500MB를 초과하여 열 수 없습니다" -FileDropFailed: "파일 정리 실패 {{ .detail }}" -FileDropSuccess: "파일 정리 성공, {{ .count }}개 파일 삭제, {{ .size }} 디스크 공간 확보" +FileDropFailed: "파일 {{ .name }} 정리 실패: {{ .err }}" +FileDropSuccess: "파일 {{ .name }} 정리 성공, {{ .count }}개 파일 삭제, {{ .size }} 디스크 공간 확보" FileDropSum: "파일 정리 완료, 총 {{ .count }}개 파일 삭제, 총 {{ .size }} 디스크 공간 확보" #웹사이트 diff --git a/agent/i18n/lang/ms.yaml b/agent/i18n/lang/ms.yaml index 45a95acf8..e7a032fe9 100644 --- a/agent/i18n/lang/ms.yaml +++ b/agent/i18n/lang/ms.yaml @@ -111,8 +111,8 @@ ErrFavoriteExist: 'Laluan ini telah digemari' ErrInvalidChar: 'Aksara haram tidak dibenarkan' ErrPathNotDelete: 'Direktori yang dipilih tidak boleh dipadamkan' ErrLogFileTooLarge: "Fail log melebihi 500MB dan tidak boleh dibuka" -FileDropFailed: "Pembersihan fail gagal {{ .detail }}" -FileDropSuccess: "Pembersihan fail berjaya, {{ .count }} fail dibersihkan, {{ .size }} ruang cakera dibebaskan" +FileDropFailed: "Gagal membersihkan fail {{ .name }}: {{ .err }}" +FileDropSuccess: "Berjaya membersihkan fail {{ .name }}, {{ .count }} fail dibersihkan, {{ .size }} ruang cakera dibebaskan" FileDropSum: "Pembersihan fail selesai, sejumlah {{ .count }} fail dibersihkan, sejumlah {{ .size }} ruang cakera dibebaskan" #laman web diff --git a/agent/i18n/lang/pt-BR.yaml b/agent/i18n/lang/pt-BR.yaml index 23464540a..6b2292b53 100644 --- a/agent/i18n/lang/pt-BR.yaml +++ b/agent/i18n/lang/pt-BR.yaml @@ -111,8 +111,8 @@ ErrFavoriteExist: 'Este caminho já foi favorito' ErrInvalidChar: 'Caracteres ilegais não são permitidos' ErrPathNotDelete: 'O diretório selecionado não pode ser excluído' ErrLogFileToLarge: "Fail log melebihi 500MB, tidak boleh dibuka" -FileDropFailed: "Falha na limpeza de arquivos {{ .detail }}" -FileDropSuccess: "Limpeza de arquivos bem-sucedida, {{ .count }} arquivos removidos, {{ .size }} de espaço em disco liberado" +FileDropFailed: "Falha ao limpar arquivo {{ .name }}: {{ .err }}" +FileDropSuccess: "Arquivo {{ .name }} limpo com sucesso, {{ .count }} arquivos removidos, {{ .size }} de espaço em disco liberado" FileDropSum: "Limpeza de arquivos concluída com sucesso, total de {{ .count }} arquivos removidos, total de {{ .size }} de espaço em disco liberado" #site diff --git a/agent/i18n/lang/ru.yaml b/agent/i18n/lang/ru.yaml index 386704f63..91849cdff 100644 --- a/agent/i18n/lang/ru.yaml +++ b/agent/i18n/lang/ru.yaml @@ -111,8 +111,8 @@ ErrFavoriteExist: 'Этот путь уже добавлен в избранно ErrInvalidChar: 'Недопустимые символы не допускаются' ErrPathNotDelete: 'Выбранный каталог не может быть удален' ErrLogFileToLarge: "Файл журнала превышает 500MB и не может быть открыт" -FileDropFailed: "Очистка файлов не удалась {{ .detail }}" -FileDropSuccess: "Очистка файлов успешна, удалено {{ .count }} файлов, освобождено {{ .size }} дискового пространства" +FileDropFailed: "Не удалось очистить файл {{ .name }}: {{ .err }}" +FileDropSuccess: "Файл {{ .name }} успешно очищен, удалено {{ .count }} файлов, освобождено {{ .size }} дискового пространства" FileDropSum: "Очистка файлов завершена успешно, всего удалено {{ .count }} файлов, освобождено {{ .size }} дискового пространства" #веб-сайт diff --git a/agent/i18n/lang/tr.yaml b/agent/i18n/lang/tr.yaml index 6d0fcaf24..f43f557f2 100644 --- a/agent/i18n/lang/tr.yaml +++ b/agent/i18n/lang/tr.yaml @@ -111,8 +111,8 @@ ErrFavoriteExist: 'Bu yol zaten favorilere eklendi' ErrInvalidChar: 'Yasak karakterlere izin verilmiyor' ErrPathNotDelete: 'Seçilen dizin silinemez' ErrLogFileToLarge: "Günlük dosyası 500MB'ı aşıyor ve açılamıyor" -FileDropFailed: "Dosya temizleme başarısız {{ .detail }}" -FileDropSuccess: "Dosya temizleme başarılı, {{ .count }} dosya silindi, {{ .size }} disk alanı boşaltıldı" +FileDropFailed: "{{ .name }} dosyası temizlenemedi: {{ .err }}" +FileDropSuccess: "{{ .name }} dosyası başarıyla temizlendi, {{ .count }} dosya silindi, {{ .size }} disk alanı boşaltıldı" FileDropSum: "Dosya temizleme tamamlandı, toplam {{ .count }} dosya silindi, toplam {{ .size }} disk alanı boşaltıldı" diff --git a/agent/i18n/lang/zh-Hant.yaml b/agent/i18n/lang/zh-Hant.yaml index a336c9f1c..4a86b677f 100644 --- a/agent/i18n/lang/zh-Hant.yaml +++ b/agent/i18n/lang/zh-Hant.yaml @@ -107,8 +107,8 @@ ErrFavoriteExist: '已收藏此路徑' ErrInvalidChar: '禁止使用非法字元' ErrPathNotDelete: '所選目錄不可刪除' ErrLogFileToLarge: "日志文件超过 500M,無法打開" -FileDropFailed: "文件清理失敗 {{ .detail }}" -FileDropSuccess: "文件清理成功,清理 {{ .count }} 個文件,釋放 {{ .size }} 磁碟空間" +FileDropFailed: "清理文件 {{ .name }} 失敗: {{ .err }}" +FileDropSuccess: "清理文件 {{ .name }} 成功,清理 {{ .count }} 個文件,釋放 {{ .size }} 磁碟空間" FileDropSum: "文件清理完成,共清理 {{ .count }} 個文件,共釋放 {{ .size }} 磁碟空間" #website diff --git a/agent/i18n/lang/zh.yaml b/agent/i18n/lang/zh.yaml index 7b4992c9b..439ba7e81 100644 --- a/agent/i18n/lang/zh.yaml +++ b/agent/i18n/lang/zh.yaml @@ -107,8 +107,8 @@ ErrFavoriteExist: "已收藏此路径" ErrInvalidChar: "禁止使用非法字符" ErrPathNotDelete: "所选目录不可删除" ErrLogFileToLarge: "日志文件超过 500M,无法打开" -FileDropFailed: "文件清理失败 {{ .detail }}" -FileDropSuccess: "文件清理成功,清理文件 {{ .count }},释放磁盘空间 {{ .size }}" +FileDropFailed: "清理文件 {{ .name }} 失败 {{ .err }}" +FileDropSuccess: "清理文件 {{ .name }} 成功,清理文件 {{ .count }},释放磁盘空间 {{ .size }}" FileDropSum: "文件清理成功,清理文件共计 {{ .count }},释放磁盘空间共计 {{ .size }}" #website diff --git a/frontend/src/styles/element-dark.scss b/frontend/src/styles/element-dark.scss index a50e3b0d4..2f4a51674 100644 --- a/frontend/src/styles/element-dark.scss +++ b/frontend/src/styles/element-dark.scss @@ -462,8 +462,7 @@ html.dark { .el-collapse-item__header { color: #ffffff; - border: 1px solid var(--panel-main-bg-color-10); - background-color: var(--panel-main-bg-color-9) !important; + background-color: transparent !important; } .el-checkbox__input.is-checked .el-checkbox__inner::after {