mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
chore: adjust type
This commit is contained in:
@@ -89,7 +89,7 @@ const SysproxyViewer = ({ handler }: Props) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const patch: Partial<CmdType.VergeConfig> = {};
|
||||
const patch: Partial<IVergeConfig> = {};
|
||||
|
||||
if (value.guard !== enable_proxy_guard) {
|
||||
patch.enable_proxy_guard = value.guard;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Button, ButtonGroup } from "@mui/material";
|
||||
|
||||
type ThemeValue = CmdType.VergeConfig["theme_mode"];
|
||||
type ThemeValue = IVergeConfig["theme_mode"];
|
||||
|
||||
interface Props {
|
||||
value?: ThemeValue;
|
||||
|
||||
@@ -46,10 +46,10 @@ const SettingClash = ({ onError }: Props) => {
|
||||
const controllerHandler = useModalHandler();
|
||||
|
||||
const onSwitchFormat = (_e: any, value: boolean) => value;
|
||||
const onChangeData = (patch: Partial<ApiType.ConfigData>) => {
|
||||
const onChangeData = (patch: Partial<IConfigData>) => {
|
||||
mutateClash((old) => ({ ...(old! || {}), ...patch }), false);
|
||||
};
|
||||
const onUpdateData = async (patch: Partial<ApiType.ConfigData>) => {
|
||||
const onUpdateData = async (patch: Partial<IConfigData>) => {
|
||||
await updateConfigs(patch);
|
||||
await patchClashConfig(patch);
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
} = vergeConfig ?? {};
|
||||
|
||||
const onSwitchFormat = (_e: any, value: boolean) => value;
|
||||
const onChangeData = (patch: Partial<CmdType.VergeConfig>) => {
|
||||
const onChangeData = (patch: Partial<IVergeConfig>) => {
|
||||
mutateVerge({ ...vergeConfig, ...patch }, false);
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ const SettingVerge = ({ onError }: Props) => {
|
||||
const [configOpen, setConfigOpen] = useState(false);
|
||||
|
||||
const onSwitchFormat = (_e: any, value: boolean) => value;
|
||||
const onChangeData = (patch: Partial<CmdType.VergeConfig>) => {
|
||||
const onChangeData = (patch: Partial<IVergeConfig>) => {
|
||||
mutateVerge({ ...vergeConfig, ...patch }, false);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user