refactor: unified empty state UI action button styles (#6704)

#### 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
统一空状态界面中操作按钮的风格。
```
pull/6488/head
Ryan Wang 2024-09-26 16:47:31 +08:00 committed by GitHub
parent 9710201aa4
commit 565dc1cbc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 21 additions and 28 deletions

View File

@ -364,11 +364,9 @@ const handleApproveInBatch = async () => {
:title="$t('core.comment.empty.title')" :title="$t('core.comment.empty.title')"
> >
<template #actions> <template #actions>
<VSpace>
<VButton @click="refetch"> <VButton @click="refetch">
{{ $t("core.common.buttons.refresh") }} {{ $t("core.common.buttons.refresh") }}
</VButton> </VButton>
</VSpace>
</template> </template>
</VEmpty> </VEmpty>
</Transition> </Transition>

View File

@ -281,7 +281,7 @@ watch(
<VButton <VButton
v-permission="['system:singlepages:view']" v-permission="['system:singlepages:view']"
:route="{ name: 'SinglePages' }" :route="{ name: 'SinglePages' }"
type="primary" type="secondary"
> >
{{ $t("core.common.buttons.back") }} {{ $t("core.common.buttons.back") }}
</VButton> </VButton>

View File

@ -432,7 +432,7 @@ watch(selectedPageNames, (newValue) => {
<VButton <VButton
v-permission="['system:singlepages:manage']" v-permission="['system:singlepages:manage']"
:route="{ name: 'SinglePageEditor' }" :route="{ name: 'SinglePageEditor' }"
type="primary" type="secondary"
> >
<template #icon> <template #icon>
<IconAddCircle class="h-full w-full" /> <IconAddCircle class="h-full w-full" />

View File

@ -280,7 +280,7 @@ watch(
<VButton @click="refetch"> <VButton @click="refetch">
{{ $t("core.common.buttons.refresh") }} {{ $t("core.common.buttons.refresh") }}
</VButton> </VButton>
<VButton :route="{ name: 'Posts' }" type="primary"> <VButton :route="{ name: 'Posts' }" type="secondary">
{{ $t("core.common.buttons.back") }} {{ $t("core.common.buttons.back") }}
</VButton> </VButton>
</VSpace> </VSpace>

View File

@ -563,7 +563,7 @@ watch(
<VButton <VButton
v-permission="['system:posts:manage']" v-permission="['system:posts:manage']"
:route="{ name: 'PostEditor' }" :route="{ name: 'PostEditor' }"
type="primary" type="secondary"
> >
<template #icon> <template #icon>
<IconAddCircle class="h-full w-full" /> <IconAddCircle class="h-full w-full" />

View File

@ -117,7 +117,7 @@ const handleUpdateInBatch = useDebounceFn(async () => {
</VButton> </VButton>
<VButton <VButton
v-permission="['system:posts:manage']" v-permission="['system:posts:manage']"
type="primary" type="secondary"
@click="creationModal = true" @click="creationModal = true"
> >
<template #icon> <template #icon>

View File

@ -267,7 +267,7 @@ watch(selectedTagNames, (newVal) => {
<VButton @click="() => handleFetchTags"> <VButton @click="() => handleFetchTags">
{{ $t("core.common.buttons.refresh") }} {{ $t("core.common.buttons.refresh") }}
</VButton> </VButton>
<VButton type="primary" @click="editingModal = true"> <VButton type="secondary" @click="editingModal = true">
<template #icon> <template #icon>
<IconAddCircle class="h-full w-full" /> <IconAddCircle class="h-full w-full" />
</template> </template>

View File

@ -259,7 +259,7 @@ const handleDelete = async (menuItem: MenuTreeItem) => {
</VButton> </VButton>
<VButton <VButton
v-permission="['system:menus:manage']" v-permission="['system:menus:manage']"
type="primary" type="secondary"
@click="menuItemEditingModal = true" @click="menuItemEditingModal = true"
> >
<template #icon> <template #icon>

View File

@ -12,7 +12,6 @@ import {
VEntity, VEntity,
VEntityField, VEntityField,
VLoading, VLoading,
VSpace,
VStatusDot, VStatusDot,
VTag, VTag,
} from "@halo-dev/components"; } from "@halo-dev/components";
@ -187,11 +186,9 @@ const handleSetPrimaryMenu = async (menu: Menu) => {
:title="$t('core.menu.empty.title')" :title="$t('core.menu.empty.title')"
> >
<template #actions> <template #actions>
<VSpace>
<VButton size="sm" @click="refetch()"> <VButton size="sm" @click="refetch()">
{{ $t("core.common.buttons.refresh") }} {{ $t("core.common.buttons.refresh") }}
</VButton> </VButton>
</VSpace>
</template> </template>
</VEmpty> </VEmpty>
</Transition> </Transition>

View File

@ -81,7 +81,7 @@ const handleOpenPreview = (theme: Theme) => {
</VButton> </VButton>
<VButton <VButton
v-permission="['system:themes:manage']" v-permission="['system:themes:manage']"
type="primary" type="secondary"
@click="activeTabId = 'local-upload'" @click="activeTabId = 'local-upload'"
> >
<template #icon> <template #icon>

View File

@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { Theme } from "@halo-dev/api-client"; import type { Theme } from "@halo-dev/api-client";
import { consoleApiClient } 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 { useQuery } from "@tanstack/vue-query";
import ThemeListItem from "../ThemeListItem.vue"; import ThemeListItem from "../ThemeListItem.vue";
@ -29,11 +29,9 @@ const {
<Transition v-else-if="!themes?.length" appear name="fade"> <Transition v-else-if="!themes?.length" appear name="fade">
<VEmpty :title="$t('core.theme.list_modal.not_installed_empty.title')"> <VEmpty :title="$t('core.theme.list_modal.not_installed_empty.title')">
<template #actions> <template #actions>
<VSpace>
<VButton :loading="isFetching" @click="refetch"> <VButton :loading="isFetching" @click="refetch">
{{ $t("core.common.buttons.refresh") }} {{ $t("core.common.buttons.refresh") }}
</VButton> </VButton>
</VSpace>
</template> </template>
</VEmpty> </VEmpty>
</Transition> </Transition>

View File

@ -235,7 +235,7 @@ onMounted(() => {
<VButton @click="themesModal = true"> <VButton @click="themesModal = true">
{{ $t("core.theme.common.buttons.install") }} {{ $t("core.theme.common.buttons.install") }}
</VButton> </VButton>
<VButton type="primary" @click="themesModal = true"> <VButton type="secondary" @click="themesModal = true">
<template #icon> <template #icon>
<IconExchange class="h-full w-full" /> <IconExchange class="h-full w-full" />
</template> </template>

View File

@ -175,7 +175,7 @@ const {
<VButton <VButton
v-permission="['system:posts:manage']" v-permission="['system:posts:manage']"
:route="{ name: 'PostEditor' }" :route="{ name: 'PostEditor' }"
type="primary" type="secondary"
> >
<template #icon> <template #icon>
<IconAddCircle class="h-full w-full" /> <IconAddCircle class="h-full w-full" />

View File

@ -56,7 +56,7 @@ const creationModal = ref(false);
<VButton @click="refetch"> <VButton @click="refetch">
{{ $t("core.common.buttons.refresh") }} {{ $t("core.common.buttons.refresh") }}
</VButton> </VButton>
<VButton type="primary" @click="creationModal = true"> <VButton type="secondary" @click="creationModal = true">
<template #icon> <template #icon>
<IconAddCircle class="h-full w-full" /> <IconAddCircle class="h-full w-full" />
</template> </template>