feat(client): 登录/注册页照原型重建,ds 真相源组件族统一全部屏
- 登录/注册(login.html/register.html 1:1):两栏卡片+品牌渐变面板+主题小衣服 pill(onSurface 变体)+记住我(记录并预填最近账号)+原型式 toast 校验; 登录 fidelity 1.4–2.1% 三主题全绿;注册暂不入闸(少 门店编号/兑换券 字段, 已记 CONTRACT,screens.mjs 留存根) - ds 原子补齐:DsToast(.toast 单例)/DsCheck(.check/.agree)/DsButton lg 档/ DsSelect 替换全部旧 DropdownButton/DsField label 在上/DsInput 后缀与密码形态 - 全屏统一:对话框按钮全 DsButton、盒式输入主题钉死(visualDensity.standard、 h38、InputDecorationTheme 渗漏修复)、图标全 lucide、JetBrains Mono 三端同源、 BrandMark 真相源 logo、只读模式写操作全量守卫(WriteGuard+DsToast) - 出入库列表:版式对齐原型(卡片对齐+搜索框居中)、KPI 近30天滚动、结清后 失效财务应收应付表;商品编辑抽屉介绍库改搜索下拉、图片双击全屏预览 - 删除旧 UI 死代码:DataTableCard/FormDialog/PageScaffold/SearchChip/ SelectProductDialog/tabStateProvider - golden/fidelity:stock-in/out 补注册(9%)、login 入册(8%)、goldens 全量重打; 修复 pubspec flutter_web_plugins 非法声明(CI pub get 阻断) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../core/theme/context_tokens.dart';
|
||||
import '../core/theme/app_dims.g.dart';
|
||||
import '../core/theme/app_fonts.dart';
|
||||
|
||||
/// 右侧滑入抽屉呈现(对齐原型 .drawer / .drawer-mask)。
|
||||
/// useRootNavigator:false → 只覆盖内容区(分支 Navigator),不盖侧栏/顶栏。
|
||||
const _kDrawerMask = Color(0x52000000); // ds-ignore: .drawer-mask 遮罩固定色(黑 32%)
|
||||
|
||||
Future<T?> showOrderDetailDrawer<T>(
|
||||
BuildContext context, {
|
||||
required WidgetBuilder builder,
|
||||
@@ -16,7 +20,8 @@ Future<T?> showOrderDetailDrawer<T>(
|
||||
useRootNavigator: false,
|
||||
barrierDismissible: true,
|
||||
barrierLabel: '关闭',
|
||||
barrierColor: Colors.black.withValues(alpha: 0.32), // .drawer-mask scrim
|
||||
// .drawer-mask scrim(抽屉遮罩固定色)
|
||||
barrierColor: _kDrawerMask,
|
||||
transitionDuration: const Duration(milliseconds: 250),
|
||||
pageBuilder: (ctx, _, __) {
|
||||
final w = math.min(600.0, MediaQuery.of(ctx).size.width * 0.94);
|
||||
@@ -99,8 +104,8 @@ class OrderDetailDrawer extends StatelessWidget {
|
||||
// ── 头:单号 + 关闭 ──(.drawer-head)
|
||||
Container(
|
||||
padding: const EdgeInsets.fromLTRB(20, 18, 16, 18),
|
||||
decoration:
|
||||
BoxDecoration(border: Border(bottom: BorderSide(color: t.border))),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: t.border))),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -111,7 +116,7 @@ class OrderDetailDrawer extends StatelessWidget {
|
||||
color: t.heading)),
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.close, size: 22, color: t.muted),
|
||||
icon: Icon(LucideIcons.x, size: 22, color: t.muted),
|
||||
splashRadius: 20,
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
@@ -125,7 +130,8 @@ class OrderDetailDrawer extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// ── 信息行(.drow)──
|
||||
for (final r in infoRows) _DrawerRow(label: r.label, value: r.value),
|
||||
for (final r in infoRows)
|
||||
_DrawerRow(label: r.label, value: r.value),
|
||||
// ── 明细标题 ──
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 16, 0, 8),
|
||||
@@ -146,7 +152,8 @@ class OrderDetailDrawer extends StatelessWidget {
|
||||
Text(totalText,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppFonts.mono,
|
||||
fontFamilyFallback: AppFonts.monoFallback,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: t.accent)),
|
||||
],
|
||||
@@ -217,7 +224,8 @@ class _LinesTable extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 9),
|
||||
decoration: BoxDecoration(
|
||||
color: t.thBg,
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(6)),
|
||||
borderRadius:
|
||||
const BorderRadius.vertical(top: Radius.circular(6)),
|
||||
),
|
||||
child: _lineRow(
|
||||
context,
|
||||
@@ -251,7 +259,8 @@ class _LinesTable extends StatelessWidget {
|
||||
Text(lines[i].code,
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsXs,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppFonts.mono,
|
||||
fontFamilyFallback: AppFonts.monoFallback,
|
||||
color: t.faint)),
|
||||
],
|
||||
),
|
||||
@@ -269,7 +278,9 @@ class _LinesTable extends StatelessWidget {
|
||||
),
|
||||
c3: Text(lines[i].qty,
|
||||
textAlign: TextAlign.right,
|
||||
style: const TextStyle(fontFamily: 'monospace')),
|
||||
style: const TextStyle(
|
||||
fontFamily: AppFonts.mono,
|
||||
fontFamilyFallback: AppFonts.monoFallback)),
|
||||
c4: _priceCell(context, lines[i].price, lines[i].pending),
|
||||
c5: _priceCell(context, lines[i].amount, lines[i].pending,
|
||||
accent: true),
|
||||
@@ -297,7 +308,8 @@ class _LinesTable extends StatelessWidget {
|
||||
return Text(text,
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppFonts.mono,
|
||||
fontFamilyFallback: AppFonts.monoFallback,
|
||||
fontWeight: accent ? FontWeight.w700 : FontWeight.w400,
|
||||
color: accent ? t.text : t.text));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user