From 38664d45ef5da92228b700847d37d219d09b6513 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Fri, 28 Jul 2023 11:33:09 +0800 Subject: [PATCH] refactor: remove the duplicate button to create a backup (#4322) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area console /kind improvement /milestone 2.8.x #### What this PR does / why we need it: 移除备份列表空状态的创建备份按钮,防止出现多个创建的按钮。 image #### Does this PR introduce a user-facing change? ```release-note None ``` --- console/src/locales/en.yaml | 2 -- console/src/locales/zh-CN.yaml | 2 -- console/src/locales/zh-TW.yaml | 2 -- .../src/modules/system/backup/tabs/List.vue | 25 +++---------------- 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/console/src/locales/en.yaml b/console/src/locales/en.yaml index 8b8683c8b..68e8aa8f8 100644 --- a/console/src/locales/en.yaml +++ b/console/src/locales/en.yaml @@ -992,8 +992,6 @@ core: empty: title: No backups have been created yet message: You can click the button below to create a backup - actions: - create: Create backup operations: create: button: Create backup diff --git a/console/src/locales/zh-CN.yaml b/console/src/locales/zh-CN.yaml index a867f2f66..83add02ee 100644 --- a/console/src/locales/zh-CN.yaml +++ b/console/src/locales/zh-CN.yaml @@ -992,8 +992,6 @@ core: empty: title: 没有备份 message: 当前没有已创建的备份,你可以点击刷新或者创建新的备份 - actions: - create: 创建备份 operations: create: button: 创建备份 diff --git a/console/src/locales/zh-TW.yaml b/console/src/locales/zh-TW.yaml index 875c0eb1d..0842bd8c1 100644 --- a/console/src/locales/zh-TW.yaml +++ b/console/src/locales/zh-TW.yaml @@ -992,8 +992,6 @@ core: empty: title: 沒有備份 message: 目前沒有已建立的備份,您可以點擊重新整理或建立新的備份。 - actions: - create: 建立備份 operations: create: button: 建立備份 diff --git a/console/src/modules/system/backup/tabs/List.vue b/console/src/modules/system/backup/tabs/List.vue index 00413ba7b..d9021793a 100644 --- a/console/src/modules/system/backup/tabs/List.vue +++ b/console/src/modules/system/backup/tabs/List.vue @@ -2,15 +2,8 @@ import { apiClient } from "@/utils/api-client"; import { useQuery } from "@tanstack/vue-query"; import { BackupStatusPhaseEnum } from "@halo-dev/api-client"; -import { - IconAddCircle, - VButton, - VEmpty, - VLoading, - VSpace, -} from "@halo-dev/components"; +import { VButton, VEmpty, VLoading } from "@halo-dev/components"; import BackupListItem from "../components/BackupListItem.vue"; -import { useBackup } from "../composables/use-backup"; const { data: backups, @@ -49,8 +42,6 @@ const { return false; }, }); - -const { handleCreate } = useBackup();