mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 19:24:12 +08:00
fix: respect system ui font & better looking (maybe) for proxy card (#844)
This commit is contained in:
parent
614430e006
commit
4b669ff030
1
auto-imports.d.ts
vendored
1
auto-imports.d.ts
vendored
@ -135,6 +135,7 @@ declare global {
|
|||||||
const useMatch: (typeof import('@solidjs/router'))['useMatch']
|
const useMatch: (typeof import('@solidjs/router'))['useMatch']
|
||||||
const useNavigate: (typeof import('@solidjs/router'))['useNavigate']
|
const useNavigate: (typeof import('@solidjs/router'))['useNavigate']
|
||||||
const useParams: (typeof import('@solidjs/router'))['useParams']
|
const useParams: (typeof import('@solidjs/router'))['useParams']
|
||||||
|
const usePreloadRoute: (typeof import('@solidjs/router'))['usePreloadRoute']
|
||||||
const useResolvedPath: (typeof import('@solidjs/router'))['useResolvedPath']
|
const useResolvedPath: (typeof import('@solidjs/router'))['useResolvedPath']
|
||||||
const useRouteData: (typeof import('@solidjs/router'))['useRouteData']
|
const useRouteData: (typeof import('@solidjs/router'))['useRouteData']
|
||||||
const useRoutes: (typeof import('@solidjs/router'))['useRoutes']
|
const useRoutes: (typeof import('@solidjs/router'))['useRoutes']
|
||||||
|
@ -2,7 +2,7 @@ import { LATENCY_QUALITY_MAP_HTTP } from '~/constants'
|
|||||||
import { useI18n } from '~/i18n'
|
import { useI18n } from '~/i18n'
|
||||||
import { latencyQualityMap, useProxies } from '~/signals'
|
import { latencyQualityMap, useProxies } from '~/signals'
|
||||||
|
|
||||||
export const Latency = (props: { name?: string }) => {
|
export const Latency = (props: { name?: string; class?: string }) => {
|
||||||
const [t] = useI18n()
|
const [t] = useI18n()
|
||||||
const { latencyMap } = useProxies()
|
const { latencyMap } = useProxies()
|
||||||
const [textClassName, setTextClassName] = createSignal('')
|
const [textClassName, setTextClassName] = createSignal('')
|
||||||
@ -25,7 +25,9 @@ export const Latency = (props: { name?: string }) => {
|
|||||||
latency() !== LATENCY_QUALITY_MAP_HTTP.NOT_CONNECTED
|
latency() !== LATENCY_QUALITY_MAP_HTTP.NOT_CONNECTED
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<span class={`whitespace-nowrap text-xs ${textClassName()}`}>
|
<span
|
||||||
|
class={`whitespace-nowrap text-xs ${textClassName()} ${props.class}`}
|
||||||
|
>
|
||||||
{latency()}
|
{latency()}
|
||||||
{t('ms')}
|
{t('ms')}
|
||||||
</span>
|
</span>
|
||||||
|
@ -26,7 +26,8 @@ export const ProxyNodeCard = (props: {
|
|||||||
<div
|
<div
|
||||||
class={twMerge(
|
class={twMerge(
|
||||||
'border-neutral-focus card card-bordered tooltip-bottom flex flex-col justify-between gap-1 bg-neutral p-2 text-neutral-content',
|
'border-neutral-focus card card-bordered tooltip-bottom flex flex-col justify-between gap-1 bg-neutral p-2 text-neutral-content',
|
||||||
isSelected && 'border-primary bg-primary-content text-primary',
|
isSelected &&
|
||||||
|
'bg-gradient-to-br from-primary to-secondary text-primary-content',
|
||||||
onClick && 'cursor-pointer',
|
onClick && 'cursor-pointer',
|
||||||
)}
|
)}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
@ -61,7 +62,7 @@ export const ProxyNodeCard = (props: {
|
|||||||
<div
|
<div
|
||||||
class={twMerge(
|
class={twMerge(
|
||||||
'text-xs text-slate-500',
|
'text-xs text-slate-500',
|
||||||
isSelected && 'text-primary',
|
isSelected && 'text-primary-content',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{formatProxyType(proxyNode()?.type)}
|
{formatProxyType(proxyNode()?.type)}
|
||||||
@ -69,9 +70,10 @@ export const ProxyNodeCard = (props: {
|
|||||||
<Show when={specialType()}>{` :: ${specialType()}`}</Show>
|
<Show when={specialType()}>{` :: ${specialType()}`}</Show>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-xs">
|
<Latency
|
||||||
<Latency name={props.proxyName} />
|
name={props.proxyName}
|
||||||
</div>
|
class={twMerge(isSelected && 'badge badge-sm px-1')}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -7,8 +7,8 @@ export default {
|
|||||||
daisyui: { themes: true },
|
daisyui: { themes: true },
|
||||||
theme: {
|
theme: {
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
twemoji: ['Fira Sans', 'Twemoji Mozilla', 'system-ui', 'monospace'],
|
twemoji: ['system-ui', 'Twemoji Mozilla', 'Fira Sans', 'monospace'],
|
||||||
'no-twemoji': ['Fira Sans', 'system-ui', 'monospace'],
|
'no-twemoji': ['system-ui', 'Fira Sans', 'monospace'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as Config
|
} as Config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user