Skip to content

Commit

Permalink
perf: hide active button when theme is activated (halo-dev/console#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#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 f8ffcaa commit 77a5d53
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

0 comments on commit 77a5d53

Please # to comment.