Browse Source

refactor(settings): 移除AI设置部分并优化设备管理和固件升级文本

- 移除已注释的AI设置相关代码
- 将设备管理和固件升级的硬编码文本替换为国际化字段
- 修复DeepSound拼写错误为DeapSound
newdev_shunjiawei
lxm 1 year ago
parent
commit
1f5b0c65bf
  1. 150
      lib/modules/settings/views/settings_view.dart

150
lib/modules/settings/views/settings_view.dart

@ -45,8 +45,8 @@ class SettingsView extends GetView<SettingsController> {
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<SettingsController> {
// 清除配对设备
_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<SettingsController> {
// : 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<SettingsController> {
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<SettingsController> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'DeepSound',
'DeapSound',
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w500,

Loading…
Cancel
Save