fix(proxies): proxy type should be positioned relative to the card

This commit is contained in:
kunish 2024-10-11 23:00:26 +08:00
parent e38786ce98
commit 78ec9e5d6c
No known key found for this signature in database
GPG Key ID: 67D3ACD788F3A7CD

View File

@ -34,21 +34,19 @@ export const ProxyNodeCard = (props: {
return ( return (
<div <div
class={twMerge( class={twMerge(
'card tooltip card-compact tooltip-accent bg-neutral text-neutral-content', 'card tooltip card-compact tooltip-accent relative bg-neutral text-neutral-content',
isSelected && 'bg-primary text-primary-content', isSelected && 'bg-primary text-primary-content',
onClick && 'cursor-pointer', onClick && 'cursor-pointer',
)} )}
data-tip={proxyName} data-tip={proxyName}
onClick={onClick} onClick={onClick}
> >
<div class="card-body relative">
<div class="badge badge-secondary badge-sm absolute bottom-0 left-1/2 -translate-x-1/2 font-bold uppercase"> <div class="badge badge-secondary badge-sm absolute bottom-0 left-1/2 -translate-x-1/2 font-bold uppercase">
{formatProxyType(proxyNode()?.type)} {formatProxyType(proxyNode()?.type)}
</div> </div>
<div class="card-title flex items-center justify-between gap-2"> <div class="card-body">
<span class="line-clamp-1 text-start text-sm">{proxyName}</span> <h2 class="card-title line-clamp-1 text-start text-sm">{proxyName}</h2>
</div>
<span <span
class={twMerge( class={twMerge(