From fbc865c558cafc6371354c7d5c3259a35051010e Mon Sep 17 00:00:00 2001
From: npmrun <1549469775@qq.com>
Date: Sun, 19 Apr 2026 00:01:44 +0800
Subject: [PATCH] feat(nav): add Discover link for logged-in users
Made-with: Cursor
---
app/components/AppShell.vue | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/app/components/AppShell.vue b/app/components/AppShell.vue
index 3c83137..ec9880c 100644
--- a/app/components/AppShell.vue
+++ b/app/components/AppShell.vue
@@ -30,6 +30,7 @@ const displayName = computed(() => {
})
const homeNav = { label: '首页', to: '/', icon: 'i-lucide-house' } as const
+const discoverNav = { label: '发现', to: '/discover', icon: 'i-lucide-compass' } as const
const consoleSubNav = [
{ label: '资料', to: '/me/profile', icon: 'i-lucide-user-round' },
@@ -43,9 +44,12 @@ const consoleDropdownItems = computed(() => [
consoleSubNav.map((i) => ({ label: i.label, icon: i.icon, to: i.to })),
])
-/** 移动端汉堡菜单:首页 + 「控制台」分组下四个子项 */
+/** 移动端汉堡菜单:首页、发现 + 「控制台」分组下四个子项 */
const mobileMenuItems = computed(() => [
- [{ label: homeNav.label, icon: homeNav.icon, to: homeNav.to }],
+ [
+ { label: homeNav.label, icon: homeNav.icon, to: homeNav.to },
+ { label: discoverNav.label, icon: discoverNav.icon, to: discoverNav.to },
+ ],
[{ type: 'label' as const, label: '控制台' }, ...consoleSubNav.map((i) => ({ label: i.label, icon: i.icon, to: i.to }))],
])
@@ -133,6 +137,18 @@ async function logout() {
navActive(homeNav.to) ? 'bg-elevated text-highlighted' : 'text-muted',
]"
/>
+