fix(proxies): also display latency when PROXIES_PREVIEW_TYPE is DOTS

This commit is contained in:
kunish 2023-09-04 20:29:08 +08:00
parent 2ff31d40b1
commit 347ebb6f84
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
2 changed files with 18 additions and 13 deletions

View File

@ -1,5 +1,6 @@
import { For } from 'solid-js' import { For } from 'solid-js'
import { twMerge } from 'tailwind-merge' import { twMerge } from 'tailwind-merge'
import { Latency } from '~/components'
import { latencyQualityMap, useProxies } from '~/signals' import { latencyQualityMap, useProxies } from '~/signals'
const LatencyDots = (props: { const LatencyDots = (props: {
@ -37,7 +38,8 @@ export const ProxyPreviewDots = (props: {
const { latencyMap } = useProxies() const { latencyMap } = useProxies()
return ( return (
<div class="flex w-full flex-wrap items-center"> <div class="flex items-center gap-2">
<div class="flex flex-1 flex-wrap items-center">
<For <For
each={props.proxyNameList.map((name): [string, number] => [ each={props.proxyNameList.map((name): [string, number] => [
name, name,
@ -51,5 +53,8 @@ export const ProxyPreviewDots = (props: {
}} }}
</For> </For>
</div> </div>
<Latency name={props.now} />
</div>
) )
} }

View File

@ -118,9 +118,9 @@ export enum CONNECTIONS_TABLE_ACCESSOR_KEY {
Chains = 'chains', Chains = 'chains',
DlSpeed = 'dlSpeed', DlSpeed = 'dlSpeed',
ULSpeed = 'ulSpeed', ULSpeed = 'ulSpeed',
ConnectTime = 'connectTime',
Download = 'dl', Download = 'dl',
Upload = 'ul', Upload = 'ul',
ConnectTime = 'connectTime',
Source = 'source', Source = 'source',
Destination = 'destination', Destination = 'destination',
} }