feat: add unified delay

This commit is contained in:
huzibaca
2024-11-05 16:24:58 +08:00
parent ab7775e1ef
commit 2833718c90
15 changed files with 37 additions and 24 deletions

View File

@@ -3,11 +3,7 @@ import { useEffect } from "react";
import { useLockFn } from "ahooks";
import { useTranslation } from "react-i18next";
import { Box, Button, ButtonGroup } from "@mui/material";
import {
closeAllConnections,
getClashConfig,
updateConfigs,
} from "@/services/api";
import { closeAllConnections, getClashConfig } from "@/services/api";
import { patchClashConfig } from "@/services/cmds";
import { useVerge } from "@/hooks/use-verge";
import { BasePage } from "@/components/base";
@@ -33,7 +29,6 @@ const ProxyPage = () => {
if (mode !== curMode && verge?.auto_close_connection) {
closeAllConnections();
}
await updateConfigs({ mode });
await patchClashConfig({ mode });
mutateClash();
});