fix: 登录按钮对认不出的输入给出提示,不再静默无反应

- SGWCMAID 前缀改成按粘贴原文判断:令牌取的是内容的后 64 位,粘贴内容一旦超过
  64 位,前缀就被截掉了,原先对截取结果做 startsWith 会直接 return,
  点按钮看着能点却一声不响
- 补 test/login_page_test.dart 覆盖两条输入路径:不认识的令牌给提示,
  连接信息把按钮切成「恢复会话」
This commit is contained in:
Cookiues committed 2026-09-29 13:30:06 +08:00
1 parent 5d16984e4e
commit e74bb792bd
3 files changed
+80 -32

No files matched your search

+1
View File
@@ -21,6 +21,7 @@ class AppStrings {
static const qrScanError = '解析失败';
static const forcePreviewApi = '强制使用 Preview API';
static const loginFailed = '登录失败';
static const qrTokenUnrecognized = '没认出 QR 令牌(内容里应当含 SGWCMAID),也可以粘贴「连接信息」。';
static const requestFailed = '请求失败';
static const settingsTooltip = '设置';