|
@@ -5,7 +5,7 @@ use crate::{
|
|
};
|
|
};
|
|
use serde_yaml::Mapping;
|
|
use serde_yaml::Mapping;
|
|
use std::process::Command;
|
|
use std::process::Command;
|
|
-use tauri::State;
|
|
|
|
|
|
+use tauri::{api, State};
|
|
|
|
|
|
/// get all profiles from `profiles.yaml`
|
|
/// get all profiles from `profiles.yaml`
|
|
/// do not acquire the lock of ProfileLock
|
|
/// do not acquire the lock of ProfileLock
|
|
@@ -273,6 +273,12 @@ pub async fn patch_verge_config(
|
|
verge.patch_config(payload)
|
|
verge.patch_config(payload)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/// kill all sidecars when update app
|
|
|
|
+#[tauri::command]
|
|
|
|
+pub fn kill_sidecars() {
|
|
|
|
+ api::process::kill_children();
|
|
|
|
+}
|
|
|
|
+
|
|
/// open app config dir
|
|
/// open app config dir
|
|
#[tauri::command]
|
|
#[tauri::command]
|
|
pub fn open_app_dir() -> Result<(), String> {
|
|
pub fn open_app_dir() -> Result<(), String> {
|