Browse Source

Merge branch 'new_dev' of https://github.com/deepcloud2048/deep_voice into new_dev

newdev_shunjiawei
liwei1dao 1 year ago
parent
commit
14a482e69f
  1. 2
      lib/core/translations/language/en_us.dart
  2. 2
      lib/core/translations/language/zh_cn.dart
  3. 2
      lib/data/services/novice_guide_service.dart
  4. 132
      lib/modules/profile/views/profile_view.dart
  5. 44
      lib/modules/settings/views/settings_view.dart

2
lib/core/translations/language/en_us.dart

@ -436,6 +436,8 @@ const Map<String, String> 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':

2
lib/core/translations/language/zh_cn.dart

@ -411,6 +411,8 @@ const Map<String, String> zhCN = {
"logoutTips": "确定要退出当前账号吗?",
'deleteAccount': '注销账号',
'deleteAccountTips': '确定要永久删除您的账号吗?此操作不可撤销',
'clean': '清除缓存',
'cleanTips': '确定要清除个人缓存吗?',
// Profile 错误信息
'networkConnectionFailed': '网络连接失败,请检查网络设置后重试',

2
lib/data/services/novice_guide_service.dart

@ -11,7 +11,7 @@ class NoviceGuideService extends GetxService {
final BleService _bleService = BleService();
StreamSubscription<dynamic>? _statusSubscription;
bool isHomeGuide = false;
bool isHomeGuide = true;
bool isAIGuide = true;
RxBool isWakeup = false.obs;

132
lib/modules/profile/views/profile_view.dart

@ -740,72 +740,72 @@ class EditProfileView extends GetView<ProfileController> {
},
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

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

@ -419,29 +419,29 @@ class SettingsView extends GetView<SettingsController> {
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(

Loading…
Cancel
Save