feat(client): tablet 外壳 + 视觉 diff 工作流文档
- tablet_shell: 侧栏 232·4 项触控(minHeight 48, 字号 15) + 顶栏无主题切换 + 连接页双栏 对照 ui_kits/tablet/tabapp.jsx;home_shell 分发 tablet→TabletShell - nav_sidebar 加 dense 参数(desktop 紧凑 / tablet 触控) - content_top_bar 加 showThemeToggle + titleSize 参数 - tool/visual-diff.md: 截图 diff 工作流(design-distill 工具)+ 实现侧三路径 现状(golden 被 google_fonts 阻塞 / screencapture 受 macOS chrome 限制)+ 推荐 注: tablet 形态在 macOS 桌面平台不触发(只 desktop/mobile),运行验证需 iPad。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,10 +12,12 @@ import '../state/nodes_provider.dart';
|
||||
import 'pangolin_icons.dart';
|
||||
|
||||
class ContentTopBar extends ConsumerWidget {
|
||||
const ContentTopBar({super.key, required this.title, this.onBack});
|
||||
const ContentTopBar({super.key, required this.title, this.onBack, this.showThemeToggle = true, this.titleSize = 17});
|
||||
|
||||
final String title;
|
||||
final VoidCallback? onBack;
|
||||
final bool showThemeToggle;
|
||||
final double titleSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
@@ -40,7 +42,7 @@ class ContentTopBar extends ConsumerWidget {
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
Text(title,
|
||||
style: PangolinText.h3.copyWith(color: c.fg1, fontWeight: FontWeight.w700, fontSize: 17)),
|
||||
style: PangolinText.h3.copyWith(color: c.fg1, fontWeight: FontWeight.w700, fontSize: titleSize)),
|
||||
const Spacer(),
|
||||
Text(
|
||||
conn.phase == VpnPhase.on ? '● ${node.code}' : '○',
|
||||
@@ -50,16 +52,18 @@ class ContentTopBar extends ConsumerWidget {
|
||||
color: conn.phase == VpnPhase.on ? c.success : c.fg3,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
InkWell(
|
||||
onTap: () => ref.read(themeModeProvider.notifier).state =
|
||||
isDark ? ThemeMode.light : ThemeMode.dark,
|
||||
borderRadius: BorderRadius.circular(PangolinRadius.sm),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: Icon(isDark ? PangolinIcons.sun : PangolinIcons.moon, size: 18, color: c.fg2),
|
||||
if (showThemeToggle) ...[
|
||||
const SizedBox(width: 12),
|
||||
InkWell(
|
||||
onTap: () => ref.read(themeModeProvider.notifier).state =
|
||||
isDark ? ThemeMode.light : ThemeMode.dark,
|
||||
borderRadius: BorderRadius.circular(PangolinRadius.sm),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: Icon(isDark ? PangolinIcons.sun : PangolinIcons.moon, size: 18, color: c.fg2),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user