mirror of https://github.com/halo-dev/halo
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
parent
9710201aa4
commit
565dc1cbc8
|
@ -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>
|
||||
|
|
|
@ -281,7 +281,7 @@ watch(
|
|||
<VButton
|
||||
v-permission="['system:singlepages:view']"
|
||||
:route="{ name: 'SinglePages' }"
|
||||
type="primary"
|
||||
type="secondary"
|
||||
>
|
||||
{{ $t("core.common.buttons.back") }}
|
||||
</VButton>
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -117,7 +117,7 @@ const handleUpdateInBatch = useDebounceFn(async () => {
|
|||
</VButton>
|
||||
<VButton
|
||||
v-permission="['system:posts:manage']"
|
||||
type="primary"
|
||||
type="secondary"
|
||||
@click="creationModal = true"
|
||||
>
|
||||
<template #icon>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -12,7 +12,6 @@ import {
|
|||
VEntity,
|
||||
VEntityField,
|
||||
VLoading,
|
||||
VSpace,
|
||||
VStatusDot,
|
||||
VTag,
|
||||
} from "@halo-dev/components";
|
||||
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue