mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-24 09:45:35 +08:00
feat(proxy): compact proxy node card
This commit is contained in:
parent
b052aa34a7
commit
40f07b8efe
@ -40,7 +40,7 @@ export const Collapse: ParentComponent<Props> = (props) => {
|
|||||||
<div
|
<div
|
||||||
class={twMerge(
|
class={twMerge(
|
||||||
getCollapseContentClassName(),
|
getCollapseContentClassName(),
|
||||||
'collapse-content grid grid-cols-2 gap-2 transition-opacity duration-1000 lg:grid-cols-3 xl:grid-cols-4',
|
'collapse-content grid grid-cols-2 gap-2 transition-opacity duration-1000 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Show when={props.isOpen}>{children(() => props.children)()}</Show>
|
<Show when={props.isOpen}>{children(() => props.children)()}</Show>
|
||||||
|
@ -26,20 +26,21 @@ export const ProxyNodeCard = (props: {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class={twMerge(
|
class={twMerge(
|
||||||
'card card-bordered tooltip-bottom card-compact flex gap-1 border-neutral-focus bg-neutral p-3 text-neutral-content shadow-lg sm:tooltip',
|
'card card-bordered tooltip-bottom flex flex-col gap-1 border-neutral-focus bg-neutral p-2 text-neutral-content shadow-lg',
|
||||||
isSelected && 'border-primary bg-primary-content text-primary',
|
isSelected && 'border-primary bg-primary-content text-primary',
|
||||||
onClick && 'cursor-pointer',
|
onClick && 'cursor-pointer',
|
||||||
)}
|
)}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
data-tip={proxyName}
|
title={proxyName}
|
||||||
>
|
>
|
||||||
<div class="flex items-center justify-between gap-2">
|
<div class="flex items-center justify-between gap-2">
|
||||||
<span class="truncate text-left">{proxyName}</span>
|
<span class="truncate text-left text-sm">{proxyName}</span>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
class="btn-circle btn-ghost btn-sm"
|
class="btn-circle btn-ghost h-auto min-h-0 w-auto"
|
||||||
icon={
|
icon={
|
||||||
<IconBrandSpeedtest
|
<IconBrandSpeedtest
|
||||||
|
size={20}
|
||||||
class={twMerge(
|
class={twMerge(
|
||||||
proxyLatencyTestingMap()[proxyName] &&
|
proxyLatencyTestingMap()[proxyName] &&
|
||||||
'animate-pulse text-success',
|
'animate-pulse text-success',
|
||||||
|
Loading…
Reference in New Issue
Block a user