mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
parent
f59be465ea
commit
1cff162649
|
@ -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 }))
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user