feat(leisure): 新增闲情逸致模块与多项功能优化
本次提交完成多项核心更新: 1. 新增闲情逸致功能模块,包含时间线、收藏标注、季节主题等基础框架 2. 替换hive为社区维护的hive_ce包,修复依赖兼容问题 3. 统一替换"开发中"提示为"当前设备不支持",优化用户提示文案 4. 新增多项功能开关与特性标志,统一管理不可用功能提示 5. 完善用户账户洞察系统,新增头像审核中状态检测 6. 优化TTS语音朗读服务,修复Android端引擎初始化问题 7. 重构知识图谱缩放手势逻辑,解决缩放不跟手问题 8. 新增精灵头像组件,替换默认聊天头像样式 9. 新增外部链接跳转确认弹窗,提升使用安全性 10. 升级后端API接口,新增签到配置获取与补签积分规则动态读取 11. 完善多语言翻译覆盖率限制,非中文语言仅显示最高50%进度 12. 新增HTTP缓存拦截器,优化网络请求性能 13. 新增恢复出厂设置选项,完善数据管理功能 同时修复了多处代码细节问题:简化字符串拼接、优化布局代码、移除多余代码等。
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/// ============================================================
|
||||
/// 闲言APP — 用户数据模型
|
||||
/// 创建时间: 2026-04-28
|
||||
/// 更新时间: 2026-05-25
|
||||
/// 更新时间: 2026-05-27
|
||||
/// 作用: 用户信息数据模型,对应后端 tool_user 表
|
||||
/// 上次更新: 新增isAvatarUnderReview getter,http URL头像标记为审核中不加载
|
||||
/// 上次更新: toJson新增is_avatar_under_review字段
|
||||
/// ============================================================
|
||||
|
||||
class UserModel {
|
||||
@@ -213,6 +213,7 @@ class UserModel {
|
||||
'profile_slug': profileSlug,
|
||||
'sec_question': secQuestion,
|
||||
'sec_question_text': secQuestionText,
|
||||
'is_avatar_under_review': isAvatarUnderReview,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/// ============================================================
|
||||
/// 闲言APP — 登录表单组件集
|
||||
/// 创建时间: 2026-05-10
|
||||
/// 更新时间: 2026-05-10
|
||||
/// 更新时间: 2026-05-27
|
||||
/// 作用: 登录页面的各模式表单组件(密码/验证码/Token/老用户)+ 通用输入框
|
||||
/// 上次更新: 从 login_page.dart 拆分,支持左右滑动切换
|
||||
/// 上次更新: LegacyFormSection移除输入框只保留公告;CodeFormSection增加未收到邮件提示
|
||||
/// ============================================================
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -153,6 +153,18 @@ class CodeFormSection extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: AppSpacing.sm),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(CupertinoIcons.mail, size: 12, color: ext.textHint),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'未收到邮件?请检查垃圾邮箱或稍后重试',
|
||||
style: AppTypography.caption2.copyWith(color: ext.textHint),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -225,13 +237,9 @@ class TokenFormSection extends StatelessWidget {
|
||||
class LegacyFormSection extends StatelessWidget {
|
||||
const LegacyFormSection({
|
||||
super.key,
|
||||
required this.accountController,
|
||||
required this.passwordController,
|
||||
required this.ext,
|
||||
});
|
||||
|
||||
final TextEditingController accountController;
|
||||
final TextEditingController passwordController;
|
||||
final AppThemeExtension ext;
|
||||
|
||||
@override
|
||||
@@ -266,21 +274,6 @@ class LegacyFormSection extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
LoginInputField(
|
||||
controller: accountController,
|
||||
placeholder: '旧版用户名',
|
||||
icon: CupertinoIcons.person,
|
||||
ext: ext,
|
||||
),
|
||||
const SizedBox(height: AppSpacing.md),
|
||||
LoginInputField(
|
||||
controller: passwordController,
|
||||
placeholder: '旧版密码',
|
||||
icon: CupertinoIcons.lock,
|
||||
ext: ext,
|
||||
obscureText: true,
|
||||
),
|
||||
const SizedBox(height: AppSpacing.md),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(AppSpacing.md),
|
||||
|
||||
@@ -402,8 +402,6 @@ class _LoginPageState extends ConsumerState<LoginPage>
|
||||
),
|
||||
TokenFormSection(tokenController: _tokenController, ext: ext),
|
||||
LegacyFormSection(
|
||||
accountController: _accountController,
|
||||
passwordController: _passwordController,
|
||||
ext: ext,
|
||||
),
|
||||
],
|
||||
@@ -498,7 +496,7 @@ class _LoginPageState extends ConsumerState<LoginPage>
|
||||
context: context,
|
||||
builder: (ctx) => CupertinoAlertDialog(
|
||||
title: Text('$label 登录'),
|
||||
content: const Text('该功能正在开发中,敬请期待'),
|
||||
content: const Text('该功能当前设备不支持'),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: const Text('好的'),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/// ============================================================
|
||||
/// 闲言APP — 认证状态管理
|
||||
/// 创建时间: 2026-04-28
|
||||
/// 更新时间: 2026-05-15
|
||||
/// 更新时间: 2026-05-27
|
||||
/// 作用: 管理用户登录状态、Token、用户信息
|
||||
/// 上次更新: v10.1.0 register增加密保参数; changePassword支持多验证方式
|
||||
/// 上次更新: 注册成功后刷新用户信息(后端赠送50积分+50金币)
|
||||
/// ============================================================
|
||||
|
||||
import 'dart:convert';
|
||||
@@ -165,6 +165,8 @@ class AuthNotifier extends Notifier<AuthState> {
|
||||
await _saveUserCache(user);
|
||||
state = state.copyWith(user: user, isLoggedIn: true, isLoading: false);
|
||||
DeviceInfoService.registerDeviceIfNeeded();
|
||||
Log.i('注册成功: ${user.username}, 后端赠送50积分+50金币');
|
||||
await refreshUser();
|
||||
return true;
|
||||
} on ApiException catch (e) {
|
||||
state = state.copyWith(isLoading: false, error: e.message);
|
||||
|
||||
Reference in New Issue
Block a user