Refactor Proxmox server views for improved UI consistency and usability
- Updated server card component to use new UI elements and improved layout. - Enhanced status display with badges and better status indicators. - Refined quick info row for server details with consistent styling. - Reorganized server configuration statistics into stat cards for clarity. - Improved help modals for statistics and storage management sections. - Streamlined alerts and warnings for better user experience. - Updated storage management view to utilize new UI components and improve readability.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
@props([
|
||||
'sortable' => false,
|
||||
'sorted' => null,
|
||||
'sortKey' => null,
|
||||
'align' => 'left',
|
||||
'compact' => false,
|
||||
])
|
||||
|
||||
@php
|
||||
$paddingClasses = $compact ? 'px-3 py-2' : 'px-5 py-3';
|
||||
$alignClasses = match($align) {
|
||||
'center' => 'text-center',
|
||||
'right' => 'text-right',
|
||||
default => 'text-left',
|
||||
};
|
||||
$thClasses = "$paddingClasses $alignClasses text-xs font-semibold text-base/70 uppercase tracking-wider";
|
||||
@endphp
|
||||
|
||||
<th {{ $attributes->merge(['class' => $thClasses]) }}>
|
||||
@if($sortable)
|
||||
<button
|
||||
type="button"
|
||||
@if($sortKey)
|
||||
wire:click="sortBy('{{ $sortKey }}')"
|
||||
@endif
|
||||
class="flex items-center gap-1 hover:text-base/90 transition-colors group"
|
||||
>
|
||||
<span>{{ $slot }}</span>
|
||||
<span class="flex flex-col">
|
||||
@if($sorted === 'asc')
|
||||
<x-ri-arrow-up-s-fill class="size-3 text-primary" />
|
||||
@elseif($sorted === 'desc')
|
||||
<x-ri-arrow-down-s-fill class="size-3 text-primary" />
|
||||
@else
|
||||
<x-ri-arrow-up-down-line class="size-3 text-base/40 group-hover:text-base/60" />
|
||||
@endif
|
||||
</span>
|
||||
</button>
|
||||
@else
|
||||
{{ $slot }}
|
||||
@endif
|
||||
</th>
|
||||
Reference in New Issue
Block a user