chore: 汇总2026-05-30全量更新
### 详细变更:
1. **文档与配置**:更新AGENTS.md添加命令超时约束,升级Rive依赖至0.14.7并替换平台插件引用
2. **UI优化**:重构AppInfo页面布局、移除图表冗余配置、锁定部分系统设置项
3. **功能增强**:
- 新增工具面板拖拽状态管理与介绍弹窗
- 新增进度页面编辑/重排/清空用户进度功能
- 新增摇一摇路由作用域拦截逻辑
4. **体验优化**:
- 统一外部链接跳转弹窗,添加文件打开确认逻辑
- 修复设备卡片IP溢出、Android权限声明问题
- 后台任务初始化增加协议校验
5. **代码重构**:拆分工具面板配置、拖拽逻辑与动画参数,优化状态管理代码
6. **工具脚本**:新增协议文件上传脚本
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/// ============================================================
|
||||
/// 闲言APP — 纠错页面
|
||||
/// 创建时间: 2026-04-28
|
||||
/// 更新时间: 2026-05-29
|
||||
/// 更新时间: 2026-05-30
|
||||
/// 作用: 提交内容纠错
|
||||
/// 上次更新: emoji替换为图标、添加邮箱复选框、Toast反馈、纠错记录
|
||||
/// 上次更新: 内容ID标签与info图标改为Row布局、纠错描述placeholder增加最少10字提示、纠错记录本地/服务端增加📱/☁️标识
|
||||
/// ============================================================
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -42,6 +42,7 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
('poetry', '诗词', CupertinoIcons.book_fill),
|
||||
('zc', '字词', CupertinoIcons.textformat_abc),
|
||||
('riddle', '谜语', CupertinoIcons.question_circle_fill),
|
||||
('other', '其他', CupertinoIcons.ellipsis_circle_fill),
|
||||
];
|
||||
|
||||
final _correctionTypeOptions = [
|
||||
@@ -192,11 +193,38 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
}).toList(),
|
||||
),
|
||||
const SizedBox(height: AppSpacing.lg),
|
||||
Text(
|
||||
'内容ID',
|
||||
style: AppTypography.headline.copyWith(
|
||||
color: ext.textPrimary,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'内容ID',
|
||||
style: AppTypography.headline.copyWith(
|
||||
color: ext.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: AppSpacing.xs),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showCupertinoDialog<void>(
|
||||
context: context,
|
||||
builder: (dlgCtx) => CupertinoAlertDialog(
|
||||
content: const Text('若无内容ID,请填写0'),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
isDefaultAction: true,
|
||||
child: const Text('了解了'),
|
||||
onPressed: () => Navigator.pop(dlgCtx),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Icon(
|
||||
CupertinoIcons.info_circle,
|
||||
size: 18,
|
||||
color: ext.textHint,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: AppSpacing.sm),
|
||||
Container(
|
||||
@@ -222,11 +250,22 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: AppSpacing.lg),
|
||||
Text(
|
||||
'纠错描述',
|
||||
style: AppTypography.headline.copyWith(
|
||||
color: ext.textPrimary,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'纠错描述',
|
||||
style: AppTypography.headline.copyWith(
|
||||
color: ext.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: AppSpacing.xs),
|
||||
Text(
|
||||
'请至少描述10个字',
|
||||
style: AppTypography.caption1.copyWith(
|
||||
color: ext.textHint,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: AppSpacing.sm),
|
||||
Container(
|
||||
@@ -237,7 +276,7 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
),
|
||||
child: CupertinoTextField(
|
||||
controller: _contentController,
|
||||
placeholder: '请详细描述需要纠正的内容...',
|
||||
placeholder: '请详细描述需要纠正的内容(至少10字)...',
|
||||
placeholderStyle: AppTypography.body.copyWith(
|
||||
color: ext.textHint,
|
||||
),
|
||||
@@ -391,6 +430,10 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
AppToast.showWarning('请输入纠错描述');
|
||||
return;
|
||||
}
|
||||
if (content.length < 10) {
|
||||
AppToast.showWarning('纠错描述至少需要10个字');
|
||||
return;
|
||||
}
|
||||
final targetId = int.tryParse(targetIdText) ?? 0;
|
||||
if (targetId <= 0) {
|
||||
AppToast.showWarning('请输入有效的内容ID');
|
||||
@@ -535,6 +578,7 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
'poetry': '诗词',
|
||||
'zc': '字词',
|
||||
'riddle': '谜语',
|
||||
'other': '其他',
|
||||
};
|
||||
final statusMap = {
|
||||
0: ('待处理', CupertinoColors.systemOrange),
|
||||
@@ -546,6 +590,7 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
final contentType =
|
||||
contentTypeMap[item['source_type']] ?? item['source_type'] ?? '未知';
|
||||
final sourceId = item['source_id']?.toString() ?? '-';
|
||||
final isLocal = item['is_local'] == true || item['is_local'] == 1;
|
||||
final switchVal = item['switch'] as int? ?? 0;
|
||||
final statusInfo = statusMap[switchVal] ?? ('未知', ext.textHint);
|
||||
final createdAt = item['createtime'] as int?;
|
||||
@@ -580,6 +625,30 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: AppSpacing.sm,
|
||||
vertical: 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
(isLocal
|
||||
? CupertinoColors.systemBlue
|
||||
: CupertinoColors.systemGreen)
|
||||
.withValues(alpha: 0.12),
|
||||
borderRadius: AppRadius.smBorder,
|
||||
),
|
||||
child: Text(
|
||||
isLocal ? '📱 本地' : '☁️ 服务端',
|
||||
style: AppTypography.caption1.copyWith(
|
||||
color: isLocal
|
||||
? CupertinoColors.systemBlue
|
||||
: CupertinoColors.systemGreen,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: AppSpacing.xs),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: AppSpacing.sm,
|
||||
|
||||
Reference in New Issue
Block a user