feat(client): 抽屉+设置页加退出登录入口;酒行信息显示微信号

- 左侧抽屉底部、系统设置页底部各加「退出登录」按钮(窄屏顶栏菜单
  不便时也能退出;登出后路由 redirect 自动跳 /login)
- 酒行信息 tab 补显示「微信号」行(模型/编辑弹窗早已支持 wechat_id,
  仅只读展示遗漏)

121 测试通过。todo #54 #55。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-16 22:26:17 +08:00
parent cd672e500f
commit e8bdb19195
4 changed files with 126 additions and 5 deletions
@@ -78,6 +78,28 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
],
),
),
// 退出登录(常驻底部;登出后路由 redirect 自动跳 /login
const Divider(height: 1),
SafeArea(
top: false,
child: Padding(
padding: const EdgeInsets.fromLTRB(16, 8, 16, 12),
child: SizedBox(
width: double.infinity,
child: OutlinedButton.icon(
onPressed: () =>
ref.read(authStateProvider.notifier).logout(),
icon: const Icon(Icons.logout, size: 18),
label: const Text('退出登录'),
style: OutlinedButton.styleFrom(
foregroundColor: AppTheme.danger,
side: const BorderSide(color: AppTheme.danger),
padding: const EdgeInsets.symmetric(vertical: 12),
),
),
),
),
),
],
),
);
@@ -154,6 +176,10 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
label: '负责人',
value:
shop.managerName.isNotEmpty ? shop.managerName : ''),
const Divider(height: 16),
_ShopInfoRow(
label: '微信号',
value: shop.wechatId.isNotEmpty ? shop.wechatId : ''),
],
),
),
+13
View File
@@ -142,6 +142,19 @@ class _AppShellState extends ConsumerState<AppShell> {
}).toList(),
),
),
// 退出登录(抽屉底部常驻,窄屏顶栏菜单不便时也能退出)
const Divider(height: 1, color: Colors.white24),
ListTile(
leading: const Icon(Icons.logout, color: Colors.white70),
title: const Text('退出登录',
style: TextStyle(
color: Colors.white, fontWeight: FontWeight.w500)),
onTap: () {
Navigator.pop(context); // 关闭抽屉
ref.read(authStateProvider.notifier).logout();
context.go('/login');
},
),
],
),
),
+59 -3
View File
@@ -223,10 +223,10 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
<h1>酒库管理系统 — 项目 TODO</h1>
<div class="header-meta">生成于 2026-06-16 · 真相源 todo/todo.json</div>
<div class="stats">
<div class="stat-pill"><strong>49</strong>全部</div>
<div class="stat-pill"><strong>51</strong>全部</div>
<div class="stat-pill"><strong>1</strong>待开始</div>
<div class="stat-pill"><strong>0</strong>开发中</div>
<div class="stat-pill"><strong>34</strong>待验收</div>
<div class="stat-pill"><strong>36</strong>待验收</div>
<div class="stat-pill"><strong>14</strong>已验收</div>
</div>
</div>
@@ -318,7 +318,7 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
</div>
<div class="section-block" id="section-done">
<div class="section-title st-done" data-toggle="done">
🔍 待验收 <span class="s-count">34</span>
🔍 待验收 <span class="s-count">36</span>
<span class="s-arrow">▴ 收起</span>
</div>
<div class="section-list-wrap " id="list-wrap-done">
@@ -875,6 +875,62 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
<div class="card-footer">
<div class="tag-row"></div>
<div class="item-meta">
<span class="meta-date">🕐 2026-06-16</span>
</div>
</div>
</li>
<li class="todo-card s-done"
data-id="54"
data-level="mid"
data-status="done"
data-tier=""
data-tags="">
<div class="card-header">
<span class="item-title">左侧抽屉+系统设置页加退出登录按钮</span>
<div class="card-badges">
<span class="tag status-badge s-done">待验收</span>
<span class="tag t-high">重要</span>
<button class="reject-btn" data-id="54" data-title="左侧抽屉+系统设置页加退出登录按钮">拒绝验收</button>
</div>
</div>
<div class="card-footer">
<div class="tag-row"></div>
<div class="item-meta">
<span class="meta-date">🕐 2026-06-16</span>
</div>
</div>
</li>
<li class="todo-card s-done"
data-id="55"
data-level="mid"
data-status="done"
data-tier=""
data-tags="">
<div class="card-header">
<span class="item-title">酒行信息显示微信号</span>
<div class="card-badges">
<span class="tag status-badge s-done">待验收</span>
<span class="tag t-high">重要</span>
<button class="reject-btn" data-id="55" data-title="酒行信息显示微信号">拒绝验收</button>
</div>
</div>
<div class="card-footer">
<div class="tag-row"></div>
<div class="item-meta">
+28 -2
View File
@@ -1,9 +1,9 @@
{
"meta": {
"title": "酒库管理系统 — 项目 TODO",
"updated_at": "2026-06-16T14:20:07.674Z"
"updated_at": "2026-06-16T14:26:17.800Z"
},
"seq": 53,
"seq": 55,
"items": [
{
"id": 1,
@@ -842,6 +842,32 @@
"done": false,
"completed_at": null,
"version": null
},
{
"id": 54,
"title": "左侧抽屉+系统设置页加退出登录按钮",
"desc": null,
"level": "mid",
"tier": null,
"tags": [],
"status": "done",
"created_at": "2026-06-16T14:26:00.681Z",
"done": false,
"completed_at": null,
"version": null
},
{
"id": 55,
"title": "酒行信息显示微信号",
"desc": null,
"level": "mid",
"tier": null,
"tags": [],
"status": "done",
"created_at": "2026-06-16T14:26:00.735Z",
"done": false,
"completed_at": null,
"version": null
}
]
}