diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index c3d7855f7..3f4d49e29 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -41,7 +41,7 @@
CFBundleExecutable
$(EXECUTABLE_NAME)
NSUserTrackingUsageDescription
- UserTrackingUsageDescription
+ This application needs to access your tracking data in order to offer better personalized services and advertisements
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
@@ -59,19 +59,17 @@
LSRequiresIPhoneOS
NSBluetoothAlwaysUsageDescription
- BluetoothUsageDescription
+ Bluetooth permission is required to connect and manage audio devices
NSBluetoothPeripheralUsageDescription
- BluetoothUsageDescription
+ Bluetooth permission is required to connect and manage audio devices
NSMicrophoneUsageDescription
- MicrophoneUsageDescription
+ Microphone permission is required for voice recognition
NSSpeechRecognitionUsageDescription
- SpeechRecognitionUsageDescription
+ Speech recognition permission is required to provide voice interaction services
UIApplicationSupportsIndirectInputEvents
UIBackgroundModes
- audio
- voip
UILaunchStoryboardName
LaunchScreen
diff --git a/ios/Runner/en.lproj/InfoPlist.strings b/ios/Runner/en.lproj/InfoPlist.strings
deleted file mode 100644
index 256a5bcb0..000000000
--- a/ios/Runner/en.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,4 +0,0 @@
-"BluetoothUsageDescription" = "Bluetooth permission is required to connect and manage audio devices";
-"MicrophoneUsageDescription" = "Microphone permission is required for voice recognition";
-"SpeechRecognitionUsageDescription" = "Speech recognition permission is required to provide voice interaction services";
-"UserTrackingUsageDescription" = "This application needs to access your tracking data in order to offer better personalized services and advertisements";
\ No newline at end of file
diff --git a/ios/Runner/zh.lproj/InfoPlist.strings b/ios/Runner/zh.lproj/InfoPlist.strings
deleted file mode 100644
index d78689105..000000000
--- a/ios/Runner/zh.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,3 +0,0 @@
-"BluetoothUsageDescription" = "需要蓝牙权限来连接和管理音频设备";
-"MicrophoneUsageDescription" = "需要麦克风权限来进行语音识别";
-"SpeechRecognitionUsageDescription" = "需要语音识别权限来提供语音交互服务";
\ No newline at end of file
diff --git a/lib/modules/settings/controllers/settings_controller.dart b/lib/modules/settings/controllers/settings_controller.dart
index 57fdc5b4a..f16bfc2c0 100644
--- a/lib/modules/settings/controllers/settings_controller.dart
+++ b/lib/modules/settings/controllers/settings_controller.dart
@@ -20,7 +20,7 @@ class SettingsController extends GetxController {
final List languageList = [
LanguageModel(
name: 'followingSystem', // 跟随系统.tr
- alias: 'followingSystem', // 跟随系统.tr
+ alias: '',
value: 'system'),
LanguageModel(name: 'english', alias: 'English', value: 'en_US'), // 英语.tr
LanguageModel(name: 'chinese', alias: '中文', value: 'zh_CN'), // 中文.tr
diff --git a/lib/modules/settings/views/settings_view.dart b/lib/modules/settings/views/settings_view.dart
index f52a6c186..52c6d7989 100644
--- a/lib/modules/settings/views/settings_view.dart
+++ b/lib/modules/settings/views/settings_view.dart
@@ -651,14 +651,19 @@ class SettingsView extends GetView {
),
],
),
- InkWell(
+ InkWell(
onTap: () {
- print(controller.appVersion.value);
// 在这里添加检查更新的逻辑
},
child: Container(
- padding:
- EdgeInsets.symmetric(horizontal: 12.w, vertical: 6.h),
+ constraints: BoxConstraints(
+ minWidth: 100.w,
+ maxWidth: 180.w,
+ ),
+ padding: EdgeInsets.symmetric(
+ horizontal: 16.w,
+ vertical: 8.h,
+ ),
decoration: BoxDecoration(
color: isDarkMode
? Colors.blue[900]!.withOpacity(0.3)
@@ -666,12 +671,14 @@ class SettingsView extends GetView {
borderRadius: BorderRadius.circular(16.r),
),
child: Text(
- 'checkUpdates'.tr, // 检查更新
+ 'checkUpdates'.tr,
style: TextStyle(
fontSize: 12.sp,
- color:
- isDarkMode ? Colors.blue[300] : Colors.blue[600],
+ color: isDarkMode ? Colors.blue[300] : Colors.blue[600],
),
+ overflow: TextOverflow.ellipsis, // 添加省略号
+ maxLines: 1, // 限制为单行
+ textAlign: TextAlign.center, // 保持居中
),
),
),
@@ -1099,7 +1106,7 @@ class SettingsView extends GetView {
return Obx(() {
final isSelected =
controller.speechServiceType.value == service['type'];
- return InkWell(
+ return GestureDetector(
onTap: () {
controller.setSpeechServiceType(service['type']);
Get.back();
@@ -1127,28 +1134,6 @@ class SettingsView extends GetView {
),
child: Row(
children: [
- Container(
- width: 24.w,
- height: 24.w,
- decoration: BoxDecoration(
- color: isSelected
- ? (isDarkMode
- ? Colors.teal[300]
- : Colors.teal[600])
- : (isDarkMode
- ? Colors.white.withOpacity(0.1)
- : Colors.grey[300]),
- shape: BoxShape.circle,
- ),
- child: isSelected
- ? Icon(
- Icons.check,
- size: 16.w,
- color: Colors.white,
- )
- : null,
- ),
- SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -1179,6 +1164,28 @@ class SettingsView extends GetView {
],
),
),
+ SizedBox(width: 12.w),
+ Container(
+ width: 24.w,
+ height: 24.w,
+ decoration: BoxDecoration(
+ color: isSelected
+ ? (isDarkMode
+ ? Colors.teal[300]
+ : Colors.teal[600])
+ : (isDarkMode
+ ? Colors.white.withOpacity(0.1)
+ : Colors.grey[300]),
+ shape: BoxShape.circle,
+ ),
+ child: isSelected
+ ? Icon(
+ Icons.check,
+ size: 16.w,
+ color: Colors.white,
+ )
+ : null,
+ ),
],
),
),
@@ -1211,27 +1218,22 @@ class SettingsView extends GetView {
void _showLanguageSelectionDialog(bool isDarkMode) {
Get.dialog(
Dialog(
+ backgroundColor: isDarkMode ? Colors.grey[900] : Colors.white,
shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(24.r),
+ borderRadius: BorderRadius.circular(16.r),
),
- insetPadding: EdgeInsets.symmetric(horizontal: 20.w),
- backgroundColor: isDarkMode ? AppColors.cardBackground : Colors.white,
- child: Container(
- width: 0.9.sw,
- padding: EdgeInsets.only(top: 32.h, bottom: 16.h),
+ child: Padding(
+ padding: EdgeInsets.all(12.w),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Padding(
- padding: EdgeInsets.symmetric(horizontal: 24.w),
- child: Text(
- 'selectLanguage'.tr, // 选择语言
- style: TextStyle(
- fontSize: 20.sp,
- fontWeight: FontWeight.bold,
- color: isDarkMode ? Colors.white : Colors.black,
- ),
+ Text(
+ 'selectLanguage'.tr, // 选择语言
+ style: TextStyle(
+ fontSize: 18.sp,
+ fontWeight: FontWeight.w600,
+ color: isDarkMode ? Colors.white : Colors.black87,
),
),
SizedBox(height: 16.h),
@@ -1241,46 +1243,104 @@ class SettingsView extends GetView {
child: Column(
mainAxisSize: MainAxisSize.min,
children: controller.languageList.map((language) {
- return ListTile(
- title: Text(
- language.name.tr,
- style: TextStyle(
- color: isDarkMode ? Colors.white : Colors.black,
- ),
- ),
- trailing:
- controller.language.value.value == language.value
- ? Icon(
- Icons.check_circle,
+ return Obx(() {
+ final isSelected =
+ controller.language.value.value == language.value;
+ return GestureDetector(
+ onTap: () {
+ controller.setLanguage(language);
+ Get.back();
+ },
+ child: Container(
+ margin: EdgeInsets.only(bottom: 10.h),
+ padding: EdgeInsets.all(10.w),
+ decoration: BoxDecoration(
+ color: isSelected
+ ? (isDarkMode
+ ? Colors.teal[900]!.withOpacity(0.3)
+ : Colors.teal[50]!)
+ : (isDarkMode
+ ? Colors.white.withOpacity(0.05)
+ : Colors.grey[100]!),
+ borderRadius: BorderRadius.circular(12.r),
+ border: Border.all(
+ color: isSelected
+ ? (isDarkMode
+ ? Colors.teal[300]!
+ : Colors.teal[600]!)
+ : Colors.transparent,
+ width: 1,
+ ),
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ child: Text(
+ language.name.tr,
+ style: TextStyle(
+ fontSize: 16.sp,
+ fontWeight: FontWeight.w500,
+ color: isDarkMode
+ ? Colors.white
+ : Colors.black87,
+ ),
+ overflow: TextOverflow.ellipsis,
+ ),
+ ),
+ Text(
+ language.alias, // 这里使用原始名称,不加 .tr
+ style: TextStyle(
+ fontSize: 14.sp,
color: isDarkMode
- ? AppColors.primary
- : Colors.blue,
- )
- : const SizedBox.shrink(),
- onTap: () {
- controller.setLanguage(language);
- },
- );
+ ? Colors.white70
+ : Colors.black54,
+ ),
+ ),
+ SizedBox(width: 10.w),
+ Container(
+ width: 24.w,
+ height: 24.w,
+ decoration: BoxDecoration(
+ color: isSelected
+ ? (isDarkMode
+ ? Colors.teal[300]
+ : Colors.teal[600])
+ : (isDarkMode
+ ? Colors.white.withOpacity(0.1)
+ : Colors.grey[300]),
+ shape: BoxShape.circle,
+ ),
+ child: isSelected
+ ? Icon(
+ Icons.check,
+ size: 16.w,
+ color: Colors.white,
+ )
+ : null,
+ ),
+ ],
+ ),
+ ),
+ );
+ });
}).toList(),
),
),
),
SizedBox(height: 16.h),
- Align(
- alignment: Alignment.centerRight,
- child: Padding(
- padding: EdgeInsets.only(right: 24.w),
- child: TextButton(
+ Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ TextButton(
onPressed: () => Get.back(),
child: Text(
'cancel'.tr, // 取消
style: TextStyle(
- color: isDarkMode ? AppColors.primary : Colors.blue,
- fontSize: 16.sp,
+ color: isDarkMode ? Colors.white70 : Colors.black54,
),
),
),
- ),
+ ],
),
],
),