feat: clash meta core supports

This commit is contained in:
GyDi
2022-05-17 01:59:49 +08:00
parent e7b19a5f66
commit d4a4747c08
13 changed files with 195 additions and 36 deletions

View File

@@ -196,10 +196,16 @@ pub fn patch_verge_config(
payload: Verge,
app_handle: tauri::AppHandle,
core: State<'_, Core>,
) -> Result<(), String> {
) -> CmdResult {
wrap_err!(core.patch_verge(payload, &app_handle))
}
/// change clash core
#[tauri::command]
pub fn change_clash_core(core: State<'_, Core>, clash_core: Option<String>) -> CmdResult {
wrap_err!(core.change_core(clash_core))
}
/// restart the sidecar
#[tauri::command]
pub fn restart_sidecar(core: State<'_, Core>) -> CmdResult {