mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
refactor: done
This commit is contained in:
@@ -32,6 +32,10 @@ export async function enhanceProfiles() {
|
||||
return invoke<void>("enhance_profiles");
|
||||
}
|
||||
|
||||
export async function patchProfilesConfig(profiles: CmdType.ProfilesConfig) {
|
||||
return invoke<void>("patch_profiles_config");
|
||||
}
|
||||
|
||||
export async function createProfile(
|
||||
item: Partial<CmdType.ProfileItem>,
|
||||
fileData?: string | null
|
||||
@@ -76,18 +80,6 @@ export async function patchProfile(
|
||||
return invoke<void>("patch_profile", { index, profile });
|
||||
}
|
||||
|
||||
export async function selectProfile(index: string) {
|
||||
return invoke<void>("select_profile", { index });
|
||||
}
|
||||
|
||||
export async function changeProfileChain(chain?: string[]) {
|
||||
return invoke<void>("change_profile_chain", { chain });
|
||||
}
|
||||
|
||||
export async function changeProfileValid(valid?: string[]) {
|
||||
return invoke<void>("change_profile_valid", { valid });
|
||||
}
|
||||
|
||||
export async function getClashInfo() {
|
||||
return invoke<CmdType.ClashInfo | null>("get_clash_info");
|
||||
}
|
||||
@@ -136,10 +128,6 @@ export async function restartSidecar() {
|
||||
return invoke<void>("restart_sidecar");
|
||||
}
|
||||
|
||||
// export async function killSidecar() {
|
||||
// return invoke<any>("kill_sidecar");
|
||||
// }
|
||||
|
||||
export async function openAppDir() {
|
||||
return invoke<void>("open_app_dir").catch((err) =>
|
||||
Notice.error(err?.message || err.toString(), 1500)
|
||||
|
||||
Reference in New Issue
Block a user