diff --git a/frontend/src/layouts/PublicLayout.vue b/frontend/src/layouts/PublicLayout.vue index 0f420b6..b081cd6 100644 --- a/frontend/src/layouts/PublicLayout.vue +++ b/frontend/src/layouts/PublicLayout.vue @@ -28,10 +28,10 @@ const nav = computed(() => { // Avatar menu — only the surfaces the top nav doesn't already expose // (画图/图片 live in the bar, so they're intentionally left out here). const userMenu = [ - { to: '/mylogs', label: '生成日志' }, - { to: '/invite', label: '邀请返利' }, - { to: '/orders', label: '订单' }, - { to: '/settings', label: '设置' }, + { to: '/mylogs', label: '生成日志', icon: 'log' }, + { to: '/invite', label: '邀请返利', icon: 'team' }, + { to: '/orders', label: '订单', icon: 'receipt' }, + { to: '/settings', label: '设置', icon: 'config' }, ] const menuOpen = ref(false) // avatar dropdown @@ -47,6 +47,7 @@ onUnmounted(() => window.removeEventListener('scroll', onScroll)) // credits — the logged-in user's real server-side balance (auth.user.credits) const credits = computed(() => Number(auth.user?.credits || 0)) const creditsLabel = computed(() => pointsLabel(credits.value)) +const avatarChar = computed(() => Array.from(displayName.value)[0]?.toUpperCase() || '?') const displayName = computed(() => { const n = (auth.user?.name || '').trim() if (n) return n @@ -98,39 +99,46 @@ async function onLogout() {
- - - - - - - - - +
-
@@ -149,6 +157,7 @@ async function onLogout() {