feat(client): 设备数超限挡板 DeviceLimitScreen(#16 前端)

登录响应带 device_limit 时,顶层路由把用户挡在「移除设备」页,降到上限内才进主界面。

- auth_api.dart:AuthTokens 解析 device_limit;新增 DeviceLimit/DeviceBrief 模型
- auth_provider.dart:deviceLimitProvider(挡板状态);auth_screen 登录后置入
- main.dart:isLoggedIn 后若 deviceLimit!=null → DeviceLimitScreen(挡 HomeShell)
- screens/device_limit_screen.dart(新):设备列表(本机标注不可删)+ 每台移除
  + 一键「移除最久未用」+ 退出登录;降到上限内自动清挡板放行(复用 devicesProvider.remove)
- l10n:deviceLimitTitle/Desc/RemoveOldest(zh/en);顺带修 devicesSub 文案 5→3 台

analyze 干净;client 全量测试 161 通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-01 19:25:14 +08:00
parent 6bac7fd2f0
commit 34d980d875
8 changed files with 282 additions and 3 deletions
+4
View File
@@ -95,6 +95,10 @@ abstract class AppText {
String get devicesSub;
String get thisDevice;
String get remove;
// 设备数超上限挡板(#16):%s = 套餐设备上限数
String get deviceLimitTitle;
String get deviceLimitDesc; // "你的套餐最多 %s 台设备,移除一台以继续。"
String get deviceLimitRemoveOldest;
// 设备管理(P6):在线状态 / 操作 / 危险确认
String get devOnline;
String get devOffline;
+7 -1
View File
@@ -130,9 +130,15 @@ class StringsEn extends AppText {
@override
String get accChange => 'Change';
@override
String get deviceLimitTitle => 'Device limit reached';
@override
String get deviceLimitDesc => 'Your plan allows up to %s devices. Remove one to continue.';
@override
String get deviceLimitRemoveOldest => 'Remove least recently used';
@override
String get myDevices => 'My devices';
@override
String get devicesSub => 'Up to 5 devices on PRO';
String get devicesSub => 'Up to 3 devices on PRO';
@override
String get thisDevice => 'This device';
@override
+7 -1
View File
@@ -129,9 +129,15 @@ class StringsZh extends AppText {
@override
String get accChange => '修改';
@override
String get deviceLimitTitle => '设备数已达上限';
@override
String get deviceLimitDesc => '你的套餐最多 %s 台设备,请移除一台以继续。';
@override
String get deviceLimitRemoveOldest => '移除最久未用';
@override
String get myDevices => '我的设备';
@override
String get devicesSub => 'PRO 套餐最多 5 台设备同时在线';
String get devicesSub => 'PRO 套餐最多 3 台设备同时在线';
@override
String get thisDevice => '本机';
@override