From 956bd2525c6d3628dc91b3f20b983b02b22b0c8a Mon Sep 17 00:00:00 2001 From: tanlongsheng <252620078@qq.com> Date: Fri, 8 Aug 2025 15:26:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/data/services/novice_guide_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/data/services/novice_guide_service.dart b/lib/data/services/novice_guide_service.dart index d0ef6ccc7..d32be2368 100644 --- a/lib/data/services/novice_guide_service.dart +++ b/lib/data/services/novice_guide_service.dart @@ -11,7 +11,7 @@ class NoviceGuideService extends GetxService { final BleService _bleService = BleService(); StreamSubscription? _statusSubscription; - bool isHomeGuide = false; + bool isHomeGuide = true; bool isAIGuide = true; RxBool isWakeup = false.obs; From 3f5591f1cfe03c0e93dd553637c5b80aab29e0e4 Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Fri, 8 Aug 2025 15:29:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor(settings):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E7=9A=84=E9=9A=90=E7=A7=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=92=8C=E5=88=86=E9=9A=94=E7=BA=BF=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理不再使用的隐私设置相关代码,保持代码整洁 --- lib/modules/settings/views/settings_view.dart | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/modules/settings/views/settings_view.dart b/lib/modules/settings/views/settings_view.dart index 8c12701a1..b30e3e8fd 100644 --- a/lib/modules/settings/views/settings_view.dart +++ b/lib/modules/settings/views/settings_view.dart @@ -419,29 +419,29 @@ class SettingsView extends GetView { isDarkMode: isDarkMode, ), // if (Platform.isAndroid) ...[ - Divider( - height: 1, - color: isDarkMode - ? Colors.white.withOpacity(0.1) - : Colors.grey[200]), + // Divider( + // height: 1, + // color: isDarkMode + // ? Colors.white.withOpacity(0.1) + // : Colors.grey[200]), - // 隐私设置 - _buildSimpleNavigationSetting( - title: 'privacySettings'.tr, // 隐私设置 - subtitle: 'privacySettingsInfo'.tr, // 管理数据收集和权限 - icon: Icons.shield_outlined, - iconBgColor: isDarkMode - ? Colors.purple[900]!.withOpacity(0.3) - : Colors.purple[100]!, - iconColor: - isDarkMode ? Colors.purple[300]! : Colors.purple[600]!, - titleColor: isDarkMode ? Colors.white : null, - subtitleColor: isDarkMode ? Colors.white70 : null, - onTap: () { - AppSettings.openAppSettings(); - }, - isDarkMode: isDarkMode, - ), + // // 隐私设置 + // _buildSimpleNavigationSetting( + // title: 'privacySettings'.tr, // 隐私设置 + // subtitle: 'privacySettingsInfo'.tr, // 管理数据收集和权限 + // icon: Icons.shield_outlined, + // iconBgColor: isDarkMode + // ? Colors.purple[900]!.withOpacity(0.3) + // : Colors.purple[100]!, + // iconColor: + // isDarkMode ? Colors.purple[300]! : Colors.purple[600]!, + // titleColor: isDarkMode ? Colors.white : null, + // subtitleColor: isDarkMode ? Colors.white70 : null, + // onTap: () { + // AppSettings.openAppSettings(); + // }, + // isDarkMode: isDarkMode, + // ), // ], Divider( From 6e855d6d7e0d7a4dc7707cc0fad63b1c30306fa3 Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Fri, 8 Aug 2025 15:48:14 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat(profile):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E7=BC=93=E5=AD=98=E5=8A=9F=E8=83=BD=E5=8F=8A?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在个人资料页面添加清除缓存的功能选项,包括确认对话框和相应的多语言翻译 --- lib/core/translations/language/en_us.dart | 2 + lib/core/translations/language/zh_cn.dart | 2 + lib/modules/profile/views/profile_view.dart | 132 ++++++++++---------- 3 files changed, 70 insertions(+), 66 deletions(-) diff --git a/lib/core/translations/language/en_us.dart b/lib/core/translations/language/en_us.dart index 51d9bd764..7dca392ef 100644 --- a/lib/core/translations/language/en_us.dart +++ b/lib/core/translations/language/en_us.dart @@ -436,6 +436,8 @@ const Map enUS = { 'deleteAccount': 'Delete Account', 'deleteAccountTips': 'Are you sure you want to permanently delete your account? This action cannot be undone.', + 'clean': 'Clear Cache', // 清除缓存 + 'cleanTips': 'Are you sure you want to clear personal cache?', // 确定要清除个人缓存吗? //Profile 错误信息 'networkConnectionFailed': diff --git a/lib/core/translations/language/zh_cn.dart b/lib/core/translations/language/zh_cn.dart index 6bd1701d6..d73546416 100644 --- a/lib/core/translations/language/zh_cn.dart +++ b/lib/core/translations/language/zh_cn.dart @@ -411,6 +411,8 @@ const Map zhCN = { "logoutTips": "确定要退出当前账号吗?", 'deleteAccount': '注销账号', 'deleteAccountTips': '确定要永久删除您的账号吗?此操作不可撤销', + 'clean': '清除缓存', + 'cleanTips': '确定要清除个人缓存吗?', // Profile 错误信息 'networkConnectionFailed': '网络连接失败,请检查网络设置后重试', diff --git a/lib/modules/profile/views/profile_view.dart b/lib/modules/profile/views/profile_view.dart index 328d7c19a..4dbf73dd3 100644 --- a/lib/modules/profile/views/profile_view.dart +++ b/lib/modules/profile/views/profile_view.dart @@ -740,72 +740,72 @@ class EditProfileView extends GetView { }, isDarkMode: isDarkMode, ), - // Divider( - // height: 1, - // color: isDarkMode - // ? Colors.white.withOpacity(0.1) - // : Colors.grey[200]), - // // 清理缓存 - // _buildSimpleNavigationSetting( - // title: 'clean'.tr, // 清理缓存 - // icon: Icons.logout, - // iconBgColor: isDarkMode - // ? Colors.red[900]!.withOpacity(0.3) - // : Colors.red[50]!, - // iconColor: isDarkMode ? Colors.red[300]! : Colors.red[600]!, - // titleColor: - // isDarkMode ? Colors.red[300]! : Colors.red[600]!, - // onTap: () { - // // 退出登录确认对话框 - // Get.dialog( - // AlertDialog( - // backgroundColor: - // isDarkMode ? Colors.grey[900] : Colors.white, - // title: Text( - // 'clean'.tr, // 清理缓存 - // style: TextStyle( - // color: isDarkMode ? Colors.white : Colors.black87, - // ), - // ), - // content: Text( - // 'cleanTips'.tr, // 确定要退出当前账号吗? - // style: TextStyle( - // color: - // isDarkMode ? Colors.white70 : Colors.black54, - // ), - // ), - // actions: [ - // TextButton( - // onPressed: () => Get.back(), - // child: Text( - // 'cancel'.tr, // 取消 - // style: TextStyle( - // color: isDarkMode - // ? Colors.white70 - // : Colors.black54, - // ), - // ), - // ), - // TextButton( - // onPressed: () { - // Get.back(); - // controller.clean(); - // }, - // child: Text( - // 'confirm'.tr, // 确定 - // style: TextStyle( - // color: isDarkMode - // ? Colors.red[300] - // : Colors.red[600], - // ), - // ), - // ), - // ], - // ), - // ); - // }, - // isDarkMode: isDarkMode, - // ), + Divider( + height: 1, + color: isDarkMode + ? Colors.white.withOpacity(0.1) + : Colors.grey[200]), + // 清理缓存 + _buildSimpleNavigationSetting( + title: 'clean'.tr, // 清理缓存 + icon: Icons.cleaning_services, + iconBgColor: isDarkMode + ? Colors.red[900]!.withOpacity(0.3) + : Colors.red[50]!, + iconColor: isDarkMode ? Colors.red[300]! : Colors.red[600]!, + titleColor: + isDarkMode ? Colors.red[300]! : Colors.red[600]!, + onTap: () { + // 退出登录确认对话框 + Get.dialog( + AlertDialog( + backgroundColor: + isDarkMode ? Colors.grey[900] : Colors.white, + title: Text( + 'clean'.tr, // 清除缓存 + style: TextStyle( + color: isDarkMode ? Colors.white : Colors.black87, + ), + ), + content: Text( + 'cleanTips'.tr, // 确定要清除个人缓存吗? + style: TextStyle( + color: + isDarkMode ? Colors.white70 : Colors.black54, + ), + ), + actions: [ + TextButton( + onPressed: () => Get.back(), + child: Text( + 'cancel'.tr, // 取消 + style: TextStyle( + color: isDarkMode + ? Colors.white70 + : Colors.black54, + ), + ), + ), + TextButton( + onPressed: () { + Get.back(); + controller.clean(); + }, + child: Text( + 'confirm'.tr, // 确定 + style: TextStyle( + color: isDarkMode + ? Colors.red[300] + : Colors.red[600], + ), + ), + ), + ], + ), + ); + }, + isDarkMode: isDarkMode, + ), Divider( height: 1, color: isDarkMode