fix: DNS 用 sing-box 1.12+ 新格式 + 引导仅首次显示
- 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:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user