refactor(client): SubScaffold 六合一(视觉零变化)+ tablet 注释订正 + 平板通知铃入口(#20)
This commit is contained in:
@@ -10,6 +10,7 @@ import '../screens/account_page.dart';
|
||||
import '../screens/connect_page.dart';
|
||||
import '../screens/contact_page.dart';
|
||||
import '../screens/nodes_page.dart';
|
||||
import '../screens/notifications_page.dart';
|
||||
import '../screens/settings_page.dart';
|
||||
import '../screens/stats_page.dart';
|
||||
import '../state/app_providers.dart';
|
||||
@@ -27,7 +28,7 @@ class TabletShell extends ConsumerWidget {
|
||||
final t = ref.watch(appTextProvider);
|
||||
final view = ref.watch(navViewProvider);
|
||||
|
||||
// 「我的」移到侧栏顶部品牌按钮(见 NavSidebar);设置/联系我们对齐桌面侧栏。
|
||||
// 「我的」经侧栏底部 PlanBadgeCard 进入(见 NavSidebar;品牌块本身不可点);设置/联系我们对齐桌面侧栏。
|
||||
final items = <NavSidebarItem>[
|
||||
(icon: PangolinIcons.power, label: t.tabConnect, view: NavView.connect),
|
||||
(icon: PangolinIcons.globe, label: t.tabServers, view: NavView.servers),
|
||||
@@ -61,11 +62,19 @@ class TabletShell extends ConsumerWidget {
|
||||
return const SettingsPage();
|
||||
case NavView.contact:
|
||||
return const ContactPage();
|
||||
case NavView.notifications:
|
||||
return NotificationsScreen(t: t, embedded: true);
|
||||
default: // account / plans / redeem / devices → 账户(其余下钻在账户页内)
|
||||
return const AccountPage(isWide: true);
|
||||
}
|
||||
}
|
||||
|
||||
// 通知子页返回目标:回账户(镜像桌面 desktop_shell.dart::backTarget)。
|
||||
VoidCallback? backTarget() {
|
||||
if (view == NavView.notifications) return () => go(NavView.account);
|
||||
return null;
|
||||
}
|
||||
|
||||
return ColoredBox(
|
||||
color: c.bg,
|
||||
// iPad 上内容会顶到状态栏(时间/电量/notch)。SafeArea 加顶部安全区,避开重叠;
|
||||
@@ -76,7 +85,13 @@ class TabletShell extends ConsumerWidget {
|
||||
NavSidebar(items: items, width: 232, dense: false),
|
||||
Expanded(
|
||||
child: Column(children: [
|
||||
ContentTopBar(title: titles[view] ?? t.tabMe, showThemeToggle: false, titleSize: 19),
|
||||
ContentTopBar(
|
||||
title: titles[view] ?? t.tabMe,
|
||||
onBack: backTarget(),
|
||||
onBell: () => go(NavView.notifications),
|
||||
showThemeToggle: false,
|
||||
titleSize: 19,
|
||||
),
|
||||
Expanded(child: content()),
|
||||
]),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user