Browse Source

fix(public-layout): no login link in header; fix logged-in false 登录

Made-with: Cursor
main
npmrun 8 hours ago
parent
commit
49ab8fef62
  1. 9
      app/layouts/public.vue

9
app/layouts/public.vue

@ -16,7 +16,7 @@ const profileSlug = computed(() => {
return typeof s === 'string' && s.length ? s : ''
})
/** 顶栏「控制台」仅在看自己的 /@slug 时显示;浏览他人主页时隐藏 */
/** 顶栏「控制台」仅在看自己的 /@slug 时显示;浏览他人主页时不显示控制台也不显示登录 */
const showPublicConsoleLink = computed(() => {
if (!loggedIn.value || !user.value) {
return false
@ -171,13 +171,6 @@ onMounted(() => {
>
控制台
</NuxtLink>
<NuxtLink
v-else
to="/login"
class="text-muted hover:text-default whitespace-nowrap"
>
登录
</NuxtLink>
</div>
</UContainer>
</header>

Loading…
Cancel
Save