mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-20 14:28:32 +08:00
feat: windows service mode ui
This commit is contained in:
1 parent
d8b9c3b832
commit
d45ad76fbc
8 files changed
+234
-14
No files matched your search
+12
-1
@@ -112,8 +112,19 @@ export async function startService() {
|
||||
return invoke<void>("start_service");
|
||||
}
|
||||
|
||||
export async function stopService() {
|
||||
return invoke<void>("stop_service");
|
||||
}
|
||||
|
||||
export async function checkService() {
|
||||
return invoke<any>("check_service");
|
||||
try {
|
||||
const result = await invoke<any>("check_service");
|
||||
if (result?.code === 0) return "active";
|
||||
if (result?.code === 400) return "installed";
|
||||
return "unknown";
|
||||
} catch (err: any) {
|
||||
return "uninstall";
|
||||
}
|
||||
}
|
||||
|
||||
export async function installService() {
|
||||
|
||||
Reference in new issue
Block a user