From 77a5d531b6b06be9d9d5df09d4b53be9268c5923 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Fri, 24 Feb 2023 17:54:21 +0800 Subject: [PATCH] perf: hide active button when theme is activated (halo-dev/console#877) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 当主题已经启用时,隐藏启用的按钮。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3059 #### Screenshots: image #### Special notes for your reviewer: 测试方式: 1. 在主题管理列表检查已启用主题是否还有启用按钮即可。 #### Does this PR introduce a user-facing change? ```release-note Console 端主题管理列表隐藏已启用主题的启用按钮。 ``` --- .../themes/components/components/ThemeListItem.vue | 8 +++++++- .../themes/components/preview/ThemePreviewListItem.vue | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/modules/interface/themes/components/components/ThemeListItem.vue b/src/modules/interface/themes/components/components/ThemeListItem.vue index 810611d2c6..873dc85eb7 100644 --- a/src/modules/interface/themes/components/components/ThemeListItem.vue +++ b/src/modules/interface/themes/components/components/ThemeListItem.vue @@ -178,7 +178,13 @@ const handleUninstall = async (theme: Theme, deleteExtensions?: boolean) => { v-if="currentUserHasPermission(['system:themes:manage'])" #dropdownItems > - + 启用 diff --git a/src/modules/interface/themes/components/preview/ThemePreviewListItem.vue b/src/modules/interface/themes/components/preview/ThemePreviewListItem.vue index e805fc02e6..2d50ac004c 100644 --- a/src/modules/interface/themes/components/preview/ThemePreviewListItem.vue +++ b/src/modules/interface/themes/components/preview/ThemePreviewListItem.vue @@ -69,7 +69,13 @@ const { isActivated, handleActiveTheme } = useThemeLifeCycle(theme);