diff options
| author | Haishan <[email protected]> | 2020-11-09 21:03:23 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-11-09 21:04:42 +0800 |
| commit | c179977524cc4fedd670eefe782896256bc783d8 (patch) | |
| tree | 1448f2e206bcffdbc92eb6b090429d929d9b3121 | |
| parent | 62c1f1dc4452de782fedbbfe3b51278dac531e69 (diff) | |
refactor: display proxy type Shadowsocks as SS
also make proxy type text smaller
for https://github.com/haishanh/yacd/issues/539
| -rw-r--r-- | src/components/proxies/Proxy.module.css | 3 | ||||
| -rw-r--r-- | src/components/proxies/Proxy.tsx | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/components/proxies/Proxy.module.css b/src/components/proxies/Proxy.module.css index 03c4df8..b25948b 100644 --- a/src/components/proxies/Proxy.module.css +++ b/src/components/proxies/Proxy.module.css @@ -42,8 +42,9 @@ .proxyType { font-family: var(--font-mono); font-size: 0.6em; + margin-right: 3px; @media (--breakpoint-not-small) { - font-size: 1em; + font-size: 0.85em; } } diff --git a/src/components/proxies/Proxy.tsx b/src/components/proxies/Proxy.tsx index 0cbf561..027b7fc 100644 --- a/src/components/proxies/Proxy.tsx +++ b/src/components/proxies/Proxy.tsx @@ -110,6 +110,11 @@ function ProxySmallImpl({ ); } +function formatProxyType(t: string) { + if (t === 'Shadowsocks') return 'SS'; + return t; +} + function ProxyImpl({ now, name, @@ -149,7 +154,7 @@ function ProxyImpl({ <div className={s0.proxyName}>{name}</div> <div className={s0.row}> <span className={s0.proxyType} style={{ opacity: now ? 0.6 : 0.2 }}> - {proxy.type} + {formatProxyType(proxy.type)} </span> {latency && latency.number ? ( <ProxyLatency number={latency.number} color={color} /> |
