feat(proxy): compact proxy node card

This commit is contained in:
kunish 2023-09-27 16:47:51 +08:00
parent b052aa34a7
commit 40f07b8efe
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
2 changed files with 6 additions and 5 deletions

View File

@ -40,7 +40,7 @@ export const Collapse: ParentComponent<Props> = (props) => {
<div
class={twMerge(
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>

View File

@ -26,20 +26,21 @@ export const ProxyNodeCard = (props: {
return (
<div
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',
onClick && 'cursor-pointer',
)}
onClick={onClick}
data-tip={proxyName}
title={proxyName}
>
<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
class="btn-circle btn-ghost btn-sm"
class="btn-circle btn-ghost h-auto min-h-0 w-auto"
icon={
<IconBrandSpeedtest
size={20}
class={twMerge(
proxyLatencyTestingMap()[proxyName] &&
'animate-pulse text-success',