feat: phase1 UI prep — 设备ID系统传递 + 国家本地化展示 + 继续观看直进播放页

设备标识: Android SSAID/ iOS IDFV 原生通道 → Dart DeviceIdProvider
国家解析: 注册/登录从后端 IP → 国家/语言/时区/币种 自动落库
账号资料: 全部本地化展示 (account_display.dart)
我的页: 继续观看卡片点击直接进播放页
This commit is contained in:
Vicky authored and trae-solo-agent committed 2026-10-27 15:45:20 +08:00
1 parent 1b19513efb
commit a3f3481f4f
15 files changed
+468 -25

No files matched your search

+17 -1
View File
@@ -8,9 +8,10 @@ import 'package:shared_preferences_platform_interface/shared_preferences_async_p
/// 可控的系统设备标识来源。
class _FakeDeviceIdProvider implements DeviceIdProvider {
_FakeDeviceIdProvider(this.value);
_FakeDeviceIdProvider(this.value, {this.region});
final String? value;
final String? region;
int calls = 0;
@override
@@ -18,6 +19,9 @@ class _FakeDeviceIdProvider implements DeviceIdProvider {
calls++;
return value;
}
@override
Future<String?> deviceRegion() async => region;
}
void main() {
@@ -62,4 +66,16 @@ void main() {
expect(provider.calls, 1);
});
test('should_return_device_region_or_empty_string', () async {
final store = AuthSessionStore(
deviceIdProvider: _FakeDeviceIdProvider(null, region: 'TH'),
);
final missing = AuthSessionStore(
deviceIdProvider: _FakeDeviceIdProvider(null),
);
expect(await store.deviceRegion(), 'TH');
expect(await missing.deviceRegion(), '');
});
}