refactor: Improve server card filtering and enhance subdomain management UI

This commit is contained in:
2026-02-25 20:12:54 -05:00
parent 8340110a34
commit ba54409009
2 changed files with 10 additions and 11 deletions

View File

@@ -15,10 +15,10 @@
}
</style>
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 pb-5">
<div class="pb-5 space-y-3">
<span class="text-2xl font-bold">Servers</span>
@if(count($servers) > 1)
<div class="relative w-full sm:w-64" x-data="{ search: '' }">
<div class="relative w-full sm:w-80" x-data="{ search: '' }">
<svg class="absolute left-3 top-1/2 -translate-y-1/2 size-4 text-base/40 pointer-events-none" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
@@ -26,14 +26,14 @@
x-model="search"
@input="
document.querySelectorAll('[data-server-card]').forEach(card => {
const name = card.dataset.serverName.toLowerCase();
const ip = card.dataset.serverIp.toLowerCase();
const q = search.toLowerCase();
const name = (card.dataset.serverName || '').toLowerCase();
const ip = (card.dataset.serverIp || '').toLowerCase();
const q = search.toLowerCase().trim();
card.style.display = (!q || name.includes(q) || ip.includes(q)) ? '' : 'none';
});
"
placeholder="Filter servers..."
class="w-full pl-9 pr-3 py-2 text-sm rounded-lg border border-neutral/60 bg-background-secondary focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary" />
class="w-full pl-9 pr-3 py-2 text-sm rounded-lg border border-neutral bg-background focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary placeholder:text-base/40" />
</div>
@endif
</div>

View File

@@ -275,12 +275,11 @@
<x-ri-delete-bin-line wire:loading.remove wire:target="openDeleteModal('{{ $zone['subdomain'] }}', {{ $zone['ipAddressId'] }})" class="size-4" />
Delete
</x-button.danger>
<button type="button"
wire:click="openRecordModal('{{ $zone['subdomain'] }}')"
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-primary/10 text-primary hover:bg-primary/20 transition-colors">
<x-ri-settings-3-line class="size-4" />
<x-button.secondary wire:click="openRecordModal('{{ $zone['subdomain'] }}')" wire:loading.attr="disabled" wire:target="openRecordModal('{{ $zone['subdomain'] }}')">
<x-ri-hourglass-fill wire:loading wire:target="openRecordModal('{{ $zone['subdomain'] }}')" class="size-4 animate-pulse" />
<x-ri-settings-3-line wire:loading.remove wire:target="openRecordModal('{{ $zone['subdomain'] }}')" class="size-4" />
Manage Records
</button>
</x-button.secondary>
</div>
</div>
</div>