diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d02805..3c2ead0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,152 @@ All notable changes to this project will be documented in this file. --- +## [1.3.19] - 2026-04-01 + +### 新增 +- ✨ **实现应用数据计算功能** + - 使用原生 dart:io 实现软件包、缓存、数据大小计算 + - 递归计算目录大小,支持多层级文件遍历 + - 字节格式化,自动转换为 B/KB/MB/GB/TB + - 软件包大小:计算应用数据目录总大小 + - 缓存大小:计算临时目录大小 + - 数据大小:计算文档和支持目录大小 + - 占用空间:显示软件包+缓存+数据+10MB 的总和 + - 实现清空缓存功能,递归删除临时文件 + - 清空后自动刷新缓存大小显示 + - 新增原生清理数据按钮,直接删除文件系统数据 + - 双重确认对话框,防止误操作 + - 原生清理完成后提示关闭应用 + - 涉及文件: + - `lib/views/profile/guide/app-data.dart` - 实现数据计算功能 + +### 修复 +- 🔧 **统一版本号显示** + - 修复 learn-us.dart 中版本号引用错误问题 + - 修复 app-info.dart 中硬编码版本号问题 + - 统一使用 AppConfig.appVersion 显示版本号 + - 涉及文件: + - `lib/views/profile/settings/learn-us.dart` - 修正版本号引用 + - `lib/views/profile/app-info.dart` - 统一版本号显示 + +### 更新 +- 🎨 **多平台应用图标全面更新** + - 使用用户提供的本地图片作为应用图标 + - 原图尺寸:647x559,自动居中裁剪为正方形 + - 新增 216x216 尺寸图标 + - 支持所有平台图标生成: + - **HarmonyOS**:完整图标集(9个尺寸) + - **Android**:启动图标(5个尺寸) + - **macOS**:应用图标(7个尺寸) + - 所有平台图标已同步更新 + - 涉及文件: + - `ohos/entry/src/main/resources/base/media/` - HarmonyOS 图标集(含 icon_216.png) + - `ohos/AppScope/resources/base/media/app_icon.png` - HarmonyOS AppScope 图标 + - `android/app/src/main/res/mipmap-*/ic_launcher.png` - Android 启动图标 + - `macos/Runner/Assets.xcassets/AppIcon.appiconset/` - macOS 图标 + - `generate_all_icons.py` - 多平台图标生成脚本 + - `assets/XZ4QCHGE][UUYGCV2G(~88J.png` - 用户提供的原始图片 + +--- + +## [1.3.18] - 2026-04-01 + +### 改进 +- ✨ **优化诗词投稿检测功能** + - 在"检测是否存在"按钮左边添加检测状态显示 + - 显示"未检测"、"已检测"、"未通过"三种状态 + - 配套图标:pending、check_circle、close + - 使用主题色和错误色区分不同状态 + - 提交前要求必须先检测且通过才能提交 + - 未检测时提示"请先检测诗词是否存在" + - 涉及文件: + - `lib/views/profile/expand/manu-script.dart` - 优化检测功能 + +--- + +## [1.3.17] - 2026-04-01 + +### 优化 +- 🎨 **重新设计使用教程页面** + - iOS 风格的全新设计,更符合苹果设计理念 + - 增加了四个主要页面的界面预览模块(首页、发现页、足迹页、个人中心) + - 每个模块使用不同的 emoji 图标和配色方案,图文并茂 + - 保留左侧进度条并优化动画效果 + - 新增页面淡入动画和卡片逐个出现动画 + - 使用主题色 AppConstants.primaryColor 统一配色 + - 圆角卡片设计,柔和阴影,符合 iOS 风格 + - 涉及文件: + - `lib/views/profile/guide/beginner_page.dart` - 重新设计使用教程页面 + +### 改进 +- 🎨 **优化进度条悬浮效果** + - 进度条改为悬浮在内容上方,不再单独占位 + - 添加渐变背景遮罩,从左到右透明度渐变 + - 内容区域宽度增加,提升阅读体验 + - 涉及文件: + - `lib/views/profile/guide/beginner_page.dart` - 优化进度条悬浮效果 +- ✨ **优化导航栏设计** + - 标题文字使用主题色 AppConstants.primaryColor + - 右上角添加帮助图标按钮 + - 点击按钮跳转到欢迎引导页 SpGuidePage + - 涉及文件: + - `lib/views/profile/guide/beginner_page.dart` - 优化导航栏 +- ✨ **添加滚动隐藏 AppBar 功能** + - 使用 SliverAppBar 实现滚动时自动隐藏效果 + - floating: true 和 snap: true 配合,实现自然收起动画 + - 向下滚动时 AppBar 自动隐藏,向上滚动时自动显示 + - 所有图标颜色统一使用主题色 AppConstants.primaryColor + - 涉及文件: + - `lib/views/profile/guide/beginner_page.dart` - 添加滚动隐藏功能 +- 🎨 **美化开发者卡片** + - 新增微信公众号信息展示 + - 公众号名称:微风暴 + - 使用微信绿色主题色 (0xFF07C160) + - 添加搜索图标和标签样式设计 + - 渐变色背景卡片,圆角设计 + - 涉及文件: + - `lib/views/profile/settings/learn-us.dart` - 美化开发者卡片 +- 🎨 **优化卡片布局** + - 去掉开发者卡片和团队信息卡片中的分割线 + - 调整内边距,使布局更紧凑美观 + - 内容区块之间使用自然间距代替分割线 + - 涉及文件: + - `lib/views/profile/settings/learn-us.dart` - 优化卡片布局 +- ✨ **增强开发者卡片功能** + - 邮箱地址字体加大,从 13 改为 15 + - 公众号"微风暴"右边添加复制图标 + - 点击复制图标可复制公众号名称到剪贴板 + - 复制成功后显示 SnackBar 提示 + - 涉及文件: + - `lib/views/profile/settings/learn-us.dart` - 增强开发者卡片 +- 🎨 **优化设备信息卡片布局** + - 设备信息从 1×6 列表布局改为 2×3 网格布局 + - 新增网格布局信息项 widget,带卡片样式 + - 使用主题色 AppConstants.primaryColor 统一图标颜色 + - 可复制项带复制图标,点击可复制 + - 卡片样式:灰色背景,圆角边框,更美观 + - 去掉设备信息和设备详细信息之间的空白区域 + - 涉及文件: + - `lib/views/profile/app-info.dart` - 优化设备信息布局 + +--- + +## [1.3.16] - 2026-04-01 + +### 新增 +- ✨ **新增使用教程页面** + - 创建 iOS 风格的使用教程页面 `BeginnerPage` + - 超长列表布局,包含 16 个功能模块 + - 左侧悬浮进度指示器,带平滑动画 + - 显示当前阅读进度百分比 + - 主题色设计,圆角卡片,阴影效果 + - 功能模块:首页功能、发现页面、足迹页面、个人中心、诗词阅读、收藏功能、搜索功能、答题挑战、离线模式、个性化设置、投稿功能、投票功能、天气与十二时辰、图片分享、数据管理、帮助与反馈 + - 涉及文件: + - `lib/views/profile/guide/beginner_page.dart` - 新建使用教程页面 + - `lib/views/profile/components/pop-menu.dart` - 修改按钮跳转 + +--- + ## [1.3.15] - 2026-04-01 ### 修改 @@ -15,137 +161,34 @@ All notable changes to this project will be documented in this file. --- -## [1.3.14] - 2026-04-01 +## 软件特性功能 -### 修复 -- 🐛 **彻底修复 AppBar 标题不显示问题** - - 移除 `TabbedNavAppBar` 中的自定义 `toolbarHeight`,使用 Flutter 默认值 - - 移除 TabBar 的自定义高度包装(`PreferredSize` + `SizedBox`),直接使用 `TabBar` 作为 `bottom` - - 简化 TabBar 指示器配置,移除不必要的 `insets` - - 明确设置标题颜色为 `Colors.black87` - - 涉及文件: - - `lib/widgets/tabbed_nav_app_bar.dart` - 彻底修复 AppBar 标题显示 +### 已开发完成 +- ✅ iOS 风格界面设计 +- ✅ 诗词浏览与收藏 +- ✅ 搜索与分类 +- ✅ 答题挑战功能 +- ✅ 离线模式 +- ✅ 个性化设置 +- ✅ 投稿功能 +- ✅ 投票功能 +- ✅ 天气与十二时辰 +- ✅ 图片分享 +- ✅ 数据管理 +- ✅ 使用教程页面 +- ✅ 全站统计页面 +- ✅ 修复 AppBar 标题显示问题 ---- +### 开发中 +- 🚧 更多功能优化 -## [1.3.13] - 2026-04-01 +## 开发进度 -### 优化 -- 🎨 **优化收藏页面布局** - - 去掉收藏页面卡片之间的空白间距 - - 在卡片之间添加黑色半透明分割线 - - 减少列表顶部padding,让内容更紧凑 - - 移除卡片自身的底部margin,改用统一的分割线间距 - - 涉及文件: - - `lib/views/footprint/all_list.dart` - 优化收藏页面布局 - ---- - -## [1.3.12] - 2026-04-01 - -### 新增 -- ✨ **新增全站统计页面** - - 创建了iOS风格的全站统计页面,展示网站统计数据 - - 页面包含:收录数量、热度统计、热门内容、建站时间等 - - 支持下拉刷新,实时获取最新统计数据 - - 使用主题色设计,与整体应用风格统一 - - 添加了网络状态检测和错误处理 - - 涉及文件: - - `lib/views/profile/components/entire-page.dart` - 新建全站统计页面 - - `lib/views/profile/profile_page.dart` - 添加跳转到全站统计页面 - -### 修复 -- 🐛 **修复全站统计页面布局溢出问题** - - 调整了数量统计网格的宽高比,从1.1改为0.9,再优化为0.9 - - 优化了统计卡片的内部间距和字体大小 - - 减少了图标容器(36→32→28)和图标大小(20→18→16) - - 减少数值字体大小(18→16→14)和标签字体大小(11→10→9) - - 减少内部间距(12→10→8,8→6→4,4→2) - - 确保在不同屏幕尺寸下都能正常显示 - - 涉及文件: - - `lib/views/profile/components/entire-page.dart` - 修复布局溢出 - -### 优化 -- ✨ **更新全站统计页面字段标签** - - 根据API文档更新,调整了统计字段的显示标签 - - "已开设分类" → "项目" - - "已收录诗句" → "收录诗句" - - "审核中申请" → "审核中" - - "已拒绝申请" → "已拒绝" - - "文章数量" → "每日一句"(图标改为太阳) - - "已发布公告" → "推送" - - "开发者人数" → "开发者" - - 涉及文件: - - `lib/views/profile/components/entire-page.dart` - 更新字段标签 - -### 改进 -- 🎨 **重新设计数量统计布局为3x3网格** - - 保持3x3网格布局,从列表改回网格视图 - - 每个网格项内部改为上下两行布局 - - 上行(flex: 2):icon和数据水平排列,比例1:1 - - 有icon时:icon和数据各占一半 - - 无icon时(收录诗句、分类标签):数据自动占满整行 - - 下行(flex: 1):描述单独一行,居中显示 - - 上下行比例:2:1 - - 优化了网格项宽高比为1.0 - - 增大了图标(24)和数值字体(22),提升可读性 - - 涉及文件: - - `lib/views/profile/components/entire-page.dart` - 重新设计3x3网格布局 - -- ✨ **建站时间卡片增加天数显示** - - 自动计算从建站日期到现在的天数 - - 在建站时间右侧显示"已运行 X 天"标签 - - 使用主题色背景的圆角标签样式 - - 涉及文件: - - `lib/views/profile/components/entire_page.dart` - 增加天数计算和显示 - -- 🔧 **修复代码规范问题** - - 添加 `library;` 指令修复悬空库文档注释警告 - - 重命名文件 `entire-page.dart` → `entire_page.dart` 符合 Dart 命名规范 - - 涉及文件: - - `lib/views/profile/components/entire_page.dart` - 文件重命名 - - `lib/views/profile/profile_page.dart` - 更新 import 路径 - -- ⚡ **优化全站统计页面加载体验** - - 移除全局转圈加载动画,改为骨架屏预加载 - - 页面进入时立即显示骨架屏布局,提升用户体验 - - API 数据加载完成后平滑过渡到实际内容 - - 涉及文件: - - `lib/views/profile/components/entire_page.dart` - 异步加载优化 - -- ✨ **全站统计页面头部添加刷新按钮** - - 在"情景诗词"标题右侧添加刷新图标 - - 点击可重新加载统计数据 - - 涉及文件: - - `lib/views/profile/components/entire_page.dart` - 添加刷新按钮 - -- ✨ **新增服务器信息弹窗组件** - - 创建美化的服务器信息弹窗组件 `ServerInfoDialog` - - 全站统计页面 AppBar 右侧添加信息图标,点击显示服务器信息 - - 离线数据页面同步使用新的美化弹窗 - - 弹窗显示:服务器时间、负载、响应时间、网络延迟等 - - 响应时间自动判断状态(极快/快速/正常/较慢) - - 涉及文件: - - `lib/views/profile/components/server_info_dialog.dart` - 新建弹窗组件 - - `lib/views/profile/components/entire_page.dart` - 添加信息图标 - - `lib/views/profile/settings/offline-data.dart` - 使用新弹窗组件 - ---- - -## [1.3.11] - 2026-03-31 - -### 修复 -- 🐛 **修复 Web 平台兼容性问题** - - 修复了 `wakelock_plus` 库在 Web 平台上不可用的问题(`dart:ffi` 在 Web 平台上不可用) - - 在 Web 平台上禁用了屏幕常亮功能,并显示相应的提示信息 - - 在 Web 平台上隐藏了屏幕常亮设置项 - - 涉及文件: - - `lib/views/profile/profile_page.dart` - 添加 Web 平台检查 - - `lib/views/profile/components/pop-menu.dart` - 添加 Web 平台检查 - ---- - -### 修复 -- 优化了屏幕常亮功能的错误处理 -- 增强了平台检测和日志输出 -- 为不支持屏幕常亮的设备添加了专门的错误提示 +| 功能 | 优先级 | 状态 | +|------|--------|------| +| 使用教程 | 1 | ✅ 已完成 | +| 投稿功能优化 | 2 | ✅ 已完成 | +| 界面美化 | 3 | ✅ 已完成 | +| 数据管理功能 | 1 | ✅ 已完成 | +| 性能优化 | 4 | 🔄 进行中 | +| 新功能开发 | 5 | 📋 计划中 | diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 90a5bc8..a1ef82d 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } android { - namespace = "com.example.flutter_application_2" + namespace = "app.wushu.poes" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion @@ -21,7 +21,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.flutter_application_2" + applicationId = "app.wushu.poes" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 76d9e95..a6a0142 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -4,12 +4,12 @@ { - sourceCompatibility = "1.8" - targetCompatibility = "1.8" - } - - tasks.withType { - kotlinOptions { - jvmTarget = "1.8" - } - } -} +// 注释掉 audioplayers_android 项目配置,因为我们使用的是 Git 仓库版本 +// project(":audioplayers_android") { +// tasks.withType { +// sourceCompatibility = "1.8" +// targetCompatibility = "1.8" +// } +// +// tasks.withType { +// kotlinOptions { +// jvmTarget = "1.8" +// } +// } +// } val newBuildDir: Directory = rootProject.layout.buildDirectory diff --git a/assets/XZ4QCHGE][UUYGCV2G(~88J.png b/assets/XZ4QCHGE][UUYGCV2G(~88J.png new file mode 100644 index 0000000..fb07548 Binary files /dev/null and b/assets/XZ4QCHGE][UUYGCV2G(~88J.png differ diff --git a/ht/photo/4b3165c33f183981a6f3e59191a5c8f7.jpg b/ht/photo/4b3165c33f183981a6f3e59191a5c8f7.jpg new file mode 100644 index 0000000..ed89a3c Binary files /dev/null and b/ht/photo/4b3165c33f183981a6f3e59191a5c8f7.jpg differ diff --git a/ht/photo/61077d0d0103ab03a494cb43f845994d.jpg b/ht/photo/61077d0d0103ab03a494cb43f845994d.jpg new file mode 100644 index 0000000..b36d508 Binary files /dev/null and b/ht/photo/61077d0d0103ab03a494cb43f845994d.jpg differ diff --git a/ht/photo/80a384b07823cb671fc91a46f9555f4a.jpg b/ht/photo/80a384b07823cb671fc91a46f9555f4a.jpg new file mode 100644 index 0000000..1f34084 Binary files /dev/null and b/ht/photo/80a384b07823cb671fc91a46f9555f4a.jpg differ diff --git a/ht/photo/91c857e3346cb4d72d5332a7878a039d.jpg b/ht/photo/91c857e3346cb4d72d5332a7878a039d.jpg new file mode 100644 index 0000000..1e27060 Binary files /dev/null and b/ht/photo/91c857e3346cb4d72d5332a7878a039d.jpg differ diff --git a/ht/photo/ae10759fb35735eb0dc500a22a635bce.jpg b/ht/photo/ae10759fb35735eb0dc500a22a635bce.jpg new file mode 100644 index 0000000..2d686b3 Binary files /dev/null and b/ht/photo/ae10759fb35735eb0dc500a22a635bce.jpg differ diff --git a/ht/photo/c9c1dd85921fad69e4e5bb854a4c2a29.jpg b/ht/photo/c9c1dd85921fad69e4e5bb854a4c2a29.jpg new file mode 100644 index 0000000..cf43df1 Binary files /dev/null and b/ht/photo/c9c1dd85921fad69e4e5bb854a4c2a29.jpg differ diff --git a/ht/photo/e6597b101e1b7a7af47f4d4325a64eb1.jpg b/ht/photo/e6597b101e1b7a7af47f4d4325a64eb1.jpg new file mode 100644 index 0000000..ef57851 Binary files /dev/null and b/ht/photo/e6597b101e1b7a7af47f4d4325a64eb1.jpg differ diff --git a/ht/photo/edf5439621c6697fc102d83caa2dfd4a.jpg b/ht/photo/edf5439621c6697fc102d83caa2dfd4a.jpg new file mode 100644 index 0000000..dde994f Binary files /dev/null and b/ht/photo/edf5439621c6697fc102d83caa2dfd4a.jpg differ diff --git a/lib/constants/app_constants.dart b/lib/constants/app_constants.dart index 79046eb..d57e1df 100644 --- a/lib/constants/app_constants.dart +++ b/lib/constants/app_constants.dart @@ -7,8 +7,8 @@ import 'package:flutter/material.dart'; class AppConstants { // 应用信息 - static const String appName = 'Poes'; - static const String appVersion = '1.0.0'; + static const String appName = '情景诗词'; + static const String appVersion = '1.3.1'; // 响应式断点 static const double mobileBreakpoint = 768.0; diff --git a/lib/views/footprint/footprint_page.dart b/lib/views/footprint/footprint_page.dart index 42aa7d6..cc0cd37 100644 --- a/lib/views/footprint/footprint_page.dart +++ b/lib/views/footprint/footprint_page.dart @@ -6,7 +6,7 @@ import 'dart:async' show StreamSubscription; import 'package:flutter/material.dart'; -import 'package:flutter_application_2/controllers/history_controller.dart'; +import 'package:poes/controllers/history_controller.dart'; import '../../../constants/app_constants.dart'; import '../../../utils/http/poetry_api.dart'; import '../../../services/network_listener_service.dart'; diff --git a/lib/views/profile/app-info.dart b/lib/views/profile/app-info.dart index b8b62ae..a1a441c 100644 --- a/lib/views/profile/app-info.dart +++ b/lib/views/profile/app-info.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:platform_info/platform_info.dart'; import 'package:flutter_udid/flutter_udid.dart'; +import '../../../config/app_config.dart'; import '../../../constants/app_constants.dart'; import '../../../controllers/shared_preferences_storage_controller.dart'; @@ -263,7 +264,7 @@ class _AppInfoPageState extends State { borderRadius: BorderRadius.circular(4), ), child: Text( - '软件版本 1.5', + '软件版本 ${AppConfig.appVersion}', style: TextStyle( fontSize: 10, color: _isDeveloperMode @@ -419,7 +420,12 @@ class _AppInfoPageState extends State { ), ), const Divider(height: 1), - _buildCopyableItem(context, '版本号', '1.2', Icons.verified), + _buildCopyableItem( + context, + '版本号', + AppConfig.appVersion, + Icons.verified, + ), _buildCopyableItem( context, 'Builder version', @@ -735,21 +741,34 @@ class _AppInfoPageState extends State { ), ), const Divider(height: 1), - _buildInfoItem('操作系统', platformName, Icons.phone_iphone), - if (!isHarmonyOS) ...[ - _buildInfoItem('设计风格', designStyle, Icons.palette), - ], - _buildInfoItem('设备类型', deviceType, Icons.devices), - _buildInfoItem('构建模式', buildMode, Icons.build), - _buildInfoItem('运行环境', runtimeEnv, Icons.code), - _buildCopyableItem( - context, - 'Flutter UDID', - _udid, - Icons.perm_identity, + Padding( + padding: const EdgeInsets.fromLTRB(16, 16, 16, 0), + child: GridView.count( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + crossAxisCount: 2, + mainAxisSpacing: 12, + crossAxisSpacing: 12, + childAspectRatio: 2.0, + children: [ + _buildGridInfoItem('操作系统', platformName, Icons.phone_iphone), + if (!isHarmonyOS) ...[ + _buildGridInfoItem('设计风格', designStyle, Icons.palette), + ], + _buildGridInfoItem('设备类型', deviceType, Icons.devices), + _buildGridInfoItem('构建模式', buildMode, Icons.build), + _buildGridInfoItem('运行环境', runtimeEnv, Icons.code), + _buildGridCopyableItem( + context, + 'Flutter UUID', + _udid, + Icons.perm_identity, + ), + ], + ), ), Padding( - padding: const EdgeInsets.all(16), + padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), child: Container( width: double.infinity, padding: const EdgeInsets.all(12), @@ -855,12 +874,12 @@ class _AppInfoPageState extends State { '优化:左侧进度条位置', '新增:协议内容焦点功能', ]), - const SizedBox(height: 16), - _buildUpdateItem('版本 1.2.38', '2026-03-27', [ - '优化:引导页滑动逻辑', - '新增:页面进度指示器', - '更新:滑动提示文本', - ]), + // const SizedBox(height: 16), + // _buildUpdateItem('版本 1.2.38', '2026-03-27', [ + // '优化:引导页滑动逻辑', + // '新增:页面进度指示器', + // '更新:滑动提示文本', + // ]), ], ), ), @@ -994,6 +1013,109 @@ class _AppInfoPageState extends State { ); } + // 网格布局版本的信息项 + Widget _buildGridInfoItem(String title, String value, IconData icon) { + return Container( + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: Colors.grey[50], + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.grey.withValues(alpha: 0.1)), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon(icon, size: 18, color: AppConstants.primaryColor), + const SizedBox(width: 8), + Expanded( + child: Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w500, + color: Colors.grey[700], + ), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + const SizedBox(height: 6), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.black87, + ), + overflow: TextOverflow.ellipsis, + maxLines: 1, + ), + ], + ), + ); + } + + // 网格布局版本的可复制信息项 + Widget _buildGridCopyableItem( + BuildContext context, + String title, + String value, + IconData icon, + ) { + return GestureDetector( + onTap: () => _copyToClipboard(context, value), + child: Container( + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: Colors.grey[50], + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.grey.withValues(alpha: 0.1)), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon(icon, size: 18, color: AppConstants.primaryColor), + const SizedBox(width: 8), + Expanded( + child: Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w500, + color: Colors.grey[700], + ), + overflow: TextOverflow.ellipsis, + ), + ), + Icon( + Icons.content_copy, + size: 14, + color: AppConstants.primaryColor.withValues(alpha: 0.6), + ), + ], + ), + const SizedBox(height: 6), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.black87, + ), + overflow: TextOverflow.ellipsis, + maxLines: 1, + ), + ], + ), + ), + ); + } + Widget _buildInfoItem(String title, String value, IconData icon) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), diff --git a/lib/views/profile/components/bug_list_page.dart b/lib/views/profile/components/bug_list_page.dart index 4b72f2f..cb58555 100644 --- a/lib/views/profile/components/bug_list_page.dart +++ b/lib/views/profile/components/bug_list_page.dart @@ -36,12 +36,12 @@ class _BugListPageState extends State { 'id': 2, 'title': '软件页面刷新率只有60帧', 'description': '软件外120帧,打开软件后,刷新率只有60帧', - 'severity': 'high', - 'status': 'resolved', + 'severity': 'low', + 'status': 'in_progress', 'solution': '新版已修复', 'reproduction': '1. 极少鸿蒙用户仍会出现刷新率只有60帧,无原生刷新率', 'resolveTime': '2026-04-10', - 'reportTime': '2026-03-20', + 'reportTime': '03-20', 'affectedUsers': '鸿蒙5/6用户', 'expanded': false, // 解决方案展开状态 'reproductionExpanded': false, // 复现步骤展开状态 @@ -65,7 +65,7 @@ class _BugListPageState extends State { 'id': 4, 'title': '软件横屏后,部分页面无法点击', 'description': '暂未适配横屏', - 'severity': 'medium', + 'severity': 'high', 'status': 'pending', 'solution': '增加重试机制和离线缓存功能', 'reproduction': '1. 开启屏幕旋转,手机横屏', @@ -81,9 +81,9 @@ class _BugListPageState extends State { 'description': '在其他页面点击创建添加笔记,笔记时间显示异常', 'severity': 'low', 'status': 'resolved', - 'solution': '优化字体大小适配逻辑,确保所有页面正确显示', - 'reproduction': '1. 进入设置页面\n2. 调整字体大小为最大值\n3. 浏览各个页面,观察文字是否显示完整', - 'resolveTime': '2026-03-26', + 'solution': '', + 'reproduction': '', + 'resolveTime': '已解决', 'reportTime': '2026-03-18', 'affectedUsers': '少数用户', 'expanded': false, // 解决方案展开状态 @@ -93,11 +93,11 @@ class _BugListPageState extends State { 'id': 6, 'title': '离线状态错误', 'description': '断网或网络异常,软件内未正确获取到', - 'severity': 'low', - 'status': 'resolved', - 'solution': '优化字体大小适配逻辑,确保所有页面正确显示', + 'severity': 'pending', + 'status': 'in_progress', + 'solution': '在线状态未识别到网络打开', 'reproduction': '1. 用户关闭在线状态,软件部分页面显示', - 'resolveTime': '2026-03-26', + 'resolveTime': '下个版本', 'reportTime': '2026-03-18', 'affectedUsers': '少数用户', 'expanded': false, // 解决方案展开状态 @@ -107,12 +107,12 @@ class _BugListPageState extends State { 'id': 7, 'title': '主页点击“上一条” 显示无上一条', 'description': '未读取到历史记录', - 'severity': 'low', - 'status': 'resolved', - 'solution': '优化字体大小适配逻辑,确保所有页面正确显示', - 'reproduction': '1. 用户关闭在线状态,软件部分页面显示', - 'resolveTime': '2026-03-26', - 'reportTime': '2026-03-18', + 'severity': 'high', + 'status': 'in_progress', + 'solution': '已知bug, 概率触发', + 'reproduction': '1. 主页 点击 上一条', + 'resolveTime': '暂无修复计划', + 'reportTime': '03-18', 'affectedUsers': '全部用户', 'expanded': false, // 解决方案展开状态 'reproductionExpanded': false, // 复现步骤展开状态 @@ -122,10 +122,10 @@ class _BugListPageState extends State { 'title': '软件冷启动出现长时间白屏', 'description': '未读取到历史记录', 'severity': 'low', - 'status': 'resolved', - 'solution': '闪白屏', - 'reproduction': '首次按钮,系统设置页面清理poes数据 大版本更新', - 'resolveTime': '2026-03-26', + 'status': 'in_progress', + 'solution': '建议锁后台,或者后台挂起', + 'reproduction': '首次按钮,系统设置页面清理数据 大版本更新', + 'resolveTime': '下个版本', 'reportTime': '2026-03-18', 'affectedUsers': '少数用户', 'expanded': false, // 解决方案展开状态 @@ -135,12 +135,12 @@ class _BugListPageState extends State { { 'id': 9, 'title': '软件黑屏', - 'description': '未读取到历史记录', + 'description': '多次点击同一个路由按钮5次以上', 'severity': 'low', - 'status': 'resolved', - 'solution': '优化字体大小适配逻辑,确保所有页面正确显示', + 'status': '', + 'solution': '概率触发', 'reproduction': '极短时间内瞬发点击同一个按钮3次以上 页面路由加载异常', - 'resolveTime': '2026-03-26', + 'resolveTime': '新版已修复', 'reportTime': '2026-03-18', 'affectedUsers': '少数用户', 'expanded': false, // 解决方案展开状态 @@ -152,11 +152,11 @@ class _BugListPageState extends State { 'title': '桌面卡片 天气温度显示999', 'description': '未读取到历史记录', 'severity': 'low', - 'status': 'resolved', + 'status': '', 'solution': '用户短时间内多次刷新获取api数据,导致服务器启动防止cc自我保护机制,不会此ip下放数据', - 'reproduction': '极短时间内瞬发点击同一个按钮3次以上 页面路由加载异常', - 'resolveTime': '2026-03-26', - 'reportTime': '2026-03-18', + 'reproduction': '天气频繁切换,导致温度显示异常999', + 'resolveTime': '下个版本', + 'reportTime': '2026-03', 'affectedUsers': '少数用户', 'expanded': false, // 解决方案展开状态 'reproductionExpanded': false, // 复现步骤展开状态 @@ -164,13 +164,13 @@ class _BugListPageState extends State { { 'id': 11, 'title': '桌面卡片 设置页面闪白屏', - 'description': '未读取到历史记录', + 'description': '软件自身优化问题', 'severity': 'low', - 'status': 'resolved', + 'status': 'pending', 'solution': '用户短时间内多次刷新获取api数据,导致服务器启动防止cc自我保护机制,不会此ip下放数据', 'reproduction': '极短时间内瞬发点击同一个按钮3次以上 页面路由加载异常', - 'resolveTime': '2026-03-26', - 'reportTime': '2026-03-18', + 'resolveTime': '下个版本', + 'reportTime': '03-18', 'affectedUsers': '少数用户', 'expanded': false, // 解决方案展开状态 'reproductionExpanded': false, // 复现步骤展开状态 @@ -225,9 +225,11 @@ class _BugListPageState extends State { String _getSeverityText(String severity) { switch (severity) { case 'high': + // 高优先级默认红色 return '高'; case 'medium': return '中'; + case 'low': return '低'; default: @@ -238,13 +240,17 @@ class _BugListPageState extends State { Color _getStatusColor(String status) { switch (status) { case 'resolved': + // 已解决状态默认绿色 return Colors.green; case 'in_progress': + // 解决中状态默认蓝色 return Colors.blue; case 'pending': + // 待解决状态默认橙色 return Colors.orange; default: return Colors.grey; + // 未知状态默认灰色 } } diff --git a/lib/views/profile/components/pop-menu.dart b/lib/views/profile/components/pop-menu.dart index 02b910c..481b6f4 100644 --- a/lib/views/profile/components/pop-menu.dart +++ b/lib/views/profile/components/pop-menu.dart @@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart' show kIsWeb; import 'package:share_plus/share_plus.dart'; import '../../../constants/app_constants.dart'; import '../../../services/wakelock_service.dart'; +import '../guide/beginner_page.dart'; import 'dart:io' as io; class PopMenu extends StatelessWidget { @@ -146,12 +147,11 @@ class PopMenu extends StatelessWidget { _buildBottomSheetItem(context, '分享软件', Icons.share, () { shareApp(context); }), - _buildBottomSheetItem( - context, - '使用教程', - Icons.screen_lock_rotation, - () => toggleScreenWake(context), - ), + _buildBottomSheetItem(context, '使用教程', Icons.menu_book, () { + Navigator.of(context).push( + MaterialPageRoute(builder: (_) => const BeginnerPage()), + ); + }), _buildBottomSheetItem(context, '取消', Icons.settings, onSettings), const SizedBox(height: 20), _buildBottomSheetItem(context, '返回桌面', Icons.exit_to_app, () { diff --git a/lib/views/profile/expand/manu-script.dart b/lib/views/profile/expand/manu-script.dart index 9b2fe3e..a7380cc 100644 --- a/lib/views/profile/expand/manu-script.dart +++ b/lib/views/profile/expand/manu-script.dart @@ -167,8 +167,8 @@ class _ManuscriptPageState extends State { if (!_formKey.currentState!.validate()) return; if (!_nameChecked) { - await _checkName(); - if (!_nameChecked) return; + _showSnackBar('请先检测诗词是否存在', isError: true); + return; } if (_nameExists) { @@ -561,13 +561,43 @@ class _ManuscriptPageState extends State { ), if (_nameChecked) _buildSimilarityInfo(), const SizedBox(height: 8), - Align( - alignment: Alignment.centerRight, - child: TextButton.icon( - onPressed: _isCheckingName ? null : _checkName, - icon: const Icon(Icons.search, size: 18), - label: const Text('检测是否存在'), - ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Icon( + _nameChecked + ? (_nameExists ? Icons.close : Icons.check_circle) + : Icons.pending, + size: 18, + color: _nameChecked + ? (_nameExists + ? AppConstants.errorColor + : AppConstants.successColor) + : Colors.grey[400], + ), + const SizedBox(width: 6), + Text( + _nameChecked ? (_nameExists ? '未通过' : '已检测') : '未检测', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + color: _nameChecked + ? (_nameExists + ? AppConstants.errorColor + : AppConstants.successColor) + : Colors.grey[400], + ), + ), + ], + ), + TextButton.icon( + onPressed: _isCheckingName ? null : _checkName, + icon: const Icon(Icons.search, size: 18), + label: const Text('检测是否存在'), + ), + ], ), ], ); diff --git a/lib/views/profile/guide/app-data.dart b/lib/views/profile/guide/app-data.dart index 867c814..db82dbd 100644 --- a/lib/views/profile/guide/app-data.dart +++ b/lib/views/profile/guide/app-data.dart @@ -1,5 +1,8 @@ +import 'dart:io'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:path_provider/path_provider.dart'; import '../../../constants/app_constants.dart'; /// 时间: 2026-03-27 @@ -17,6 +20,13 @@ class AppDataPage extends StatefulWidget { class _AppDataPageState extends State { int _sharedPrefsCount = 0; bool _isLoading = true; + String _packageSize = '计算中...'; + String _cacheSize = '计算中...'; + String _dataSize = '计算中...'; + String _totalSize = '计算中...'; + int _packageBytes = 0; + int _cacheBytes = 0; + int _dataBytes = 0; @override void initState() { @@ -27,12 +37,137 @@ class _AppDataPageState extends State { Future _loadDataInfo() async { final prefs = await SharedPreferences.getInstance(); final keys = prefs.getKeys(); + + await Future.wait([ + _calculatePackageSize(), + _calculateCacheSize(), + _calculateDataSize(), + ]); + + _calculateTotalSize(); + setState(() { _sharedPrefsCount = keys.length; _isLoading = false; }); } + Future _getDirectorySize(Directory dir) async { + int totalSize = 0; + try { + if (await dir.exists()) { + await for (FileSystemEntity entity in dir.list(recursive: true)) { + if (entity is File) { + try { + totalSize += await entity.length(); + } catch (e) { + debugPrint('获取文件大小失败: ${entity.path}, $e'); + } + } + } + } + } catch (e) { + debugPrint('计算目录大小失败: ${dir.path}, $e'); + } + return totalSize; + } + + String _formatBytes(int bytes) { + if (bytes <= 0) return '0 B'; + const suffixes = ['B', 'KB', 'MB', 'GB', 'TB']; + int i = (bytes.bitLength - 1) ~/ 10; + double size = bytes / (1 << (i * 10)); + return '${size.toStringAsFixed(i == 0 ? 0 : 2)} ${suffixes[i]}'; + } + + Future _calculatePackageSize() async { + try { + int totalSize = 0; + final tempDir = await getTemporaryDirectory(); + final appDocDir = await getApplicationDocumentsDirectory(); + final supportDir = await getApplicationSupportDirectory(); + + final parentDir = tempDir.parent; + if (await parentDir.exists()) { + await for (FileSystemEntity entity in parentDir.list()) { + if (entity is Directory) { + final dirName = entity.path.split(Platform.pathSeparator).last; + if (!dirName.startsWith('.')) { + totalSize += await _getDirectorySize(entity); + } + } + } + } + + if (mounted) { + setState(() { + _packageBytes = totalSize; + _packageSize = _formatBytes(totalSize); + }); + } + } catch (e) { + debugPrint('计算软件包大小失败: $e'); + if (mounted) { + setState(() { + _packageSize = '获取失败'; + }); + } + } + } + + Future _calculateCacheSize() async { + try { + final tempDir = await getTemporaryDirectory(); + final size = await _getDirectorySize(tempDir); + if (mounted) { + setState(() { + _cacheBytes = size; + _cacheSize = _formatBytes(size); + }); + } + } catch (e) { + debugPrint('计算缓存大小失败: $e'); + if (mounted) { + setState(() { + _cacheSize = '获取失败'; + }); + } + } + } + + Future _calculateDataSize() async { + try { + int totalSize = 0; + final appDocDir = await getApplicationDocumentsDirectory(); + final supportDir = await getApplicationSupportDirectory(); + + totalSize += await _getDirectorySize(appDocDir); + totalSize += await _getDirectorySize(supportDir); + + if (mounted) { + setState(() { + _dataBytes = totalSize; + _dataSize = _formatBytes(totalSize); + }); + } + } catch (e) { + debugPrint('计算数据大小失败: $e'); + if (mounted) { + setState(() { + _dataSize = '获取失败'; + }); + } + } + } + + void _calculateTotalSize() { + const int appBaseSize = 10 * 1024 * 1024; // 10MB + final totalBytes = _packageBytes + _cacheBytes + _dataBytes + appBaseSize; + setState(() { + _totalSize = _formatBytes(totalBytes); + }); + } + Future _clearSharedPreferences() async { final confirmed = await _showConfirmDialog( '清空配置数据', @@ -140,6 +275,55 @@ class _AppDataPageState extends State { } } + Future _nativeClearData() async { + final confirmed = await _showConfirmDialog( + '系统层清理数据', + '⚠️ 危险操作 ⚠️\n\n确定要系统层清理数据吗?\n\n这将删除:\n• 应用文档目录所有文件\n• 应用支持目录所有文件\n• 应用缓存目录所有文件\n\n此操作将直接删除文件系统数据,不可撤销!', + ); + + if (confirmed != true) return; + + final doubleConfirmed = await _showConfirmDialog( + '再次确认', + '这是系统层面文件系统删除!\n\n删除后数据将无法恢复,确定继续吗?', + ); + + if (doubleConfirmed != true) return; + + try { + final tempDir = await getTemporaryDirectory(); + final appDocDir = await getApplicationDocumentsDirectory(); + final supportDir = await getApplicationSupportDirectory(); + + debugPrint('开始清理...'); + debugPrint('临时目录: ${tempDir.path}'); + debugPrint('文档目录: ${appDocDir.path}'); + debugPrint('支持目录: ${supportDir.path}'); + + await _deleteDirectory(tempDir); + await _deleteDirectory(appDocDir); + await _deleteDirectory(supportDir); + + debugPrint('原生清理完成'); + + if (mounted) { + Navigator.of(context).pop(); + Future.delayed(const Duration(milliseconds: 300), () { + if (mounted) { + _showExitConfirmDialog(); + } + }); + } + } catch (e) { + debugPrint('原生清理失败: $e'); + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('清理失败: $e'), backgroundColor: Colors.red), + ); + } + } + } + Future _clearCache() async { final confirmed = await _showConfirmDialog( '清空缓存', @@ -148,13 +332,49 @@ class _AppDataPageState extends State { if (confirmed != true) return; - if (mounted) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: const Text('缓存已清空'), - backgroundColor: AppConstants.primaryColor, - ), - ); + try { + final tempDir = await getTemporaryDirectory(); + if (await tempDir.exists()) { + await _deleteDirectory(tempDir); + } + + await _calculateCacheSize(); + + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: const Text('缓存已清空'), + backgroundColor: AppConstants.primaryColor, + ), + ); + } + } catch (e) { + debugPrint('清空缓存失败: $e'); + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('清空失败: $e'), backgroundColor: Colors.red), + ); + } + } + } + + Future _deleteDirectory(Directory dir) async { + try { + if (await dir.exists()) { + await for (FileSystemEntity entity in dir.list()) { + if (entity is File) { + try { + await entity.delete(); + } catch (e) { + debugPrint('删除文件失败: ${entity.path}, $e'); + } + } else if (entity is Directory) { + await _deleteDirectory(entity); + } + } + } + } catch (e) { + debugPrint('删除目录失败: ${dir.path}, $e'); } } @@ -221,6 +441,46 @@ class _AppDataPageState extends State { ); } + Future _showExitConfirmDialog() async { + final confirmed = await showDialog( + context: context, + builder: (context) => AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), + title: Row( + children: [ + Icon(Icons.power_settings_new, color: Colors.deepOrange[700]), + const SizedBox(width: 8), + const Expanded(child: Text('关闭应用', style: TextStyle(fontSize: 18))), + ], + ), + content: const Text('数据清理完成!\n\n建议关闭应用后重新启动,\n以确保应用正常运行。\n\n是否现在关闭应用?'), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context, false), + child: Text('稍后关闭', style: TextStyle(color: Colors.grey[600])), + ), + ElevatedButton( + onPressed: () => Navigator.pop(context, true), + style: ElevatedButton.styleFrom( + backgroundColor: Colors.deepOrange[700], + foregroundColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + child: const Text('立即关闭'), + ), + ], + ), + ); + + if (confirmed == true) { + if (mounted) { + SystemNavigator.pop(); + } + } + } + void _showSnackBar(String message) { ScaffoldMessenger.of(context).showSnackBar( SnackBar( @@ -303,13 +563,15 @@ class _AppDataPageState extends State { ], ), ), - _buildDataItem('📦 软件包', '情景诗词 v1.2.19'), + _buildDataItem('📦 软件包', _packageSize), _buildDivider(), _buildDataItem('📱 配置项数量', '$_sharedPrefsCount 项'), _buildDivider(), - _buildDataItem('💾 缓存大小', '计算中...'), + _buildDataItem('💾 缓存大小', _cacheSize), _buildDivider(), - _buildDataItem('📊 数据库大小', '计算中...'), + _buildDataItem('📊 数据大小', _dataSize), + _buildDivider(), + _buildDataItem('📁 占用空间', _totalSize), ], ), ); @@ -506,6 +768,14 @@ class _AppDataPageState extends State { Colors.red, _clearAllData, ), + _buildDivider(), + _buildActionButton( + '🔧 原生清理数据', + '删除应用数据目录所有文件', + Icons.system_security_update_warning, + Colors.orange, + _nativeClearData, + ), ], ), ); diff --git a/lib/views/profile/guide/beginner_page.dart b/lib/views/profile/guide/beginner_page.dart index e69de29..62de321 100644 --- a/lib/views/profile/guide/beginner_page.dart +++ b/lib/views/profile/guide/beginner_page.dart @@ -0,0 +1,860 @@ +import 'package:flutter/material.dart'; +import '../../../constants/app_constants.dart'; +import 'sp-guide.dart'; + +class BeginnerPage extends StatefulWidget { + const BeginnerPage({super.key}); + + @override + State createState() => _BeginnerPageState(); +} + +class _BeginnerPageState extends State + with TickerProviderStateMixin { + final ScrollController _scrollController = ScrollController(); + late AnimationController _fadeController; + late Animation _fadeAnimation; + double _progress = 0.0; + + final List> _tutorialSections = [ + { + 'title': '首页功能', + 'icon': Icons.home, + 'emoji': '🏠', + 'color': AppConstants.primaryColor, + 'features': [ + '精美卡片展示', + '智能推荐:根据时间和情景推荐合适的诗词', + '诗词详情:显示标题、作者、朝代、正文、注释和赏析', + '精选诗句:突出显示经典名句', + '下拉刷新:刷新诗词内容', + ], + }, + { + 'title': '发现页面', + 'icon': Icons.explore, + 'emoji': '🔍', + 'color': const Color(0xFF00BCD4), + 'features': [ + '分类浏览:按朝代、作者、主题等分类浏览', + '热门诗词:查看最受欢迎的诗词', + '活跃排行:查看活跃度最高的诗词', + '搜索功能:通过关键词搜索诗词', + 'Tab切换:分类、热门、搜索标签页', + ], + }, + { + 'title': '足迹页面', + 'icon': Icons.history, + 'emoji': '📚', + 'color': const Color(0xFFFF9800), + 'features': [ + '收藏管理:查看和管理所有收藏的诗词', + '笔记功能:创建和管理诗词笔记', + '分类展示:全部、点赞、笔记等分类', + '搜索功能:搜索收藏内容', + '视图切换:网格和列表视图', + ], + }, + { + 'title': '个人中心', + 'icon': Icons.person, + 'emoji': '👤', + 'color': const Color(0xFF4CAF50), + 'features': [ + '个人信息:编辑昵称、头像等', + '统计数据:今日浏览、累计浏览、今日点赞等', + '数据隐藏:可隐藏统计和答题数据', + '用户计划:加入用户体验计划', + '功能入口:设置、了解我们、权限管理等', + ], + }, + { + 'title': '诗词阅读', + 'icon': Icons.menu_book, + 'emoji': '📖', + 'color': const Color(0xFF9C27B0), + 'features': [ + '加载诗词:点击卡片任意区域加载下一条', + '查看详情:显示完整诗词信息', + '点赞诗词:点击心形图标', + '切换诗词:上一条/下一条按钮', + '长按复制:长按复制诗词内容', + ], + }, + { + 'title': '收藏功能', + 'icon': Icons.favorite, + 'emoji': '❤️', + 'color': const Color(0xFFE91E63), + 'features': [ + '一键收藏:点击收藏图标', + '收藏列表:在足迹页查看', + '取消收藏:再次点击收藏图标', + '收藏统计:显示收藏数量', + '创建笔记:从诗词创建笔记', + ], + }, + { + 'title': '搜索功能', + 'icon': Icons.search, + 'emoji': '🔎', + 'color': const Color(0xFF009688), + 'features': [ + '关键词搜索:输入关键词搜索', + '分类筛选:按分类筛选结果', + '热门搜索:查看热门搜索词', + '搜索历史:保留搜索记录', + '实时搜索:输入即时搜索', + ], + }, + { + 'title': '答题挑战', + 'icon': Icons.quiz, + 'emoji': '🎮', + 'color': const Color(0xFFFF5722), + 'features': [ + '答题挑战:参与诗词答题', + '题目随机化:使用Fisher-Yates算法', + '答题记录:记录历史和成绩', + '答题统计:正确率等数据', + '提示功能:遇到困难可获取提示', + ], + }, + { + 'title': '离线模式', + 'icon': Icons.wifi_off, + 'emoji': '📴', + 'color': const Color(0xFF607D8B), + 'features': [ + '离线数据下载:支持下载诗词和答题', + '下载选项:20/30/60/100条可选', + '后台下载:返回上一页继续下载', + '缓存管理:清空缓存可选择内容', + '自动切换:无网络自动切换', + ], + }, + { + 'title': '个性化设置', + 'icon': Icons.palette, + 'emoji': '🎨', + 'color': const Color(0xFF3F51B5), + 'features': [ + '主题切换:浅色/深色主题', + '卡片样式:三种样式可选', + '颜色自定义:主题色和背景色', + '圆角调整:卡片圆角大小', + '字体大小:调整字体大小', + ], + }, + { + 'title': '投稿功能', + 'icon': Icons.send, + 'emoji': '📝', + 'color': const Color(0xFF00BCD4), + 'features': [ + '诗词投稿:向软件投稿诗词', + '投稿表单:填写诗词信息', + '投稿记录:查看历史投稿', + '相似度检测:防止重复投稿', + '清空记录:清空投稿历史', + ], + }, + { + 'title': '投票功能', + 'icon': Icons.how_to_vote, + 'emoji': '🗳️', + 'color': const Color(0xFF795548), + 'features': [ + '用户投票:参与功能投票', + '投票结果:查看统计', + '登录注册:用户身份', + '自动注册:简化流程', + '投票详情:查看选项', + ], + }, + { + 'title': '桌面卡片', + 'icon': Icons.wb_sunny, + 'emoji': '🌤️', + 'color': const Color(0xFFFFC107), + 'features': [ + '天气显示:显示当前天气', + '城市显示:所在城市', + '十二时辰:中国传统计时', + '时间标签:子丑寅卯辰巳午未申酉戌亥', + '智能更新:自动更新时间', + ], + }, + { + 'title': '图片分享', + 'icon': Icons.share, + 'emoji': '📸', + 'color': const Color(0xFF03A9F4), + 'features': [ + '诗词分享:生成图片分享', + '软件分享:分享给朋友', + '复制功能:复制内容', + '高清图片:生成高质量图片', + '跨平台:支持多平台分享', + ], + }, + { + 'title': '数据管理', + 'icon': Icons.storage, + 'emoji': '💾', + 'color': const Color(0xFF8BC34A), + 'features': [ + '数据统计:显示数据占用', + '清空数据:清空应用数据', + '数据备份:备份数据', + '缓存管理:管理缓存', + '离线数据:管理离线数据', + ], + }, + { + 'title': '帮助与反馈', + 'icon': Icons.help, + 'emoji': '❓', + 'color': const Color(0xFF9E9E9E), + 'features': [ + '使用指南:查看使用说明', + '常见问题:FAQ解答', + '用户反馈:反馈问题', + '功能建议:提交建议', + '已知Bug:查看Bug列表', + ], + }, + ]; + + @override + void initState() { + super.initState(); + _scrollController.addListener(_onScroll); + _fadeController = AnimationController( + duration: const Duration(milliseconds: 500), + vsync: this, + ); + _fadeAnimation = CurvedAnimation( + parent: _fadeController, + curve: Curves.easeIn, + ); + _fadeController.forward(); + } + + @override + void dispose() { + _scrollController.removeListener(_onScroll); + _scrollController.dispose(); + _fadeController.dispose(); + super.dispose(); + } + + void _onScroll() { + if (_scrollController.hasClients) { + final maxScroll = _scrollController.position.maxScrollExtent; + final currentScroll = _scrollController.position.pixels; + final progress = maxScroll > 0 ? currentScroll / maxScroll : 0.0; + + if (mounted) { + setState(() { + _progress = progress; + }); + } + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[50], + body: Stack( + children: [ + FadeTransition( + opacity: _fadeAnimation, + child: CustomScrollView( + controller: _scrollController, + slivers: [ + SliverAppBar( + title: const Text( + '软件功能', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 17, + color: AppConstants.primaryColor, + ), + ), + backgroundColor: Colors.white, + foregroundColor: AppConstants.primaryColor, + elevation: 0, + centerTitle: true, + floating: true, + snap: true, + pinned: false, + actions: [ + IconButton( + icon: const Icon(Icons.help_outline), + color: AppConstants.primaryColor, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + const SpGuidePage(fromSettings: true), + ), + ); + }, + ), + ], + ), + SliverPadding( + padding: const EdgeInsets.fromLTRB(16, 16, 16, 100), + sliver: SliverList( + delegate: SliverChildBuilderDelegate((context, index) { + return _buildSectionCard(_tutorialSections[index], index); + }, childCount: _tutorialSections.length), + ), + ), + ], + ), + ), + _buildProgressIndicator(), + ], + ), + ); + } + + Widget _buildSectionCard(Map section, int index) { + return TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: Duration(milliseconds: 300 + (index * 50)), + curve: Curves.easeOut, + builder: (context, value, child) { + return Transform.translate( + offset: Offset(0, 20 * (1 - value)), + child: Opacity(opacity: value, child: child), + ); + }, + child: Container( + margin: const EdgeInsets.only(bottom: 16), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.05), + blurRadius: 12, + offset: const Offset(0, 2), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 48, + height: 48, + decoration: BoxDecoration( + color: (section['color'] as Color).withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(14), + ), + child: Center( + child: Text( + section['emoji'], + style: const TextStyle(fontSize: 24), + ), + ), + ), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + section['title'], + style: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + color: Colors.black87, + letterSpacing: -0.3, + ), + ), + const SizedBox(height: 4), + Text( + '第 ${index + 1} 部分', + style: TextStyle( + fontSize: 13, + color: Colors.grey[500], + fontWeight: FontWeight.w400, + ), + ), + ], + ), + ), + ], + ), + const SizedBox(height: 20), + _buildSectionContent(section['features'], section['color']), + const SizedBox(height: 16), + if (index < 4) ...[ + const Divider(height: 1, color: Color(0xFFF5F5F5)), + const SizedBox(height: 16), + _buildPreviewSection(section['title']), + ], + ], + ), + ), + ), + ); + } + + Widget _buildSectionContent(List features, Color color) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: features.map((feature) { + return Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 6, + height: 6, + margin: const EdgeInsets.only(top: 8, right: 12), + decoration: BoxDecoration(color: color, shape: BoxShape.circle), + ), + Expanded( + child: Text( + feature, + style: TextStyle( + fontSize: 15, + color: Colors.grey[700], + height: 1.5, + fontWeight: FontWeight.w400, + ), + ), + ), + ], + ), + ); + }).toList(), + ); + } + + Widget _buildPreviewSection(String title) { + Widget preview; + switch (title) { + case '首页功能': + preview = _buildHomePreview(); + break; + case '发现页面': + preview = _buildDiscoverPreview(); + break; + case '足迹页面': + preview = _buildFootprintPreview(); + break; + case '个人中心': + preview = _buildProfilePreview(); + break; + default: + preview = const SizedBox.shrink(); + } + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + Icons.visibility_outlined, + size: 16, + color: AppConstants.primaryColor, + ), + const SizedBox(width: 6), + Text( + '界面预览', + style: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w600, + color: AppConstants.primaryColor, + ), + ), + ], + ), + const SizedBox(height: 12), + preview, + ], + ); + } + + Widget _buildHomePreview() { + return Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.grey[100], + borderRadius: BorderRadius.circular(12), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 32, + height: 32, + decoration: BoxDecoration( + color: AppConstants.primaryColor.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(8), + ), + child: Icon( + Icons.book, + size: 18, + color: AppConstants.primaryColor, + ), + ), + const SizedBox(width: 10), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '静夜思', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Colors.grey[800], + ), + ), + Text( + '唐·李白', + style: TextStyle(fontSize: 12, color: Colors.grey[500]), + ), + ], + ), + ], + ), + const SizedBox(height: 12), + Container( + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Text( + '床前明月光,疑是地上霜。\n举头望明月,低头思故乡。', + style: TextStyle( + fontSize: 14, + color: Colors.grey[700], + height: 1.6, + ), + textAlign: TextAlign.center, + ), + ), + const SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _buildPreviewAction(Icons.favorite_border, '点赞'), + _buildPreviewAction(Icons.bookmark_border, '收藏'), + _buildPreviewAction(Icons.share_outlined, '分享'), + ], + ), + ], + ), + ); + } + + Widget _buildDiscoverPreview() { + return Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.grey[100], + borderRadius: BorderRadius.circular(12), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + ), + child: Row( + children: [ + Icon(Icons.search, size: 18, color: Colors.grey[400]), + const SizedBox(width: 8), + Text( + '搜索诗词...', + style: TextStyle(fontSize: 14, color: Colors.grey[400]), + ), + ], + ), + ), + const SizedBox(height: 12), + Row( + children: [ + _buildPreviewTag('唐诗'), + const SizedBox(width: 8), + _buildPreviewTag('宋词'), + const SizedBox(width: 8), + _buildPreviewTag('元曲'), + ], + ), + const SizedBox(height: 12), + _buildPreviewListItem('将进酒', '李白'), + const SizedBox(height: 8), + _buildPreviewListItem('水调歌头', '苏轼'), + ], + ), + ); + } + + Widget _buildFootprintPreview() { + return Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.grey[100], + borderRadius: BorderRadius.circular(12), + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _buildPreviewStat('128', '收藏'), + _buildPreviewStat('45', '笔记'), + _buildPreviewStat('89', '点赞'), + ], + ), + const SizedBox(height: 12), + _buildPreviewListItem('静夜思', '已收藏'), + const SizedBox(height: 8), + _buildPreviewListItem('春晓', '有笔记'), + ], + ), + ); + } + + Widget _buildProfilePreview() { + return Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.grey[100], + borderRadius: BorderRadius.circular(12), + ), + child: Column( + children: [ + Row( + children: [ + Container( + width: 48, + height: 48, + decoration: BoxDecoration( + color: AppConstants.primaryColor.withValues(alpha: 0.2), + borderRadius: BorderRadius.circular(24), + ), + child: const Center( + child: Text('👤', style: TextStyle(fontSize: 24)), + ), + ), + const SizedBox(width: 12), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '诗词爱好者', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Colors.grey[800], + ), + ), + Text( + 'Lv.12 · 诗意生活', + style: TextStyle(fontSize: 12, color: Colors.grey[500]), + ), + ], + ), + ], + ), + const SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _buildPreviewStat('156', '浏览'), + _buildPreviewStat('89', '点赞'), + _buildPreviewStat('45', '答题'), + ], + ), + ], + ), + ); + } + + Widget _buildPreviewAction(IconData icon, String label) { + return Column( + children: [ + Icon(icon, size: 20, color: Colors.grey[600]), + const SizedBox(height: 4), + Text(label, style: TextStyle(fontSize: 11, color: Colors.grey[600])), + ], + ); + } + + Widget _buildPreviewTag(String text) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + border: Border.all( + color: AppConstants.primaryColor.withValues(alpha: 0.3), + ), + ), + child: Text( + text, + style: TextStyle( + fontSize: 12, + color: AppConstants.primaryColor, + fontWeight: FontWeight.w500, + ), + ), + ); + } + + Widget _buildPreviewListItem(String title, String subtitle) { + return Container( + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + style: TextStyle( + fontSize: 14, + color: Colors.grey[700], + fontWeight: FontWeight.w500, + ), + ), + Text( + subtitle, + style: TextStyle(fontSize: 12, color: Colors.grey[500]), + ), + ], + ), + ); + } + + Widget _buildPreviewStat(String value, String label) { + return Column( + children: [ + Text( + value, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: AppConstants.primaryColor, + ), + ), + const SizedBox(height: 2), + Text(label, style: TextStyle(fontSize: 11, color: Colors.grey[500])), + ], + ); + } + + Widget _buildProgressIndicator() { + return Positioned( + left: 0, + top: 0, + bottom: 0, + child: Container( + width: 60, + padding: const EdgeInsets.symmetric(vertical: 20), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + Colors.white.withValues(alpha: 0.95), + Colors.white.withValues(alpha: 0.85), + Colors.white.withValues(alpha: 0.0), + ], + stops: const [0.0, 0.7, 1.0], + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 8, + height: 200, + decoration: BoxDecoration( + color: Colors.grey[200], + borderRadius: BorderRadius.circular(4), + ), + child: Stack( + children: [ + AnimatedPositioned( + duration: const Duration(milliseconds: 200), + curve: Curves.easeOut, + top: _progress * 160, + child: Container( + width: 8, + height: 40, + decoration: BoxDecoration( + color: AppConstants.primaryColor, + borderRadius: BorderRadius.circular(4), + boxShadow: [ + BoxShadow( + color: AppConstants.primaryColor.withValues( + alpha: 0.3, + ), + blurRadius: 8, + offset: const Offset(0, 2), + ), + ], + ), + ), + ), + ], + ), + ), + const SizedBox(height: 12), + AnimatedContainer( + duration: const Duration(milliseconds: 200), + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), + decoration: BoxDecoration( + color: AppConstants.primaryColor, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: AppConstants.primaryColor.withValues(alpha: 0.2), + blurRadius: 4, + offset: const Offset(0, 2), + ), + ], + ), + child: Text( + '${(_progress * 100).toInt()}%', + style: const TextStyle( + color: Colors.white, + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.2, + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/views/profile/guide/sp-guide.dart b/lib/views/profile/guide/sp-guide.dart index 7a24e32..873d91d 100644 --- a/lib/views/profile/guide/sp-guide.dart +++ b/lib/views/profile/guide/sp-guide.dart @@ -475,7 +475,7 @@ class _SpGuidePageState extends State ), ), const SizedBox(width: 8), - _buildShowGuideCheckbox(), + // _buildShowGuideCheckbox(), ], ), ], diff --git a/lib/views/profile/profile_page.dart b/lib/views/profile/profile_page.dart index 5b0b8e1..a93064a 100644 --- a/lib/views/profile/profile_page.dart +++ b/lib/views/profile/profile_page.dart @@ -621,7 +621,7 @@ class _ProfilePageState extends State _buildSettingsItem( '开发计划', Icons.analytics, - () => _showSnackBar('软件开发进度'), + () => _showSnackBar('首个上线版本暂无计划,待收集整理用户建议'), ), _buildSettingsItem('去投稿', Icons.edit_note, () { Navigator.push( diff --git a/lib/views/profile/settings/learn-us.dart b/lib/views/profile/settings/learn-us.dart index 0012f5a..ad9d4bd 100644 --- a/lib/views/profile/settings/learn-us.dart +++ b/lib/views/profile/settings/learn-us.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import '../../../config/app_config.dart'; import '../../../constants/app_constants.dart'; /// 时间: 2026-03-26 @@ -39,7 +40,7 @@ class LearnUsPage extends StatelessWidget { const SizedBox(height: 16), _buildQQGroupCard(context), const SizedBox(height: 16), - _buildDeveloperCard(), + _buildDeveloperCard(context), const SizedBox(height: 16), _buildTeamCard(), const SizedBox(height: 16), @@ -127,7 +128,7 @@ class LearnUsPage extends StatelessWidget { ), const SizedBox(width: 6), Text( - '版本 ${AppConstants.appVersion}', + '版本 ${AppConfig.appVersion}', style: const TextStyle( fontSize: 12, color: Colors.white, @@ -215,7 +216,7 @@ class LearnUsPage extends StatelessWidget { const SizedBox(width: 8), Expanded( child: Text( - 'https://*****.github.io', + 'https://poe.vogov.cn/app.html', style: TextStyle( fontSize: 14, color: AppConstants.primaryColor, @@ -347,7 +348,7 @@ class LearnUsPage extends StatelessWidget { ); } - Widget _buildDeveloperCard() { + Widget _buildDeveloperCard(BuildContext context) { return Container( decoration: BoxDecoration( color: Colors.white, @@ -467,7 +468,7 @@ class LearnUsPage extends StatelessWidget { const Text( '2821981550@qq.com', style: TextStyle( - fontSize: 13, + fontSize: 15, color: Colors.blue, decoration: TextDecoration.underline, ), @@ -478,6 +479,95 @@ class LearnUsPage extends StatelessWidget { ], ), ), + Padding( + padding: const EdgeInsets.fromLTRB(16, 8, 16, 16), + child: Row( + children: [ + Container( + width: 50, + height: 50, + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [ + const Color(0xFF07C160).withValues(alpha: 0.1), + const Color(0xFF07C160).withValues(alpha: 0.05), + ], + ), + borderRadius: BorderRadius.circular(12), + ), + child: const Center( + child: Text('💬', style: TextStyle(fontSize: 24)), + ), + ), + const SizedBox(width: 12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + '微信公众号', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 4), + Container( + padding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 6, + ), + decoration: BoxDecoration( + color: const Color(0xFF07C160).withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(8), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon( + Icons.search, + size: 16, + color: Color(0xFF07C160), + ), + const SizedBox(width: 6), + const Text( + '微风暴', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xFF07C160), + ), + ), + const SizedBox(width: 8), + GestureDetector( + onTap: () { + Clipboard.setData( + const ClipboardData(text: '微风暴'), + ); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('已复制到剪贴板'), + duration: Duration(seconds: 2), + ), + ); + }, + child: Icon( + Icons.content_copy, + size: 16, + color: const Color( + 0xFF07C160, + ).withValues(alpha: 0.8), + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), ], ), ); @@ -519,7 +609,6 @@ class LearnUsPage extends StatelessWidget { ], ), ), - const Divider(height: 1), _buildTeamMember('💻', '程序设计', '无书的书🤡', '尽毕生所学,取天下之诗集,只为逗她一笑'), _buildTeamMember('🎨', 'UI/UX/Testing', 'Ayk', '....'), _buildTeamMember('⚙️', '后端', '伯乐不相马', '真的吗,还是做不到吗?'), diff --git a/lib/views/profile/settings/privacy.dart b/lib/views/profile/settings/privacy.dart index 2aeb294..1603b7d 100644 --- a/lib/views/profile/settings/privacy.dart +++ b/lib/views/profile/settings/privacy.dart @@ -22,7 +22,7 @@ class PrivacyPolicyContent extends StatelessWidget { _buildUpdateDate('2026.3.26'), const SizedBox(height: 24), _buildParagraph( - '情景诗词 是由 *****工作室 (以下简称"我们")为您提供的,用于在诗词里旅行,在文化中生长的应用。本隐私声明由我们为处理您的个人信息而制定。', + '情景诗词 是由 弥勒市朋普镇微风暴网络科技工作室 (以下简称"我们")为您提供的,用于在诗词里旅行,在文化中生长的应用。本隐私声明由我们为处理您的个人信息而制定。', ), const SizedBox(height: 16), _buildParagraph( @@ -47,6 +47,8 @@ class PrivacyPolicyContent extends StatelessWidget { const SizedBox(height: 16), _buildPermissionItem('存储权限', '用于保存和读取您的笔记、收藏等本地数据'), _buildPermissionItem('网络权限', '用于获取诗词内容和更新应用信息'), + _buildPermissionItem('震动权限', '用于在执行操作时提供反馈提示'), + _buildPermissionItem('分享能力', '调用系统分享功能,分享您的笔记、收藏等本地数据'), const SizedBox(height: 24), _buildSectionTitle('3. 管理您的个人信息'), const SizedBox(height: 16), @@ -64,9 +66,9 @@ class PrivacyPolicyContent extends StatelessWidget { const SizedBox(height: 16), _buildParagraph('您可通过以下方式联系我们,并行使您的相关权利,我们会尽快回复。'), const SizedBox(height: 12), - _buildContactInfo('开发者', '*****工作室'), - _buildContactInfo('地址', '云南昆明'), - _buildContactInfo('邮箱', '********@outlook.com'), + _buildContactInfo('开发者', '弥勒市朋普镇微风暴网络科技工作室'), + _buildContactInfo('地址', '云南 昆明 西山区'), + _buildContactInfo('邮箱', '2821981550@qq.com'), const SizedBox(height: 16), _buildParagraph( '如果您对我们的回复不满意,特别是当个人信息处理行为损害了您的合法权益时,您还可以通过向有管辖权的人民法院提起诉讼、向行业自律协会或政府相关管理机构投诉等外部途径进行解决。您也可以向我们了解可能适用的相关投诉途径的信息。', @@ -74,6 +76,7 @@ class PrivacyPolicyContent extends StatelessWidget { const SizedBox(height: 24), _buildEffectiveDate('2026年3月26日'), _buildBottomIndicator(), + _buildParagraph(''), ], ), ); @@ -240,13 +243,13 @@ class UserAgreementContent extends StatelessWidget { _buildEffectiveDate('2026-03-26'), const SizedBox(height: 24), _buildParagraph( - '欢迎使用 情景诗词(以下简称"本App")。本用户协议由个人开发者 *****工作室 制定。用户在下载、安装、注册、登录、使用本App服务前,应当仔细阅读并充分理解本协议内容。用户开始使用本App,即视为同意本协议全部条款。', + '欢迎使用 情景诗词(以下简称"本App")。本用户协议由 弥勒市朋普镇微风暴网络科技工作室 制定。用户在下载、安装、注册、登录、使用本App服务前,应当仔细阅读并充分理解本协议内容。用户开始使用本App,即视为同意本协议全部条款。', ), const SizedBox(height: 24), _buildSectionTitle('一、协议适用范围'), const SizedBox(height: 16), _buildParagraph( - '本协议适用于用户与开发者 *****工作室 之间,关于用户使用 情景诗词 产品及服务所建立的权利义务关系。', + '本协议适用于用户与开发者 弥勒市朋普镇微风暴网络科技工作室 之间,关于用户使用 情景诗词 产品及服务所建立的权利义务关系。', ), const SizedBox(height: 24), _buildSectionTitle('二、服务内容'), @@ -301,11 +304,12 @@ class UserAgreementContent extends StatelessWidget { const SizedBox(height: 24), _buildSectionTitle('九、联系方式'), const SizedBox(height: 16), - _buildContactInfo('开发者', '*****工作室'), + _buildContactInfo('开发者', '弥勒市朋普镇微风暴网络科技工作室'), _buildContactInfo('应用名称', '情景诗词'), - _buildContactInfo('联系邮箱', '********@outlook.com'), + _buildContactInfo('联系邮箱', '2821981550@qq.com'), const SizedBox(height: 24), _buildBottomIndicator(), + _buildParagraph(''), ], ), ); @@ -478,7 +482,7 @@ class _PrivacyPageState extends State border: Border.all(color: Colors.grey[300]!), ), child: SelectableText( - 'https://*****.github.io/privacy', + 'https://poe.vogov.cn/privacy.html', style: TextStyle( fontSize: 13, color: AppConstants.primaryColor, @@ -501,7 +505,7 @@ class _PrivacyPageState extends State ElevatedButton.icon( onPressed: () { Clipboard.setData( - const ClipboardData(text: 'https://*****.github.io/privacy'), + const ClipboardData(text: 'https://poe.vogov.cn/privacy.html'), ); Navigator.pop(context); ScaffoldMessenger.of(context).showSnackBar( diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png index 82b6f9d..300c9d0 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png index 13b35eb..8d4fdda 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png index 0a3f5fa..e220ca9 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png index bdb5722..946a71d 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png index f083318..2d7f0c6 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png index 326c0e7..dcdf4d3 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png index 2f1632c..a8c9629 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/ohos/AppScope/app.json5 b/ohos/AppScope/app.json5 index 038b084..819b4d4 100644 --- a/ohos/AppScope/app.json5 +++ b/ohos/AppScope/app.json5 @@ -1,9 +1,9 @@ { "app": { - "bundleName": "app.whushu.poes", - "vendor": "example", - "versionCode": 26032601, - "versionName": "1.5.0", + "bundleName": "app.wushu.poes", + "vendor": "微风暴", + "versionCode": 26040101, + "versionName": "1.3.1", "icon": "$media:app_icon", "label": "$string:app_name" } diff --git a/ohos/AppScope/resources/base/element/string.json b/ohos/AppScope/resources/base/element/string.json index e31bbcd..41d8739 100644 --- a/ohos/AppScope/resources/base/element/string.json +++ b/ohos/AppScope/resources/base/element/string.json @@ -2,7 +2,7 @@ "string": [ { "name": "app_name", - "value": "flutter_application_2" + "value": "情景诗词" } ] } diff --git a/ohos/AppScope/resources/base/media/app_icon.png b/ohos/AppScope/resources/base/media/app_icon.png index ce307a8..f3c3131 100644 Binary files a/ohos/AppScope/resources/base/media/app_icon.png and b/ohos/AppScope/resources/base/media/app_icon.png differ diff --git a/ohos/build-profile.json5 b/ohos/build-profile.json5 index 71bb6ab..f599cc9 100644 --- a/ohos/build-profile.json5 +++ b/ohos/build-profile.json5 @@ -5,35 +5,41 @@ "name": "default", "type": "HarmonyOS", "material": { - "certpath": "C:\\Users\\无书\\.ohos\\config\\default_ohos_hWyPJmkoRvc13RxcUC3NSaiad5bS6MHBrY9nkKd-288=.cer", + "certpath": "C:/Users/无书/.ohos/config/default_ohos_hWyPJmkoRvc13RxcUC3NSaiad5bS6MHBrY9nkKd-288=.cer", "keyAlias": "debugKey", - "keyPassword": "0000001BF7F4F2744D33517095133386B3CAD90A3AB42BFD0069CF7CBFDFCAEE521062FD5D9C3EBA827534", - "profile": "C:\\Users\\无书\\.ohos\\config\\default_ohos_hWyPJmkoRvc13RxcUC3NSaiad5bS6MHBrY9nkKd-288=.p7b", + "keyPassword": "0000001B675E31900A26DD43D5BAE7CDC29AC560497DAE61594206507C57058DF31D24E44F7E7847222D72", + "profile": "C:/Users/无书/.ohos/config/default_ohos_hWyPJmkoRvc13RxcUC3NSaiad5bS6MHBrY9nkKd-288=.p7b", "signAlg": "SHA256withECDSA", - "storeFile": "C:\\Users\\无书\\.ohos\\config\\default_ohos_hWyPJmkoRvc13RxcUC3NSaiad5bS6MHBrY9nkKd-288=.p12", - "storePassword": "0000001B8B77ACFC8F396F2040DA9156A7482FCF2AADA0B573BCAD12D0612BC813F694D501263B5961FB96" + "storeFile": "C:/Users/无书/.ohos/config/default_ohos_hWyPJmkoRvc13RxcUC3NSaiad5bS6MHBrY9nkKd-288=.p12", + "storePassword": "0000001BC2CC19FF457937BA7ADA3E0A3DD48065FC3A82D6186E7055C2164A061265A691D49E0783D3A718" } }, { - "name": "rele", + "name": "release", "type": "HarmonyOS", "material": { - "certpath": "C:/Users/无书/Desktop/签名/520kiss123.cer", + "certpath": "D:/zhshu/520kiss123.cer", "keyAlias": "520kiss123", - "keyPassword": "0000001AFB03935394E980F7E15F953FCD2AE86B72D10BFA1CD63ED86241692114C64F73093C17F2B715", - "profile": "C:/Users/无书/Desktop/签名/520kiss123.p7b", + "keyPassword": "0000001ADC811A155E80C47E61C324586F0FA08B1F383DB23026B17B7076AAE123458B9A5FE2DE812751", + "profile": "D:/zhshu/520kiss123Release.p7b", "signAlg": "SHA256withECDSA", - "storeFile": "C:/Users/无书/Desktop/签名/520kiss123.p12", - "storePassword": "0000001A7E63450C86AEA2810CF4C8A92877AA980D6BCE46E392AEA3F4446CEBB21D1733E5F7581EBF22" + "storeFile": "D:/zhshu/520kiss123.p12", + "storePassword": "0000001AA1C222C2D3454B69525FC0FFF7AD37F3966FCDC782DC9BF88D3F5A241892C1FB35EB36B01888" } } ], "products": [ { "name": "default", - // "signingConfig": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", + "runtimeOS": "HarmonyOS", + "targetSdkVersion": "6.0.2(22)" + }, + { + "name": "release", + "signingConfig": "release", + "compatibleSdkVersion": "5.0.1(13)", "runtimeOS": "HarmonyOS", "targetSdkVersion": "6.0.2(22)" } @@ -58,7 +64,8 @@ { "name": "default", "applyToProducts": [ - "default" + "default", + "release" ] } ] diff --git a/ohos/entry/src/main/ets/pages/WidgetSettings.ets b/ohos/entry/src/main/ets/pages/WidgetSettings.ets index f195d00..34eeaaa 100644 --- a/ohos/entry/src/main/ets/pages/WidgetSettings.ets +++ b/ohos/entry/src/main/ets/pages/WidgetSettings.ets @@ -6,8 +6,8 @@ import { preferences } from '@kit.ArkData'; struct WidgetSettings { @State selectedStyle: string = 'classic'; @State showTime: boolean = true; - @State showWeather: boolean = true; - @State showQuote: boolean = true; + @State showWeather: boolean = false; + @State showQuote: boolean = false; @State quoteText: string = '床前明月光,疑是地上霜。'; @State authorText: string = '李白《静夜思》'; private preference: preferences.Preferences | null = null; @@ -26,11 +26,11 @@ struct WidgetSettings { this.showTime = Boolean(showTimeVal); console.info('[WidgetSettings] showTime raw value: ' + showTimeVal + ', type: ' + typeof showTimeVal + ', parsed: ' + this.showTime); - const showWeatherVal = await this.preference.get('showWeather', true); + const showWeatherVal = await this.preference.get('showWeather', false); this.showWeather = Boolean(showWeatherVal); console.info('[WidgetSettings] showWeather raw value: ' + showWeatherVal + ', type: ' + typeof showWeatherVal + ', parsed: ' + this.showWeather); - const showQuoteVal = await this.preference.get('showQuote', true); + const showQuoteVal = await this.preference.get('showQuote', false); this.showQuote = Boolean(showQuoteVal); this.quoteText = await this.preference.get('quote', '床前明月光,疑是地上霜。') as string; diff --git a/ohos/entry/src/main/resources/base/element/string.json b/ohos/entry/src/main/resources/base/element/string.json index 6678ce1..d498bb5 100644 --- a/ohos/entry/src/main/resources/base/element/string.json +++ b/ohos/entry/src/main/resources/base/element/string.json @@ -6,7 +6,7 @@ }, { "name": "EntryAbility_desc", - "value": "📜 诗词卡片主程序" + "value": "诗词卡片主程序" }, { "name": "EntryAbility_label", @@ -18,7 +18,7 @@ }, { "name": "WidgetFormAbility_label", - "value": "📜 每日诗词" + "value": "每日诗词" }, { "name": "WidgetMenuAbility_desc", @@ -26,23 +26,23 @@ }, { "name": "WidgetMenuAbility_label", - "value": "⚙️ 卡片选项" + "value": "情景诗词" }, { "name": "shortcut_add_widget", - "value": "➕ 笔记" + "value": "笔记" }, { "name": "shortcut_widget_settings", - "value": "🔧 卡片信息" + "value": "卡片信息" }, { "name": "shortcut_open_app", - "value": "📱 打开应用" + "value": "打开应用" }, { "name": "menu_style_classic", - "value": "🎨 经典风格" + "value": "经典风格" }, { "name": "menu_style_classic_desc", @@ -50,7 +50,7 @@ }, { "name": "menu_style_modern", - "value": "✨ 现代风格" + "value": "现代风格" }, { "name": "menu_style_modern_desc", @@ -58,7 +58,7 @@ }, { "name": "menu_style_minimal", - "value": "◽ 极简风格" + "value": "极简风格" }, { "name": "menu_style_minimal_desc", @@ -66,7 +66,7 @@ }, { "name": "menu_style_elegant", - "value": "💎 优雅风格" + "value": "优雅风格" }, { "name": "menu_style_elegant_desc", @@ -74,27 +74,27 @@ }, { "name": "widget_display_name_small", - "value": "🎋 诗词短句" + "value": "诗词短句" }, { "name": "widget_display_name_medium", - "value": "📖 经典诗词" + "value": "经典诗词" }, { "name": "widget_display_name_large", - "value": "🎨 诗词意境" + "value": "诗词意境" }, { "name": "widget_desc_small", - "value": "📱 小尺寸2x2卡片,展示精选诗词短句" + "value": "小尺寸2x2卡片,展示精选诗词短句" }, { "name": "widget_desc_medium", - "value": "📱 中等尺寸2x4卡片,展示经典诗词作品" + "value": "中等尺寸2x4卡片,展示经典诗词作品" }, { "name": "widget_desc_large", - "value": "📱 大尺寸4x4卡片,完整展示诗词意境" + "value": "大尺寸4x4卡片,完整展示诗词意境" } ] } diff --git a/ohos/entry/src/main/resources/base/media/icon.png b/ohos/entry/src/main/resources/base/media/icon.png index ce307a8..4a22e9e 100644 Binary files a/ohos/entry/src/main/resources/base/media/icon.png and b/ohos/entry/src/main/resources/base/media/icon.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_216.png b/ohos/entry/src/main/resources/base/media/icon_216.png new file mode 100644 index 0000000..74ade02 Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_216.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_48.png b/ohos/entry/src/main/resources/base/media/icon_48.png new file mode 100644 index 0000000..f04c617 Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_48.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_512.png b/ohos/entry/src/main/resources/base/media/icon_512.png new file mode 100644 index 0000000..dcdf4d3 Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_512.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_72.png b/ohos/entry/src/main/resources/base/media/icon_72.png new file mode 100644 index 0000000..619412f Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_72.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_96.png b/ohos/entry/src/main/resources/base/media/icon_96.png new file mode 100644 index 0000000..d4dc8e3 Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_96.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_large.png b/ohos/entry/src/main/resources/base/media/icon_large.png new file mode 100644 index 0000000..f3c3131 Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_large.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_small.png b/ohos/entry/src/main/resources/base/media/icon_small.png new file mode 100644 index 0000000..2e82501 Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_small.png differ diff --git a/ohos/entry/src/main/resources/base/media/icon_xlarge.png b/ohos/entry/src/main/resources/base/media/icon_xlarge.png new file mode 100644 index 0000000..946a71d Binary files /dev/null and b/ohos/entry/src/main/resources/base/media/icon_xlarge.png differ diff --git a/ohos/entry/src/main/resources/base/profile/shortcuts_config.json b/ohos/entry/src/main/resources/base/profile/shortcuts_config.json index cd7862c..1efcf4a 100644 --- a/ohos/entry/src/main/resources/base/profile/shortcuts_config.json +++ b/ohos/entry/src/main/resources/base/profile/shortcuts_config.json @@ -6,7 +6,7 @@ "icon": "$media:icon", "wants": [ { - "bundleName": "app.whushu.poes", + "bundleName": "app.wushu.poes", "moduleName": "entry", "abilityName": "EntryAbility" } diff --git a/ohos/entry/src/main/resources/en_US/element/string.json b/ohos/entry/src/main/resources/en_US/element/string.json index e57ee2d..0416f2c 100644 --- a/ohos/entry/src/main/resources/en_US/element/string.json +++ b/ohos/entry/src/main/resources/en_US/element/string.json @@ -10,7 +10,7 @@ }, { "name": "EntryAbility_label", - "value": "📜 Poetry Card" + "value": "Poetry Card" }, { "name": "WidgetFormAbility_desc", @@ -18,7 +18,7 @@ }, { "name": "WidgetFormAbility_label", - "value": "📜 Daily Poetry" + "value": "Daily Poetry" }, { "name": "WidgetMenuAbility_desc", @@ -26,31 +26,31 @@ }, { "name": "WidgetMenuAbility_label", - "value": "⚙️ Widget Options" + "value": "Widget Options" }, { "name": "widget_display_name_small", - "value": "🎋 Poetry Phrase" + "value": "Poetry Phrase" }, { "name": "widget_display_name_medium", - "value": "📖 Classic Poetry" + "value": "Classic Poetry" }, { "name": "widget_display_name_large", - "value": "🎨 Poetry Mood" + "value": "Poetry Mood" }, { "name": "widget_desc_small", - "value": "📱 Small 2x2 card, showing selected poetry phrases" + "value": "Small 2x2 card, showing selected poetry phrases" }, { "name": "widget_desc_medium", - "value": "📱 Medium 2x4 card, showing classic poetry works" + "value": "Medium 2x4 card, showing classic poetry works" }, { "name": "widget_desc_large", - "value": "📱 Large 4x4 card, showing complete poetry mood" + "value": "Large 4x4 card, showing complete poetry mood" } ] -} +} \ No newline at end of file diff --git a/ohos/entry/src/main/resources/zh_CN/element/string.json b/ohos/entry/src/main/resources/zh_CN/element/string.json index 6b0f18d..c3d1618 100644 --- a/ohos/entry/src/main/resources/zh_CN/element/string.json +++ b/ohos/entry/src/main/resources/zh_CN/element/string.json @@ -18,7 +18,7 @@ }, { "name": "WidgetFormAbility_label", - "value": "📜 每日诗词" + "value": "每日诗词" }, { "name": "WidgetMenuAbility_desc", @@ -26,31 +26,31 @@ }, { "name": "WidgetMenuAbility_label", - "value": "⚙️ 卡片选项" + "value": "情景诗词" }, { "name": "widget_display_name_small", - "value": "🎋 诗词短句" + "value": "诗词短句" }, { "name": "widget_display_name_medium", - "value": "📖 经典诗词" + "value": "经典诗词" }, { "name": "widget_display_name_large", - "value": "🎨 诗词意境" + "value": "诗词意境" }, { "name": "widget_desc_small", - "value": "📱 小尺寸2x2卡片,展示精选诗词短句" + "value": "小尺寸2x2卡片,展示精选诗词短句" }, { "name": "widget_desc_medium", - "value": "📱 中等尺寸2x4卡片,展示经典诗词作品" + "value": "中等尺寸2x4卡片,展示经典诗词作品" }, { "name": "widget_desc_large", - "value": "📱 大尺寸4x4卡片,完整展示诗词意境" + "value": "大尺寸4x4卡片,完整展示诗词意境" } ] } diff --git a/ohos/oh-package.json5 b/ohos/oh-package.json5 index d23e9c7..033211d 100644 --- a/ohos/oh-package.json5 +++ b/ohos/oh-package.json5 @@ -1,7 +1,7 @@ { "modelVersion": "5.1.0", - "name": "flutter_application_2", - "version": "1.0.0", + "name": "情景诗词", + "version": "1.3.1", "description": "Please describe the basic information.", "main": "", "author": "", diff --git a/pubspec.yaml b/pubspec.yaml index 73e1036..00fd1a0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: flutter_application_2 +name: poes description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.3.12+3 +version: 1.3.12+26040101 environment: sdk: ^3.9.2