From 6bf74ddf5af44c0475a0d3a83c9f0e185cc374e8 Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Wed, 23 Jul 2025 21:42:01 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86=E5=93=81=E7=89=8C?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BB=8EDeapSound=E6=9B=B4=E6=96=B0=E4=B8=BA?= =?UTF-8?q?Voitrans?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新代码库中所有DeapSound品牌引用为Voitrans,包括: - 注释中的服务器链接描述 - BLE设备名称和日志 - 通知标题和分享文本 - iOS项目标识符 - 界面文本和菜单项 --- ios/Runner.xcodeproj/project.pbxproj | 6 +-- lib/data/services/network/nw_api.dart | 2 +- .../bottomSheet/statistics_bottom_sheet.dart | 2 +- .../meeting/views/meeting_mine_view.dart | 10 ++--- .../controllers/pairing_controller.dart | 2 +- lib/modules/pairing/views/pairing_view.dart | 40 ++++++++++--------- .../agent_service/BleMediaService.kt | 2 +- .../music_service/MusicService.kt | 2 +- .../example/ota/tool/ota/ble/BleManager.java | 2 +- 9 files changed, 35 insertions(+), 33 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index db392f358..a96a23c4c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -535,7 +535,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.chuangxiangyunqi.deapsound; + PRODUCT_BUNDLE_IDENTIFIER = com.saitong.voitrans; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -727,7 +727,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.chuangxiangyunqi.deapsound; + PRODUCT_BUNDLE_IDENTIFIER = com.saitong.voitrans; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -753,7 +753,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.chuangxiangyunqi.deapsound; + PRODUCT_BUNDLE_IDENTIFIER = com.saitong.voitrans; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/lib/data/services/network/nw_api.dart b/lib/data/services/network/nw_api.dart index b23ac8517..375bafb92 100644 --- a/lib/data/services/network/nw_api.dart +++ b/lib/data/services/network/nw_api.dart @@ -1,4 +1,4 @@ class NWApi { - // VoitransʹÓõĺǫ́·þÎñÆ÷µÄÁ´½ӵØַ + // Voitrans使用的后台服务器的链接地址 //static const baseApi = "https://api.voitrans.net"; } diff --git a/lib/modules/meeting/views/bottomSheet/statistics_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/statistics_bottom_sheet.dart index eed48af63..cec2df665 100644 --- a/lib/modules/meeting/views/bottomSheet/statistics_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/statistics_bottom_sheet.dart @@ -267,7 +267,7 @@ class _StatisticsBottomSheetState extends State { final file = File('${tempDir.path}/$fileName'); await file.writeAsBytes(pngBytes); final result = await SharePlus.instance.share(ShareParams( - text: '分享 DEAPSOUND', + text: '分享 Voitrans', files: [XFile(file.path)], )); if (result.status == ShareResultStatus.success) { diff --git a/lib/modules/meeting/views/meeting_mine_view.dart b/lib/modules/meeting/views/meeting_mine_view.dart index 93a36c2b9..a57635141 100644 --- a/lib/modules/meeting/views/meeting_mine_view.dart +++ b/lib/modules/meeting/views/meeting_mine_view.dart @@ -72,7 +72,7 @@ class _MeetingMineViewState extends State _box([ _item( Icons.cloud_upload_outlined, - 'DEAPSOUND PRIVATE CLOUD', + 'Voitrans PRIVATE CLOUD', description: '开启', onTap: () {}, ), @@ -86,7 +86,7 @@ class _MeetingMineViewState extends State ), _item( Icons.settings_remote_outlined, - '我的DEAPSOUND设备', + '我的Voitrans设备', onTap: () {}, ), ]), @@ -98,7 +98,7 @@ class _MeetingMineViewState extends State ), _item( Icons.info_outline_rounded, - '关于DEAPSOUND', + '关于Voitrans', description: 'v1.0.0', onTap: () {}, ), @@ -285,7 +285,7 @@ class _MeetingMineViewState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - 'DEAPSOUND AI会员', + 'Voitrans AI会员', style: TextStyle( color: MeetingUIUtils.getTextColor(isDarkMode), fontSize: 16.sp, @@ -331,7 +331,7 @@ class _MeetingMineViewState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - '绑定 DEAPSOUND 设备可激活 Starter 会员', + '绑定 Voitrans 设备可激活 Starter 会员', style: TextStyle( color: Colors.white, fontSize: 12.sp, diff --git a/lib/modules/pairing/controllers/pairing_controller.dart b/lib/modules/pairing/controllers/pairing_controller.dart index 819ca1d39..af7e399f8 100644 --- a/lib/modules/pairing/controllers/pairing_controller.dart +++ b/lib/modules/pairing/controllers/pairing_controller.dart @@ -546,7 +546,7 @@ class PairingController extends GetxController { // 调用BLE管理器的关联方法 final success = await _bleManager.startDeviceAssociation( - deviceNamePattern: 'DeapSound', // 或者使用 _currentClassicDevice?.name + deviceNamePattern: 'Voitrans', // 或者使用 _currentClassicDevice?.name macAddress: _verifiedDeviceAddress!, ); diff --git a/lib/modules/pairing/views/pairing_view.dart b/lib/modules/pairing/views/pairing_view.dart index b71d03bef..f4c90113c 100644 --- a/lib/modules/pairing/views/pairing_view.dart +++ b/lib/modules/pairing/views/pairing_view.dart @@ -10,31 +10,31 @@ class PairingView extends StatefulWidget { State createState() => _PairingViewState(); } -class _PairingViewState extends State +class _PairingViewState extends State with TickerProviderStateMixin { late AnimationController _pulseController; late AnimationController _rotationController; late Animation _pulseAnimation; late Animation _rotationAnimation; - + PairingController get controller => Get.find(); @override void initState() { super.initState(); - + // 脉搏动画控制器 _pulseController = AnimationController( duration: const Duration(milliseconds: 1500), vsync: this, ); - + // 旋转动画控制器 _rotationController = AnimationController( duration: const Duration(milliseconds: 2000), vsync: this, ); - + // 脉搏动画 _pulseAnimation = Tween( begin: 0.8, @@ -43,7 +43,7 @@ class _PairingViewState extends State parent: _pulseController, curve: Curves.easeInOut, )); - + // 旋转动画 _rotationAnimation = Tween( begin: 0.0, @@ -52,7 +52,7 @@ class _PairingViewState extends State parent: _rotationController, curve: Curves.linear, )); - + // 开始动画 _pulseController.repeat(reverse: true); _rotationController.repeat(); @@ -228,7 +228,7 @@ class _PairingViewState extends State if (isLoading) _buildPulseAnimation(primaryColor, secondaryColor), // 特殊的安全连接动画 - 只在建立安全连接时显示 - if (state == PairingState.waitingBle) + if (state == PairingState.waitingBle) _buildSecureConnectionAnimation(primaryColor, secondaryColor), // 设备关联动画 - 只在关联设备时显示 @@ -268,8 +268,9 @@ class _PairingViewState extends State animation: _pulseAnimation, builder: (context, child) { final value = _pulseAnimation.value; - final opacity = 0.4 - (_pulseController.value * 0.3); // 0.4 到 0.1 的透明度变化 - + final opacity = + 0.4 - (_pulseController.value * 0.3); // 0.4 到 0.1 的透明度变化 + return Container( width: 200.w * value, height: 200.w * value, @@ -312,7 +313,8 @@ class _PairingViewState extends State } // 构建安全连接特殊动画 - 多层波纹效果 - Widget _buildSecureConnectionAnimation(Color primaryColor, Color secondaryColor) { + Widget _buildSecureConnectionAnimation( + Color primaryColor, Color secondaryColor) { return Stack( alignment: Alignment.center, children: [ @@ -322,7 +324,7 @@ class _PairingViewState extends State builder: (context, child) { final value = _pulseAnimation.value; final opacity = 0.3 - (_pulseController.value * 0.2); - + return Container( width: 180.w * value, height: 180.w * value, @@ -336,7 +338,7 @@ class _PairingViewState extends State ); }, ), - + // 第二层波纹 - 延迟动画 AnimatedBuilder( animation: _pulseAnimation, @@ -344,7 +346,7 @@ class _PairingViewState extends State final delayedValue = (_pulseController.value + 0.3) % 1.0; final value = 0.8 + (delayedValue * 0.4); final opacity = 0.25 - (delayedValue * 0.15); - + return Container( width: 160.w * value, height: 160.w * value, @@ -358,7 +360,7 @@ class _PairingViewState extends State ); }, ), - + // 第三层波纹 - 更大延迟 AnimatedBuilder( animation: _pulseAnimation, @@ -366,7 +368,7 @@ class _PairingViewState extends State final delayedValue = (_pulseController.value + 0.6) % 1.0; final value = 0.8 + (delayedValue * 0.4); final opacity = 0.2 - (delayedValue * 0.1); - + return Container( width: 140.w * value, height: 140.w * value, @@ -464,7 +466,7 @@ class _PairingViewState extends State case PairingState.checking: return 'preparingPairingEnvironment'.tr; // 正在准备配对环境... case PairingState.waitingClassic: - return 'connectDeepSoundViaSystemBluetooth'.tr; // 请先通过系统蓝牙连接DeapSound设备 + return 'connectDeepSoundViaSystemBluetooth'.tr; // 请先通过系统蓝牙连接Voitrans设备 case PairingState.verifying: return 'verifyingDevice'.tr; // 正在验证设备... case PairingState.binding: @@ -484,9 +486,9 @@ class _PairingViewState extends State return 'lackPermissions'.tr; // 缺少蓝牙权限 case ErrorType.noClassicDevice: return 'connectDeepSoundViaSystemBluetooth' - .tr; // 请先通过系统蓝牙连接DeapSound设备 + .tr; // 请先通过系统蓝牙连接Voitrans设备 case ErrorType.deviceNotMatch: - return 'ensureConnectedDeepSoundDevice'.tr; // 请确保连接的是DeapSound设备 + return 'ensureConnectedDeepSoundDevice'.tr; // 请确保连接的是Voitrans设备 case ErrorType.deviceBound: return 'deviceAlreadyBoundToOtherAccount'.tr; // 该设备已被其他账号绑定 case ErrorType.associationFailed: diff --git a/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/BleMediaService.kt b/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/BleMediaService.kt index ff4771fa6..93c016657 100644 --- a/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/BleMediaService.kt +++ b/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/BleMediaService.kt @@ -283,7 +283,7 @@ class BleMediaService : Service(), CoroutineScope { // 构建通知 val builder = NotificationCompat.Builder(this, CHANNEL_ID) - .setContentTitle("DeapSound") + .setContentTitle("Voitrans") .setContentText("语音助手代理服务运行中") .setSmallIcon(android.R.drawable.ic_dialog_info) diff --git a/local_plugins/music_service/android/src/main/kotlin/com/yunqiinnovation/music_service/MusicService.kt b/local_plugins/music_service/android/src/main/kotlin/com/yunqiinnovation/music_service/MusicService.kt index 2db86d0de..212e8e4fc 100644 --- a/local_plugins/music_service/android/src/main/kotlin/com/yunqiinnovation/music_service/MusicService.kt +++ b/local_plugins/music_service/android/src/main/kotlin/com/yunqiinnovation/music_service/MusicService.kt @@ -178,7 +178,7 @@ class MusicService : MediaBrowserServiceCompat() { instance = this isRunning.set(true) setupMediaSession() - startForeground(NOTIFICATION_ID, createNotification("等待播放","DeapSound","")) + startForeground(NOTIFICATION_ID, createNotification("等待播放","Voitrans","")) audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager // 注册广播监听器 diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleManager.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleManager.java index aa5708974..737701d73 100644 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleManager.java +++ b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleManager.java @@ -637,7 +637,7 @@ public class BleManager { if (deviced1 != null && deviced1.getAddress().equals(device.getAddress())) { // 匹配成功 - Log.i(TAG, "filterDevice找到了DeapSound设备"); + Log.i(TAG, "filterDevice找到了Voitrans设备"); // 直接连接设备 boolean connected = connectBleDevice(device);