mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-20 06:48:32 +08:00
feat: kill sidecars when update app
This commit is contained in:
1 parent
3dfe7c27cd
commit
5b83fb496c
4 files changed
+14
-1
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
DialogContentText,
|
||||
DialogTitle,
|
||||
} from "@mui/material";
|
||||
import { killSidecars } from "../../services/cmds";
|
||||
|
||||
interface Props {
|
||||
open: boolean;
|
||||
@@ -31,6 +32,7 @@ const UpdateDialog = (props: Props) => {
|
||||
try {
|
||||
setUploading(true);
|
||||
uploadingState = true;
|
||||
await killSidecars();
|
||||
await installUpdate();
|
||||
await relaunch();
|
||||
} catch (error) {
|
||||
|
||||
@@ -64,6 +64,10 @@ export async function getSystemProxy() {
|
||||
return invoke<any>("get_sys_proxy");
|
||||
}
|
||||
|
||||
export async function killSidecars() {
|
||||
return invoke<any>("kill_sidecars");
|
||||
}
|
||||
|
||||
export async function openAppDir() {
|
||||
return invoke<void>("open_app_dir");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user