feat(client): 授权管理独立一级屏——授权/购买续费/订单管理三 tab(桌面+移动)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
// screens/settings/settings_screen.dart — 系统设置(照原型 settings.html 重建)。
|
||||
// 布局:.head + .settings grid(左 .subnav 200px + 右面板卡)。子导航 5 项 =
|
||||
// 原型 4(门店信息/用户管理/授权管理/偏好设置)+ 保留真实功能「编号规则」。
|
||||
// 布局:.head + .settings grid(左 .subnav 200px + 右面板卡)。子导航 4 项 =
|
||||
// 原型 3(门店信息/用户管理/偏好设置)+ 保留真实功能「编号规则」。
|
||||
// 用户管理面板 = 预览表 + 「管理全部用户」→ /settings/users 独立页(原型 users.html)。
|
||||
// 原「系统参数」假设置(本地 state 不落后端)已按用户口径删除。
|
||||
// 窄屏(原型 m-settings.html):hub 形态三组(门店/偏好/数据),标题在壳顶栏;
|
||||
// 门店信息/编号规则/默认仓库走底部 sheet;?tab= 深链窄屏忽略(无面板可落)。
|
||||
// 授权入口不在此(拍板:授权在「我的」系统组 /me/license)。
|
||||
// 授权管理 2026-07-10 提升为独立一级屏(桌面侧边栏「系统」组 /license,
|
||||
// 移动「我的」系统组 /me/license),已从本屏子导航摘除。
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@@ -32,14 +33,13 @@ import '../../widgets/ds/m_hub.dart';
|
||||
import '../../widgets/ds/m_sheet.dart';
|
||||
import '../../widgets/theme_sheet.dart';
|
||||
import '../../widgets/write_guard.dart';
|
||||
import 'license_panel.dart';
|
||||
import 'settings_card.dart';
|
||||
import 'users_screen.dart' show userRoleBadge, userStatusBadge;
|
||||
import '../../core/theme/app_fonts.dart';
|
||||
import '../../widgets/ds/ds_toast.dart';
|
||||
|
||||
class SettingsScreen extends ConsumerStatefulWidget {
|
||||
/// 初始面板:{shop:0, users:1, number:2, license:3, pref:4}
|
||||
/// 初始面板:{shop:0, users:1, number:2, pref:3}
|
||||
final int initialTab;
|
||||
const SettingsScreen({super.key, this.initialTab = 0});
|
||||
|
||||
@@ -50,11 +50,10 @@ class SettingsScreen extends ConsumerStatefulWidget {
|
||||
class _SettingsScreenState extends ConsumerState<SettingsScreen> {
|
||||
static const _navs = [
|
||||
// 图标对齐原型 subnav sprite:i-ic44=house / i-ic45=user-plus /
|
||||
// i-ic07=trending-up / i-ic46=contrast(编号规则为 app 专属项,用 hash)
|
||||
// i-ic46=contrast(编号规则为 app 专属项,用 hash)
|
||||
(LucideIcons.house, '门店信息'),
|
||||
(LucideIcons.userPlus, '用户管理'),
|
||||
(LucideIcons.hash, '编号规则'),
|
||||
(LucideIcons.trendingUp, '授权管理'),
|
||||
(LucideIcons.contrast, '偏好设置'),
|
||||
];
|
||||
late int _panel = widget.initialTab.clamp(0, _navs.length - 1);
|
||||
@@ -355,8 +354,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
|
||||
0 => const _StoreInfoPanel(),
|
||||
1 => _usersPanel(),
|
||||
2 => _numberPanel(),
|
||||
3 => const LicensePanel(),
|
||||
4 => const _PrefPanel(),
|
||||
3 => const _PrefPanel(),
|
||||
_ => const SizedBox(),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user