fix: DNS 用 sing-box 1.12+ 新格式 + 引导仅首次显示
ci-pangolin / Lint — shellcheck (push) Has been cancelled
ci-pangolin / OpenAPI Sync Check (push) Has been cancelled
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Has been cancelled
ci-pangolin / Flutter — analyze + test (push) Has been cancelled

- clientconfig/mockserver:客户端配置 DNS 从 legacy address 串格式改为
  type+server 新格式(sing-box 1.13 对 legacy DNS 直接 FATAL,导致连不上)
- 引导页只首次:TokenStore 加 markOnboarded/isOnboarded;main.dart 登录后
  若已引导过直接进主界面,不再每次都弹引导

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-18 21:20:11 +08:00
parent 25c7bd75aa
commit df72ad60f4
4 changed files with 27 additions and 5 deletions
+5
View File
@@ -13,6 +13,7 @@ class TokenStore {
static const _kAccess = 'pangolin_access_token';
static const _kRefresh = 'pangolin_refresh_token';
static const _kOnboarded = 'pangolin_onboarded';
Future<void> saveTokens({
required String access,
@@ -29,4 +30,8 @@ class TokenStore {
await _storage.delete(key: _kAccess);
await _storage.delete(key: _kRefresh);
}
// 首次引导标记:引导页只在第一次看(看完置位,后续登录直接进主界面)。
Future<void> markOnboarded() => _storage.write(key: _kOnboarded, value: '1');
Future<bool> isOnboarded() async => (await _storage.read(key: _kOnboarded)) == '1';
}