mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-13 06:05:34 +08:00
fix(proxies): also display latency when PROXIES_PREVIEW_TYPE is DOTS
This commit is contained in:
parent
2ff31d40b1
commit
347ebb6f84
@ -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,19 +38,23 @@ 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">
|
||||||
<For
|
<div class="flex flex-1 flex-wrap items-center">
|
||||||
each={props.proxyNameList.map((name): [string, number] => [
|
<For
|
||||||
name,
|
each={props.proxyNameList.map((name): [string, number] => [
|
||||||
latencyMap()[name],
|
name,
|
||||||
])}
|
latencyMap()[name],
|
||||||
>
|
])}
|
||||||
{([name, latency]) => {
|
>
|
||||||
const isSelected = props.now === name
|
{([name, latency]) => {
|
||||||
|
const isSelected = props.now === name
|
||||||
|
|
||||||
return <LatencyDots latency={latency} selected={isSelected} />
|
return <LatencyDots latency={latency} selected={isSelected} />
|
||||||
}}
|
}}
|
||||||
</For>
|
</For>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Latency name={props.now} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -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',
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user