release: 发布v6.6.2版本,优化多项功能与体验

本次更新包含:
1.  更新应用标语与隐私政策文案,调整品牌宣传语
2.  重构Feed ID解析、HTML清理工具类,提取重复逻辑
3.  新增全屏图片查看器、通用动画操作按钮组件
4.  修复电池监听空指针、快捷操作异常捕获问题
5.  优化搜索、会话列表、RSS阅读器等页面体验
6.  完善多语言支持,新增多个翻译模块
7.  移除冗余代码,统一数字格式化逻辑
8.  调整登录页面布局与交互逻辑
This commit is contained in:
Developer
2026-06-01 08:16:01 +08:00
parent 5a083bdbab
commit 182735df3b
66 changed files with 9319 additions and 1694 deletions

View File

@@ -3,7 +3,7 @@
/// 创建时间: 2026-04-28
/// 更新时间: 2026-06-01
/// 作用: 用户登录界面,支持密码/验证码/Token/老用户/二维码登录
/// 上次更新: 接入多语言翻译系统,替换硬编码中文文本
/// 上次更新: 老用户登录按钮替换微信登录位置,使用次要色显示
/// ============================================================
import 'package:flutter/cupertino.dart';
@@ -45,6 +45,7 @@ class LoginPage extends ConsumerStatefulWidget {
class _LoginPageState extends ConsumerState<LoginPage>
with TickerProviderStateMixin {
_LoginMode _loginMode = _LoginMode.password;
_LoginMode _segmentMode = _LoginMode.password;
bool _isRegisterMode = false;
final _accountController = TextEditingController();
@@ -91,7 +92,12 @@ class _LoginPageState extends ConsumerState<LoginPage>
}
void _switchLoginMode(_LoginMode mode) {
setState(() => _loginMode = mode);
setState(() {
_loginMode = mode;
if (mode != _LoginMode.legacy) {
_segmentMode = mode;
}
});
_pageController.animateToPage(
mode.index,
duration: const Duration(milliseconds: 350),
@@ -309,7 +315,7 @@ class _LoginPageState extends ConsumerState<LoginPage>
width: double.infinity,
height: 36,
child: CupertinoSlidingSegmentedControl<_LoginMode>(
groupValue: _loginMode,
groupValue: _segmentMode,
onValueChanged: (v) {
if (v != null) _switchLoginMode(v);
},
@@ -329,11 +335,6 @@ class _LoginPageState extends ConsumerState<LoginPage>
CupertinoIcons.lock_shield,
auth.token,
),
_LoginMode.legacy: _buildSegmentItem(
ext,
CupertinoIcons.person_2,
auth.legacyUser,
),
},
),
);
@@ -383,7 +384,13 @@ class _LoginPageState extends ConsumerState<LoginPage>
controller: _pageController,
physics: const BouncingScrollPhysics(),
onPageChanged: (index) {
setState(() => _loginMode = _LoginMode.values[index]);
final mode = _LoginMode.values[index];
setState(() {
_loginMode = mode;
if (mode != _LoginMode.legacy) {
_segmentMode = mode;
}
});
},
children: [
PasswordFormSection(
@@ -480,11 +487,10 @@ class _LoginPageState extends ConsumerState<LoginPage>
const SizedBox(width: AppSpacing.lg),
_buildSocialButton(
ext,
icon: CupertinoIcons.chat_bubble_2_fill,
label: auth.wechat,
disabled: true,
auth: auth,
common: common,
icon: CupertinoIcons.person_2,
label: auth.legacyUser,
accentColor: Theme.of(context).colorScheme.secondary,
onTap: () => _switchLoginMode(_LoginMode.legacy),
),
const SizedBox(width: AppSpacing.lg),
_buildSocialButton(
@@ -509,7 +515,23 @@ class _LoginPageState extends ConsumerState<LoginPage>
VoidCallback? onTap,
TAuth? auth,
TCommon? common,
Color? accentColor,
}) {
final effectiveIconColor = disabled
? ext.textDisabled
: (accentColor ?? ext.iconPrimary);
final effectiveBorderColor = disabled
? ext.textHint.withValues(alpha: 0.1)
: (accentColor != null
? accentColor.withValues(alpha: 0.3)
: ext.textHint.withValues(alpha: 0.2));
final effectiveLabelColor = disabled
? ext.textDisabled
: (accentColor ?? ext.textSecondary);
final effectiveBgColor = accentColor != null && !disabled
? accentColor.withValues(alpha: 0.08)
: ext.bgCard;
return GestureDetector(
onTap: disabled
? null
@@ -537,27 +559,17 @@ class _LoginPageState extends ConsumerState<LoginPage>
height: 52,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: ext.bgCard,
border: Border.all(
color: disabled
? ext.textHint.withValues(alpha: 0.1)
: ext.textHint.withValues(alpha: 0.2),
),
color: effectiveBgColor,
border: Border.all(color: effectiveBorderColor),
),
child: Center(
child: Icon(
icon,
size: 24,
color: disabled ? ext.textDisabled : ext.iconPrimary,
),
child: Icon(icon, size: 24, color: effectiveIconColor),
),
),
const SizedBox(height: 4),
Text(
label,
style: AppTypography.caption2.copyWith(
color: disabled ? ext.textDisabled : ext.textSecondary,
),
style: AppTypography.caption2.copyWith(color: effectiveLabelColor),
),
],
),