feat(shell): 桌面侧栏加 Account 一级项 + 顶栏通知铃铛 + invite/notifications 视图接线

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-12 17:51:48 +08:00
parent b839c77712
commit df19629944
4 changed files with 62 additions and 1 deletions
+4
View File
@@ -36,6 +36,7 @@ class DesktopShell extends ConsumerWidget {
(icon: PangolinIcons.power, label: t.tabConnect, view: NavView.connect),
(icon: PangolinIcons.globe, label: t.tabServers, view: NavView.servers),
(icon: PangolinIcons.chartNoAxesColumn, label: t.tabStats, view: NavView.stats),
(icon: PangolinIcons.user, label: t.tabMe, view: NavView.account),
(icon: PangolinIcons.settings, label: t.settingsTitle, view: NavView.settings),
(icon: PangolinIcons.messageCircle, label: t.contactTitle, view: NavView.contact),
];
@@ -54,6 +55,7 @@ class DesktopShell extends ConsumerWidget {
NavView.payment: t.paymentTitle,
NavView.orders: t.ordersTitle,
NavView.invite: t.inviteTitle,
NavView.notifications: t.notifTitle,
};
void go(NavView v) => ref.read(navViewProvider.notifier).state = v;
@@ -98,6 +100,7 @@ class DesktopShell extends ConsumerWidget {
// 其余下钻子页(含 purchase 本身)→ account。
VoidCallback? backTarget() {
if (view == NavView.payment) return () => go(NavView.purchase);
if (view == NavView.notifications) return () => go(NavView.account);
if (kAccountSubViews.contains(view)) return () => go(NavView.account);
return null;
}
@@ -111,6 +114,7 @@ class DesktopShell extends ConsumerWidget {
ContentTopBar(
title: titles[view] ?? t.brand,
onBack: backTarget(),
onBell: () => go(NavView.notifications),
),
Expanded(child: content()),
]),