fix: Config data display error

#417
This commit is contained in:
MystiPanda 2024-02-21 10:02:28 +08:00
parent f59be465ea
commit 1cff162649
No known key found for this signature in database
GPG Key ID: 47D0F0284DC57888
3 changed files with 10 additions and 10 deletions

View File

@ -113,7 +113,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
spellCheck="false"
sx={{ width: 250 }}
value={values.device}
placeholder="Mihomo"
placeholder="Meta"
onChange={(e) =>
setValues((v) => ({ ...v, device: e.target.value }))
}

View File

@ -1,17 +1,16 @@
import useSWR, { mutate } from "swr";
import { useLockFn } from "ahooks";
import { getAxios, getVersion, updateConfigs } from "@/services/api";
import {
getAxios,
getClashConfig,
getVersion,
updateConfigs,
} from "@/services/api";
import { getClashInfo, patchClashConfig } from "@/services/cmds";
getClashInfo,
patchClashConfig,
getRuntimeConfig,
} from "@/services/cmds";
export const useClash = () => {
const { data: clash, mutate: mutateClash } = useSWR(
"getClashConfig",
getClashConfig
"getRuntimeConfig",
getRuntimeConfig
);
const { data: versionData, mutate: mutateVersion } = useSWR(

View File

@ -90,8 +90,9 @@ export async function getClashInfo() {
return invoke<IClashInfo | null>("get_clash_info");
}
// Get runtime config which controlled by verge
export async function getRuntimeConfig() {
return invoke<any | null>("get_runtime_config");
return invoke<IConfigData | null>("get_runtime_config");
}
export async function getRuntimeYaml() {