Skip to content

Commit

Permalink
refactor: unified empty state UI action button styles (#6704)
Browse files Browse the repository at this point in the history
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

统一空状态界面中操作按钮的风格。

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

```release-note
统一空状态界面中操作按钮的风格。
```
  • Loading branch information
ruibaby authored Sep 26, 2024
1 parent 9710201 commit 565dc1c
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 28 deletions.
8 changes: 3 additions & 5 deletions ui/console-src/modules/contents/comments/CommentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,9 @@ const handleApproveInBatch = async () => {
:title="$t('core.comment.empty.title')"
>
<template #actions>
<VSpace>
<VButton @click="refetch">
{{ $t("core.common.buttons.refresh") }}
</VButton>
</VSpace>
<VButton @click="refetch">
{{ $t("core.common.buttons.refresh") }}
</VButton>
</template>
</VEmpty>
</Transition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ watch(
<VButton
v-permission="['system:singlepages:view']"
:route="{ name: 'SinglePages' }"
type="primary"
type="secondary"
>
{{ $t("core.common.buttons.back") }}
</VButton>
Expand Down
2 changes: 1 addition & 1 deletion ui/console-src/modules/contents/pages/SinglePageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ watch(selectedPageNames, (newValue) => {
<VButton
v-permission="['system:singlepages:manage']"
:route="{ name: 'SinglePageEditor' }"
type="primary"
type="secondary"
>
<template #icon>
<IconAddCircle class="h-full w-full" />
Expand Down
2 changes: 1 addition & 1 deletion ui/console-src/modules/contents/posts/DeletedPostList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ watch(
<VButton @click="refetch">
{{ $t("core.common.buttons.refresh") }}
</VButton>
<VButton :route="{ name: 'Posts' }" type="primary">
<VButton :route="{ name: 'Posts' }" type="secondary">
{{ $t("core.common.buttons.back") }}
</VButton>
</VSpace>
Expand Down
2 changes: 1 addition & 1 deletion ui/console-src/modules/contents/posts/PostList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ watch(
<VButton
v-permission="['system:posts:manage']"
:route="{ name: 'PostEditor' }"
type="primary"
type="secondary"
>
<template #icon>
<IconAddCircle class="h-full w-full" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const handleUpdateInBatch = useDebounceFn(async () => {
</VButton>
<VButton
v-permission="['system:posts:manage']"
type="primary"
type="secondary"
@click="creationModal = true"
>
<template #icon>
Expand Down
2 changes: 1 addition & 1 deletion ui/console-src/modules/contents/posts/tags/TagList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ watch(selectedTagNames, (newVal) => {
<VButton @click="() => handleFetchTags">
{{ $t("core.common.buttons.refresh") }}
</VButton>
<VButton type="primary" @click="editingModal = true">
<VButton type="secondary" @click="editingModal = true">
<template #icon>
<IconAddCircle class="h-full w-full" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion ui/console-src/modules/interface/menus/Menus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ const handleDelete = async (menuItem: MenuTreeItem) => {
</VButton>
<VButton
v-permission="['system:menus:manage']"
type="primary"
type="secondary"
@click="menuItemEditingModal = true"
>
<template #icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
VEntity,
VEntityField,
VLoading,
VSpace,
VStatusDot,
VTag,
} from "@halo-dev/components";
Expand Down Expand Up @@ -187,11 +186,9 @@ const handleSetPrimaryMenu = async (menu: Menu) => {
:title="$t('core.menu.empty.title')"
>
<template #actions>
<VSpace>
<VButton size="sm" @click="refetch()">
{{ $t("core.common.buttons.refresh") }}
</VButton>
</VSpace>
<VButton size="sm" @click="refetch()">
{{ $t("core.common.buttons.refresh") }}
</VButton>
</template>
</VEmpty>
</Transition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const handleOpenPreview = (theme: Theme) => {
</VButton>
<VButton
v-permission="['system:themes:manage']"
type="primary"
type="secondary"
@click="activeTabId = 'local-upload'"
>
<template #icon>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { Theme } from "@halo-dev/api-client";
import { consoleApiClient } from "@halo-dev/api-client";
import { VButton, VEmpty, VLoading, VSpace } from "@halo-dev/components";
import { VButton, VEmpty, VLoading } from "@halo-dev/components";
import { useQuery } from "@tanstack/vue-query";
import ThemeListItem from "../ThemeListItem.vue";
Expand Down Expand Up @@ -29,11 +29,9 @@ const {
<Transition v-else-if="!themes?.length" appear name="fade">
<VEmpty :title="$t('core.theme.list_modal.not_installed_empty.title')">
<template #actions>
<VSpace>
<VButton :loading="isFetching" @click="refetch">
{{ $t("core.common.buttons.refresh") }}
</VButton>
</VSpace>
<VButton :loading="isFetching" @click="refetch">
{{ $t("core.common.buttons.refresh") }}
</VButton>
</template>
</VEmpty>
</Transition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ onMounted(() => {
<VButton @click="themesModal = true">
{{ $t("core.theme.common.buttons.install") }}
</VButton>
<VButton type="primary" @click="themesModal = true">
<VButton type="secondary" @click="themesModal = true">
<template #icon>
<IconExchange class="h-full w-full" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion ui/uc-src/modules/contents/posts/PostList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const {
<VButton
v-permission="['system:posts:manage']"
:route="{ name: 'PostEditor' }"
type="primary"
type="secondary"
>
<template #icon>
<IconAddCircle class="h-full w-full" />
Expand Down
2 changes: 1 addition & 1 deletion ui/uc-src/modules/profile/tabs/PersonalAccessTokens.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const creationModal = ref(false);
<VButton @click="refetch">
{{ $t("core.common.buttons.refresh") }}
</VButton>
<VButton type="primary" @click="creationModal = true">
<VButton type="secondary" @click="creationModal = true">
<template #icon>
<IconAddCircle class="h-full w-full" />
</template>
Expand Down

0 comments on commit 565dc1c

Please sign in to comment.