diff --git a/src-tauri/src/cmd/profile.rs b/src-tauri/src/cmd/profile.rs index d35d9e30..4af307cb 100644 --- a/src-tauri/src/cmd/profile.rs +++ b/src-tauri/src/cmd/profile.rs @@ -388,7 +388,7 @@ pub async fn patch_profiles_config(profiles: IProfiles) -> CmdResult { .is_err() { logging!(info, Type::Cmd, "当前正在切换配置,放弃请求"); - return Err("Profile switching is already in progress".into()); + return Ok(false); } let target_profile = profiles.current.as_ref(); @@ -410,7 +410,7 @@ pub async fn patch_profiles_config(profiles: IProfiles) -> CmdResult { && validate_new_profile(switch_to_profile).await.is_err() { CURRENT_SWITCHING_PROFILE.store(false, Ordering::Release); - return Err("Target profile validation failed".into()); + return Ok(false); } let _ = Config::profiles() .await diff --git a/src/locales/en.json b/src/locales/en.json index e58962fc..2716d316 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -714,7 +714,5 @@ "Unlock menu order": "Unlock menu order", "Lock menu order": "Lock menu order", "Open App Log": "Open App Log", - "Open Core Log": "Open Core Log", - "Profile switching is already in progress": "Profile switching is already in progress", - "Target profile validation failed": "Target profile validation failed" + "Open Core Log": "Open Core Log" } diff --git a/src/locales/zh.json b/src/locales/zh.json index f927744f..f8b161d7 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -715,7 +715,5 @@ "Lock menu order": "锁定菜单排序", "Open App Log": "应用日志", "Open Core Log": "内核日志", - "TPROXY Port": "TPROXY 透明代理端口", - "Profile switching is already in progress": "配置文件切换已在进行中", - "Target profile validation failed": "目标配置文件验证失败" + "TPROXY Port": "TPROXY 透明代理端口" }