mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +08:00
parent
f59be465ea
commit
1cff162649
|
@ -113,7 +113,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
sx={{ width: 250 }}
|
sx={{ width: 250 }}
|
||||||
value={values.device}
|
value={values.device}
|
||||||
placeholder="Mihomo"
|
placeholder="Meta"
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setValues((v) => ({ ...v, device: e.target.value }))
|
setValues((v) => ({ ...v, device: e.target.value }))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
import useSWR, { mutate } from "swr";
|
import useSWR, { mutate } from "swr";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
|
import { getAxios, getVersion, updateConfigs } from "@/services/api";
|
||||||
import {
|
import {
|
||||||
getAxios,
|
getClashInfo,
|
||||||
getClashConfig,
|
patchClashConfig,
|
||||||
getVersion,
|
getRuntimeConfig,
|
||||||
updateConfigs,
|
} from "@/services/cmds";
|
||||||
} from "@/services/api";
|
|
||||||
import { getClashInfo, patchClashConfig } from "@/services/cmds";
|
|
||||||
|
|
||||||
export const useClash = () => {
|
export const useClash = () => {
|
||||||
const { data: clash, mutate: mutateClash } = useSWR(
|
const { data: clash, mutate: mutateClash } = useSWR(
|
||||||
"getClashConfig",
|
"getRuntimeConfig",
|
||||||
getClashConfig
|
getRuntimeConfig
|
||||||
);
|
);
|
||||||
|
|
||||||
const { data: versionData, mutate: mutateVersion } = useSWR(
|
const { data: versionData, mutate: mutateVersion } = useSWR(
|
||||||
|
|
|
@ -90,8 +90,9 @@ export async function getClashInfo() {
|
||||||
return invoke<IClashInfo | null>("get_clash_info");
|
return invoke<IClashInfo | null>("get_clash_info");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get runtime config which controlled by verge
|
||||||
export async function getRuntimeConfig() {
|
export async function getRuntimeConfig() {
|
||||||
return invoke<any | null>("get_runtime_config");
|
return invoke<IConfigData | null>("get_runtime_config");
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getRuntimeYaml() {
|
export async function getRuntimeYaml() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user