feat: auto restart core after grand permission
This commit is contained in:
parent
9a29c9abdd
commit
4ae409c7f4
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user