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:
@@ -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 : '—'),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user