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 <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>

View File

@ -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',