Skip to content
Snippets Groups Projects
Unverified Commit 4ae409c7 authored by GyDi's avatar GyDi
Browse files

feat: auto restart core after grand permission

parent 9a29c9ab
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,8 @@ export const ClashCoreViewer = forwardRef<DialogRef>((props, ref) => {
const onGrant = useLockFn(async (core: string) => {
try {
await grantPermission(core);
// 自动重启
if (core === clash_core) await restartSidecar();
Notice.success(`Successfully grant permission to ${core}`, 1000);
} catch (err: any) {
Notice.error(err?.message || err.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment