fix: always show publish in topbar
This commit is contained in:
@@ -44,6 +44,8 @@ const publishTo = computed(() => {
|
||||
return '/management/contents/new';
|
||||
});
|
||||
|
||||
const canPublish = computed(() => isTenantAdmin.value || isTenantApproved.value);
|
||||
|
||||
const userMenuItems = computed(() => [
|
||||
{ label: '个人中心', icon: 'pi pi-user', command: () => router.push('/me') },
|
||||
{ separator: true },
|
||||
@@ -97,6 +99,10 @@ onMounted(() => {
|
||||
|
||||
<div class="layout-topbar-actions">
|
||||
<div class="layout-config-menu">
|
||||
<router-link v-if="canPublish" :to="publishTo" class="layout-topbar-action layout-topbar-action-text">
|
||||
<i class="pi pi-plus"></i>
|
||||
<span>发布</span>
|
||||
</router-link>
|
||||
<button type="button" class="layout-topbar-action" @click="toggleDarkMode">
|
||||
<i :class="['pi', { 'pi-moon': isDarkTheme, 'pi-sun': !isDarkTheme }]"></i>
|
||||
</button>
|
||||
@@ -118,10 +124,6 @@ onMounted(() => {
|
||||
<div class="layout-topbar-menu hidden lg:block">
|
||||
<div class="layout-topbar-menu-content">
|
||||
<template v-if="isLoggedIn">
|
||||
<router-link v-if="isTenantAdmin" :to="publishTo" class="layout-topbar-action layout-topbar-action-text">
|
||||
<i class="pi pi-plus"></i>
|
||||
<span>发布</span>
|
||||
</router-link>
|
||||
<router-link v-if="tenantApplyAction" :to="tenantApplyAction.to" class="layout-topbar-action layout-topbar-action-text">
|
||||
<i :class="tenantApplyAction.icon"></i>
|
||||
<span>{{ tenantApplyAction.label }}</span>
|
||||
|
||||
Reference in New Issue
Block a user