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:
Cookiues committed 2026-09-29 02:43:39 +08:00
1 parent 4dddfdc00c
commit 5d16984e4e
9 files changed
+772 -190

No files matched your search

+54 -36
View File
@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import '../config/responsive.dart';
import '../config/strings.dart';
import '../widgets/app_card.dart';
import '../widgets/app_notice.dart';
class AboutPage extends StatelessWidget {
const AboutPage({super.key});
@@ -16,16 +18,20 @@ class AboutPage extends StatelessWidget {
context,
child: Column(
children: [
const SizedBox(height: 32),
Icon(Icons.qr_code_scanner, size: 64, color: theme.colorScheme.primary),
const SizedBox(height: 16),
const SizedBox(height: 24),
Icon(
Icons.qr_code_scanner,
size: 56,
color: theme.colorScheme.primary,
),
const SizedBox(height: 12),
Text(
AppStrings.aboutTitle,
style: theme.textTheme.headlineSmall?.copyWith(
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 8),
const SizedBox(height: 6),
Text(
AppStrings.aboutDesc,
style: theme.textTheme.bodyMedium?.copyWith(
@@ -33,49 +39,63 @@ class AboutPage extends StatelessWidget {
),
textAlign: TextAlign.center,
),
const SizedBox(height: 24),
Card(
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(
color: theme.colorScheme.outline.withValues(alpha: 0.3),
),
const SizedBox(height: 28),
AppCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SectionTitle(
icon: Icons.info_outline,
title: AppStrings.aboutBasics,
),
const SizedBox(height: 14),
_row(theme, AppStrings.creditBuiltWith, 'Flutter'),
_row(
theme,
AppStrings.aboutPlatforms,
'Android · iOS · Windows · macOS · Linux',
),
_row(theme, AppStrings.aboutPackageId, 'dev.naominet.ichino'),
_row(theme, AppStrings.creditLicense, 'MIT'),
],
),
child: Padding(
padding: const EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppStrings.credits,
style: theme.textTheme.labelLarge?.copyWith(
color: theme.colorScheme.primary,
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 12),
_creditRow(theme, AppStrings.creditBuiltWith, 'Flutter'),
_creditRow(theme, AppStrings.creditQRDecode, 'jsQR (web)'),
_creditRow(theme, AppStrings.creditIconAssets, 'assets2.lxns.net'),
_creditRow(theme, AppStrings.creditLicense, 'MIT'),
],
),
),
const SizedBox(height: 12),
AppCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SectionTitle(
icon: Icons.group_outlined,
title: AppStrings.credits,
),
const SizedBox(height: 14),
_row(theme, AppStrings.creditProtocol, 'empurple · eaquira'),
_row(theme, AppStrings.creditB50, 'Empurple'),
_row(theme, AppStrings.creditQRDecode, '原生 MethodChannel'),
_row(theme, AppStrings.creditIconAssets, 'assets2.lxns.net'),
],
),
),
const SizedBox(height: 12),
const AppNotice(
AppStrings.aboutRiskNotice,
icon: Icons.warning_amber_rounded,
),
],
),
),
);
}
Widget _creditRow(ThemeData theme, String label, String value) {
Widget _row(ThemeData theme, String label, String value) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 6),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 120,
width: 104,
child: Text(
label,
style: theme.textTheme.bodySmall?.copyWith(
@@ -83,9 +103,7 @@ class AboutPage extends StatelessWidget {
),
),
),
Expanded(
child: Text(value, style: theme.textTheme.bodyMedium),
),
Expanded(child: Text(value, style: theme.textTheme.bodyMedium)),
],
),
);