From 0d3cc6aa23858f9765a4ef89025dd7bbc55a2cdf Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Fri, 4 Jul 2025 15:16:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(settings):=20=E7=A7=BB=E9=99=A4AI?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=83=A8=E5=88=86=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86=E5=92=8C=E5=9B=BA=E4=BB=B6?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除已注释的AI设置相关代码 - 将设备管理和固件升级的硬编码文本替换为国际化字段 - 修复DeepSound拼写错误为DeapSound --- lib/modules/settings/views/settings_view.dart | 150 +----------------- 1 file changed, 8 insertions(+), 142 deletions(-) diff --git a/lib/modules/settings/views/settings_view.dart b/lib/modules/settings/views/settings_view.dart index be59cb2bd..7c69a9216 100644 --- a/lib/modules/settings/views/settings_view.dart +++ b/lib/modules/settings/views/settings_view.dart @@ -45,8 +45,8 @@ class SettingsView extends GetView { padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), children: [ _buildUserInfoCard(isDarkMode), - SizedBox(height: 20.h), - _buildAISettingsSection(isDarkMode), + // SizedBox(height: 20.h), + // _buildAISettingsSection(isDarkMode), SizedBox(height: 20.h), _buildSystemSettingsSection(isDarkMode), SizedBox(height: 20.h), @@ -505,9 +505,9 @@ class SettingsView extends GetView { // 清除配对设备 _buildSimpleNavigationSetting( - title: '设备管理', - subtitle: '设备管理列表', - icon: Icons.bluetooth_disabled, + title: 'deviceManagement'.tr, // 设备管理 + subtitle: 'deviceManagementInfo'.tr, // 设备管理列表 + icon: Icons.settings_bluetooth, iconBgColor: isDarkMode ? Colors.red[900]!.withOpacity(0.3) : Colors.red[100]!, @@ -633,8 +633,8 @@ class SettingsView extends GetView { // : Colors.grey[200]), // 测试ble耳机固件版本升级 _buildSimpleNavigationSetting( - title: 'ota升级', - subtitle: '测试ble耳机固件版本升级', + title: '固件升级'.tr, + subtitle: 'ble耳机固件版本升级'.tr, icon: Icons.system_update_alt, iconBgColor: isDarkMode ? Colors.orange[900]!.withOpacity(0.3) @@ -660,140 +660,6 @@ class SettingsView extends GetView { Get.toNamed(Routes.permissions); }, ), - Divider( - height: 1, - color: isDarkMode - ? Colors.white.withOpacity(0.1) - : Colors.grey[200]), - - // 退出登录 - // _buildSimpleNavigationSetting( - // title: 'logout'.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( - // 'logout'.tr, // 退出登录 - // style: TextStyle( - // color: isDarkMode ? Colors.white : Colors.black87, - // ), - // ), - // content: Text( - // 'logoutTips'.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.signOut(); - // }, - // 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: 'deleteAccount'.tr, // 注销账号 - // icon: Icons.delete_forever, - // 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( - // 'deleteAccount'.tr, // 注销账号 - // style: TextStyle( - // color: isDarkMode ? Colors.white : Colors.black87, - // ), - // ), - // content: Text( - // 'deleteAccountTips'.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.deleteAccount(); - // }, - // child: Text( - // 'confirm'.tr, // 确定 - // style: TextStyle( - // color: isDarkMode - // ? Colors.red[300] - // : Colors.red[600], - // ), - // ), - // ), - // ], - // ), - // ); - // }, - // isDarkMode: isDarkMode, - // ), ], ), ), @@ -873,7 +739,7 @@ class SettingsView extends GetView { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'DeepSound', + 'DeapSound', style: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.w500,