Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
perf: hide active button when theme is activated (#877)
Browse files Browse the repository at this point in the history
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

当主题已经启用时,隐藏启用的按钮。

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3059

#### Screenshots:

<img width="1022" alt="image" src="https://user-images.githubusercontent.com/21301288/220517066-67ee2f25-1b64-47c0-8b4c-3bdd6b3cb9f1.png">

#### Special notes for your reviewer:

测试方式:

1. 在主题管理列表检查已启用主题是否还有启用按钮即可。

#### Does this PR introduce a user-facing change?

```release-note
Console 端主题管理列表隐藏已启用主题的启用按钮。
```
  • Loading branch information
ruibaby authored Feb 24, 2023
1 parent 08c58ae commit e9d8f0f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ const handleUninstall = async (theme: Theme, deleteExtensions?: boolean) => {
v-if="currentUserHasPermission(['system:themes:manage'])"
#dropdownItems
>
<VButton v-close-popper block type="secondary" @click="handleActiveTheme">
<VButton
v-if="!isActivated"
v-close-popper
block
type="secondary"
@click="handleActiveTheme"
>
启用
</VButton>
<VButton v-close-popper block type="default" @click="emit('upgrade')">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ const { isActivated, handleActiveTheme } = useThemeLifeCycle(theme);
</template>

<template #dropdownItems>
<VButton v-close-popper block type="secondary" @click="handleActiveTheme">
<VButton
v-if="!isActivated"
v-close-popper
block
type="secondary"
@click="handleActiveTheme"
>
启用
</VButton>
<VButton
Expand Down

1 comment on commit e9d8f0f

@vercel
Copy link

@vercel vercel bot commented on e9d8f0f Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui-halo-dev.vercel.app
halo-admin-ui.vercel.app
ui-git-main-halo-dev.vercel.app

Please sign in to comment.