From 3d8fa080c351fa155c8c0edc7e4f6fee06438693 Mon Sep 17 00:00:00 2001 From: kunish Date: Fri, 11 Oct 2024 22:29:36 +0800 Subject: [PATCH] feat(proxies): update layout, disable twemoji font by default --- src/components/Latency.tsx | 8 +++----- src/components/ProxyNodeCard.tsx | 27 +++++++++++++-------------- src/signals/config.ts | 2 +- 3 files changed, 17 insertions(+), 20 deletions(-) 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(' / ')} +