feat: 实验性连接信息导出与会话恢复,重写关于页
- SessionShare:把 userId / JSESSIONID / token 打成 Base64(JSON),Cookie 只保留 JSESSIONID 一项,粘贴时容忍换行与空白,QR 令牌与乱码解不出来 - 主页底部新增「导出连接信息」卡片,标记实验性:内容未加密,字符串在手即可操作账号 - 登录页识别到连接信息时把登录按钮换成「恢复会话」,不必再扫 QR 令牌 - 恢复优先沿用导入的 JSESSIONID(不重发 UserLoginApi,免得顶掉机台上的登录), Cookie 失效才退回用 token 登录;验证 Cookie 时顺手拉到的 GetUserDataApi 结果 直接交给主页展示,省一次请求 - 仅凭 Cookie 恢复的会话没有 loginId / loginDateTime,_gameLogin 保持 null, 票据与风险页照旧提示「尚未登录游戏服务器」,主页顶部给出说明横幅 - 关于页改用 AppCard / SectionTitle 脚手架,补基本信息与风险提示,把过时的 「jsQR (web)」致谢换成原生 MethodChannel(QR 解码早已不走 web 库)
This commit is contained in:
1 parent
4dddfdc00c
commit
5d16984e4e
9 files changed
+772
-190
No files matched your search
+31
-6
@@ -11,10 +11,8 @@ class AppStrings {
|
||||
|
||||
// Login
|
||||
static const appTitle = 'Ichino';
|
||||
static const loginSubtitle = '扫描或输入二维码进行登录';
|
||||
static const qrCodeToken = 'QR Code 令牌';
|
||||
static const qrHint = '粘贴二维码解析内容...';
|
||||
static const qrParsedResult = '解析结果(截取后 64 位)';
|
||||
static const qrHint = '粘贴二维码解析内容... / 粘贴连接信息';
|
||||
static const uploadQR = '上传二维码';
|
||||
static const login = '登录';
|
||||
static const loggingIn = '登录中...';
|
||||
@@ -26,6 +24,26 @@ class AppStrings {
|
||||
static const requestFailed = '请求失败';
|
||||
static const settingsTooltip = '设置';
|
||||
|
||||
// 连接信息(实验性):uid + JSESSIONID + token 的 Base64 快照
|
||||
static const experimentalBadge = '实验性';
|
||||
static const connectionShareTitle = '导出连接信息';
|
||||
static const connectionShareDesc =
|
||||
'把用户 ID、JSESSIONID Cookie 与登录令牌打包成 Base64,'
|
||||
'在其他设备的登录页粘贴即可恢复会话。';
|
||||
static const connectionShareSecurity = '内容未加密,拿到这串字符的人可以直接操作该账号。';
|
||||
static const connectionShareCopy = '复制到剪贴板';
|
||||
static const connectionShareCopied = '连接信息已复制到剪贴板';
|
||||
static const connectionShareEmpty = '当前会话既没有 Cookie 也没有令牌,无法导出。';
|
||||
static const restoreSession = '恢复会话';
|
||||
static const restoringSession = '恢复中...';
|
||||
static const sessionShareDetected = '已识别为连接信息(实验性功能),点击「恢复会话」直接续上这次登录。';
|
||||
static const sessionRestoreFailed = '会话恢复失败';
|
||||
static const sessionRestoreCookie = '已复用连接信息里的 JSESSIONID,没有重新登录';
|
||||
static const sessionRestoreToken = 'Cookie 不可用,已用令牌重新登录';
|
||||
static const sessionRestoredNotice =
|
||||
'这是用连接信息恢复的会话:JSESSIONID 只用于读取数据,'
|
||||
'票据与风险页的写入操作需要先重新登录。';
|
||||
|
||||
// Home
|
||||
static const logoutTooltip = '退出登录';
|
||||
static const titleServerNotConfigured = '未配置 Title Server';
|
||||
@@ -115,8 +133,7 @@ class AppStrings {
|
||||
static const selectedTicket = '已选票';
|
||||
static const ticketUsed = '功能票使用完成';
|
||||
static const ticketCooldownSeconds = 60;
|
||||
static String ticketCooldownCountdown(int remaining) =>
|
||||
'冷却中,剩余 $remaining 秒';
|
||||
static String ticketCooldownCountdown(int remaining) => '冷却中,剩余 $remaining 秒';
|
||||
static String ticketCooldownNotice(int remaining) =>
|
||||
'登录后需冷却 $ticketCooldownSeconds 秒,剩余 $remaining 秒后可使用功能票。';
|
||||
|
||||
@@ -434,14 +451,22 @@ class AppStrings {
|
||||
static String best50Exported(String? path) =>
|
||||
path == null ? '图片已导出' : '图片已导出到 $path';
|
||||
static String best50ExportFailed(String error) => '导出失败: $error';
|
||||
static const best50Footer = 'Generated by Ichino. UI designed by chuxuehaocai.';
|
||||
static const best50Footer =
|
||||
'Generated by Ichino. UI designed by chuxuehaocai.';
|
||||
|
||||
// About
|
||||
static const aboutTitle = 'Ichino';
|
||||
static const aboutDesc = '基于 QR Code 的 maimai DX 街机网络登录客户端。';
|
||||
static const aboutBasics = '基本信息';
|
||||
static const aboutPlatforms = '支持平台';
|
||||
static const aboutPackageId = '应用标识';
|
||||
static const aboutRiskNotice =
|
||||
'「风险」页会向服务器发送伪造的 UpsertUserAllApi 数据包,属于高危操作,可能封号。';
|
||||
static const credits = '致谢';
|
||||
static const creditBuiltWith = '构建框架';
|
||||
static const creditQRDecode = 'QR 解码';
|
||||
static const creditB50 = 'B50 成绩图';
|
||||
static const creditProtocol = '协议实现参考';
|
||||
static const creditIconAssets = '图标资源';
|
||||
static const creditLicense = '许可证';
|
||||
}
|
||||
Reference in new issue
Block a user