From dfe9796ae8d998cea8f2a78dcd8d5424bdaf0e48 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Thu, 25 Jun 2026 06:21:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor(client):=20=E8=A3=B8=E8=89=B2=E5=AD=97?= =?UTF-8?q?=E9=9D=A2=E9=87=8F=20F0F6FF/F0F4FF=20=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 入库选填区/退单提示条 F0F6FF → infoSoft;表格列头 F0F4FF → thBg; 登录历史项/外壳用户菜单 hover → rowHover、菜单文字 → text。 深色主题 B / 暖色主题 C 下这些 chrome 现可正确随主题换色。 Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX --- client/lib/screens/auth/login_screen.dart | 2 +- client/lib/screens/inventory/inventory_check_screen.dart | 4 ++-- client/lib/screens/shell/app_shell.dart | 4 ++-- client/lib/screens/stock_in/stock_in_form_screen.dart | 4 ++-- client/lib/screens/stock_in/stock_in_list_screen.dart | 2 +- client/lib/screens/stock_out/stock_out_form_screen.dart | 6 +++--- client/lib/widgets/data_table_card.dart | 2 +- client/lib/widgets/order_return_dialog.dart | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/lib/screens/auth/login_screen.dart b/client/lib/screens/auth/login_screen.dart index 9ba3a3b..0b4e0b2 100644 --- a/client/lib/screens/auth/login_screen.dart +++ b/client/lib/screens/auth/login_screen.dart @@ -714,7 +714,7 @@ class _HistoryMenuItemState extends State<_HistoryMenuItem> { onExit: (_) => setState(() => _hovered = false), cursor: SystemMouseCursors.click, child: Material( - color: _hovered ? const Color(0xFFF0F4FF) : Colors.white, + color: _hovered ? context.tokens.rowHover : context.tokens.surface, child: InkWell( onTap: widget.onSelected, child: Padding( diff --git a/client/lib/screens/inventory/inventory_check_screen.dart b/client/lib/screens/inventory/inventory_check_screen.dart index 8bceacf..f8bc6c8 100644 --- a/client/lib/screens/inventory/inventory_check_screen.dart +++ b/client/lib/screens/inventory/inventory_check_screen.dart @@ -353,8 +353,8 @@ class _InventoryCheckScreenState extends ConsumerState { }, children: [ TableRow( - decoration: const BoxDecoration( - color: Color(0xFFF0F4FF)), + decoration: BoxDecoration( + color: context.tokens.thBg), children: [ '序号', '商品编码', diff --git a/client/lib/screens/shell/app_shell.dart b/client/lib/screens/shell/app_shell.dart index 3d46288..c9adf4c 100644 --- a/client/lib/screens/shell/app_shell.dart +++ b/client/lib/screens/shell/app_shell.dart @@ -1012,8 +1012,8 @@ class _HoverMenuItemState extends State<_HoverMenuItem> { @override Widget build(BuildContext context) { - const color = Color(0xFF333333); - const hoverBg = Color(0xFFF0F4FF); + final color = context.tokens.text; + final hoverBg = context.tokens.rowHover; return MouseRegion( onEnter: (_) => setState(() => _hovered = true), diff --git a/client/lib/screens/stock_in/stock_in_form_screen.dart b/client/lib/screens/stock_in/stock_in_form_screen.dart index e5064a8..62e8e3c 100644 --- a/client/lib/screens/stock_in/stock_in_form_screen.dart +++ b/client/lib/screens/stock_in/stock_in_form_screen.dart @@ -984,7 +984,7 @@ class _StockInFormScreenState extends ConsumerState { color: context.tokens.primaryDark)), ); return Container( - color: const Color(0xFFF0F4FF), + color: context.tokens.thBg, child: Row(children: [ SizedBox(width: 36, child: th('序号')), Expanded(flex: 18, child: th('名称')), @@ -1115,7 +1115,7 @@ class _StockInFormScreenState extends ConsumerState { Widget _buildOptionalSection(_ItemRow item) { return Container( decoration: BoxDecoration( - color: const Color(0xFFF0F6FF), + color: context.tokens.infoSoft, border: Border(left: BorderSide(color: context.tokens.primary, width: 3)), ), padding: const EdgeInsets.fromLTRB(16, 10, 16, 14), diff --git a/client/lib/screens/stock_in/stock_in_list_screen.dart b/client/lib/screens/stock_in/stock_in_list_screen.dart index 416b34f..4e12149 100644 --- a/client/lib/screens/stock_in/stock_in_list_screen.dart +++ b/client/lib/screens/stock_in/stock_in_list_screen.dart @@ -1201,7 +1201,7 @@ class _StockInDetailDialogState extends ConsumerState<_StockInDetailDialog> { }, children: [ TableRow( - decoration: const BoxDecoration(color: Color(0xFFF0F4FF)), + decoration: BoxDecoration(color: context.tokens.thBg), children: ['序号', '商品编码', '名称', '系列', '规格', '生产日期', '批次号', '数量', '单价', '金额'] .map((h) => Padding( padding: const EdgeInsets.symmetric( diff --git a/client/lib/screens/stock_out/stock_out_form_screen.dart b/client/lib/screens/stock_out/stock_out_form_screen.dart index 821854b..0ab608c 100644 --- a/client/lib/screens/stock_out/stock_out_form_screen.dart +++ b/client/lib/screens/stock_out/stock_out_form_screen.dart @@ -671,8 +671,8 @@ class _StockOutFormScreenState extends ConsumerState { }, children: [ TableRow( - decoration: const BoxDecoration( - color: Color(0xFFF0F4FF)), + decoration: BoxDecoration( + color: context.tokens.thBg), children: [ '序号', '商品编码', @@ -1091,7 +1091,7 @@ class _InventoryPickerDialogState ), // Table header Container( - color: const Color(0xFFF0F4FF), + color: context.tokens.thBg, padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), child: Row( children: [ diff --git a/client/lib/widgets/data_table_card.dart b/client/lib/widgets/data_table_card.dart index eddd7ab..31f93b5 100644 --- a/client/lib/widgets/data_table_card.dart +++ b/client/lib/widgets/data_table_card.dart @@ -150,7 +150,7 @@ class _DataTableCardState extends State { TableRow _buildHeaderRow() { return TableRow( - decoration: const BoxDecoration(color: Color(0xFFF0F4FF)), + decoration: BoxDecoration(color: context.tokens.thBg), children: widget.columns.map((col) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), diff --git a/client/lib/widgets/order_return_dialog.dart b/client/lib/widgets/order_return_dialog.dart index 760dd5e..02dea30 100644 --- a/client/lib/widgets/order_return_dialog.dart +++ b/client/lib/widgets/order_return_dialog.dart @@ -270,7 +270,7 @@ class _OrderReturnDialogState extends State<_OrderReturnDialog> { margin: const EdgeInsets.fromLTRB(16, 2, 16, 8), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), decoration: BoxDecoration( - color: const Color(0xFFF0F6FF), + color: context.tokens.infoSoft, border: Border(left: BorderSide(color: context.tokens.primary, width: 3)), borderRadius: BorderRadius.circular(4), ),