mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:33:45 +08:00
fix: enhance when change tun config
This commit is contained in:
parent
05fa6b9aba
commit
3271c96531
@ -13,6 +13,7 @@ import {
|
|||||||
import { useClash } from "@/hooks/use-clash";
|
import { useClash } from "@/hooks/use-clash";
|
||||||
import { BaseDialog, DialogRef, Notice, Switch } from "@/components/base";
|
import { BaseDialog, DialogRef, Notice, Switch } from "@/components/base";
|
||||||
import { StackModeSwitch } from "./stack-mode-switch";
|
import { StackModeSwitch } from "./stack-mode-switch";
|
||||||
|
import { enhanceProfiles } from "@/services/cmds";
|
||||||
|
|
||||||
export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@ -65,6 +66,12 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
}),
|
}),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
try {
|
||||||
|
await enhanceProfiles();
|
||||||
|
Notice.success("Refresh clash config", 1000);
|
||||||
|
} catch (err: any) {
|
||||||
|
Notice.error(err.message || err.toString(), 3000);
|
||||||
|
}
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
Notice.error(err.message || err.toString());
|
Notice.error(err.message || err.toString());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user