diff --git a/src/components/Latency.tsx b/src/components/Latency.tsx index 73b6902..13c48d8 100644 --- a/src/components/Latency.tsx +++ b/src/components/Latency.tsx @@ -6,17 +6,15 @@ export const Latency = (props: { name?: string; class?: string }) => { const [t] = useI18n() const { getLatencyByName } = useProxies() const [textClassName, setTextClassName] = createSignal('') - const latency = createMemo(() => { - return getLatencyByName(props.name || '') - }) + const latency = createMemo(() => getLatencyByName(props.name || '')) createEffect(() => { - setTextClassName('text-success') - if (latency() > latencyQualityMap().HIGH) { setTextClassName('text-error') } else if (latency() > latencyQualityMap().MEDIUM) { setTextClassName('text-warning') + } else { + setTextClassName('text-success') } }) diff --git a/src/components/ProxyNodeCard.tsx b/src/components/ProxyNodeCard.tsx index 918c241..219875c 100644 --- a/src/components/ProxyNodeCard.tsx +++ b/src/components/ProxyNodeCard.tsx @@ -41,24 +41,23 @@ export const ProxyNodeCard = (props: { data-tip={proxyName} onClick={onClick} > -
+
+
+ {formatProxyType(proxyNode()?.type)} +
+
{proxyName} - -
- {formatProxyType(proxyNode()?.type)} -
-
- -
{specialType()}
-
- - -
IPv6
-
-
+ + {[specialType(), supportIPv6() && 'IPv6'].filter(Boolean).join(' / ')} +