mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-20 10:08:32 +08:00
feat: handle remote clash config fields
This commit is contained in:
1 parent
75f3fa5144
commit
797f0d92b3
7 files changed
+146
-7
No files matched your search
@@ -125,6 +125,23 @@ pub fn change_profile_chain(
|
||||
wrap_err!(clash.activate_enhanced(&profiles, false, false))
|
||||
}
|
||||
|
||||
/// change the profile valid fields
|
||||
#[tauri::command]
|
||||
pub fn change_profile_valid(
|
||||
valid: Option<Vec<String>>,
|
||||
app_handle: tauri::AppHandle,
|
||||
clash_state: State<'_, ClashState>,
|
||||
profiles_state: State<'_, ProfilesState>,
|
||||
) -> Result<(), String> {
|
||||
let mut clash = clash_state.0.lock().unwrap();
|
||||
let mut profiles = profiles_state.0.lock().unwrap();
|
||||
|
||||
profiles.put_valid(valid);
|
||||
clash.set_window(app_handle.get_window("main"));
|
||||
|
||||
wrap_err!(clash.activate_enhanced(&profiles, false, false))
|
||||
}
|
||||
|
||||
/// manually exec enhanced profile
|
||||
#[tauri::command]
|
||||
pub fn enhance_profiles(
|
||||
|
||||
Reference in new issue
Block a user