mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-15 19:22:26 +08:00
parent
d20c082deb
commit
e749fe70e2
|
@ -21,6 +21,7 @@ import delayManager from "@/services/delay";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
sx?: SxProps;
|
sx?: SxProps;
|
||||||
|
url?: string;
|
||||||
groupName: string;
|
groupName: string;
|
||||||
headState: HeadState;
|
headState: HeadState;
|
||||||
onLocation: () => void;
|
onLocation: () => void;
|
||||||
|
@ -29,7 +30,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ProxyHead = (props: Props) => {
|
export const ProxyHead = (props: Props) => {
|
||||||
const { sx = {}, groupName, headState, onHeadState } = props;
|
const { sx = {}, url, groupName, headState, onHeadState } = props;
|
||||||
|
|
||||||
const { showType, sortType, filterText, textState, testUrl } = headState;
|
const { showType, sortType, filterText, textState, testUrl } = headState;
|
||||||
|
|
||||||
|
@ -45,7 +46,10 @@ export const ProxyHead = (props: Props) => {
|
||||||
const { verge } = useVerge();
|
const { verge } = useVerge();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
delayManager.setUrl(groupName, testUrl || verge?.default_latency_test!);
|
delayManager.setUrl(
|
||||||
|
groupName,
|
||||||
|
testUrl || url || verge?.default_latency_test!
|
||||||
|
);
|
||||||
}, [groupName, testUrl, verge?.default_latency_test]);
|
}, [groupName, testUrl, verge?.default_latency_test]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -129,6 +129,7 @@ export const ProxyRender = (props: RenderProps) => {
|
||||||
return (
|
return (
|
||||||
<ProxyHead
|
<ProxyHead
|
||||||
sx={{ pl: 2, pr: 3, mt: indent ? 1 : 0.5, mb: 1 }}
|
sx={{ pl: 2, pr: 3, mt: indent ? 1 : 0.5, mb: 1 }}
|
||||||
|
url={group.testUrl}
|
||||||
groupName={group.name}
|
groupName={group.name}
|
||||||
headState={headState!}
|
headState={headState!}
|
||||||
onLocation={() => onLocation(group)}
|
onLocation={() => onLocation(group)}
|
||||||
|
|
1
src/services/types.d.ts
vendored
1
src/services/types.d.ts
vendored
|
@ -59,6 +59,7 @@ interface IProxyItem {
|
||||||
time: string;
|
time: string;
|
||||||
delay: number;
|
delay: number;
|
||||||
}[];
|
}[];
|
||||||
|
testUrl?: string;
|
||||||
all?: string[];
|
all?: string[];
|
||||||
now?: string;
|
now?: string;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user