mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-25 19:14:12 +08:00
feat(proxies): update layout, disable twemoji font by default
This commit is contained in:
parent
b5c5b286f1
commit
3d8fa080c3
@ -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')
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -41,24 +41,23 @@ export const ProxyNodeCard = (props: {
|
||||
data-tip={proxyName}
|
||||
onClick={onClick}
|
||||
>
|
||||
<div class="card-body">
|
||||
<div class="card-body relative">
|
||||
<div class="badge badge-secondary badge-sm absolute bottom-0 left-1/2 -translate-x-1/2 font-bold uppercase">
|
||||
{formatProxyType(proxyNode()?.type)}
|
||||
</div>
|
||||
|
||||
<div class="card-title flex items-center justify-between gap-2">
|
||||
<span class="line-clamp-1 text-start text-sm">{proxyName}</span>
|
||||
|
||||
<div class="badge badge-primary badge-sm font-bold uppercase">
|
||||
{formatProxyType(proxyNode()?.type)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<Show when={specialType()}>
|
||||
<div class="badge badge-secondary badge-sm">{specialType()}</div>
|
||||
</Show>
|
||||
|
||||
<Show when={supportIPv6()}>
|
||||
<div class="badge badge-accent badge-sm">IPv6</div>
|
||||
</Show>
|
||||
</div>
|
||||
<span
|
||||
class={twMerge(
|
||||
'text-start text-xs',
|
||||
isSelected ? 'text-info-content' : 'text-neutral-content',
|
||||
)}
|
||||
>
|
||||
{[specialType(), supportIPv6() && 'IPv6'].filter(Boolean).join(' / ')}
|
||||
</span>
|
||||
|
||||
<div class="card-actions items-center justify-end">
|
||||
<Latency
|
||||
|
@ -67,7 +67,7 @@ export const [autoCloseConns, setAutoCloseConns] = makePersisted(
|
||||
{ name: 'autoCloseConns', storage: localStorage },
|
||||
)
|
||||
|
||||
export const useTwemojiDefault = true
|
||||
export const useTwemojiDefault = false
|
||||
|
||||
export const [useTwemoji, setUseTwemoji] = makePersisted(
|
||||
createSignal(useTwemojiDefault),
|
||||
|
Loading…
x
Reference in New Issue
Block a user