- 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.
51 lines
1.5 KiB
PHP
51 lines
1.5 KiB
PHP
{{--
|
|
Table Header Cell Component - TailServer Theme
|
|
--}}
|
|
|
|
@props([
|
|
'align' => 'start',
|
|
'sortable' => false,
|
|
'sortKey' => null,
|
|
'currentSort' => null,
|
|
'currentDirection' => 'asc',
|
|
])
|
|
|
|
@php
|
|
$alignClasses = [
|
|
'start' => 'text-start',
|
|
'center' => 'text-center',
|
|
'end' => 'text-end',
|
|
];
|
|
$alignClass = $alignClasses[$align] ?? $alignClasses['start'];
|
|
|
|
$isSorted = $sortable && $sortKey === $currentSort;
|
|
@endphp
|
|
|
|
<th
|
|
{{ $attributes->class([
|
|
'px-3 py-3 text-xs font-semibold tracking-wider text-base/60 uppercase',
|
|
$alignClass,
|
|
'cursor-pointer hover:text-base hover:bg-neutral/5 select-none transition-colors duration-150' => $sortable,
|
|
]) }}
|
|
@if($sortable && $sortKey)
|
|
wire:click="sort('{{ $sortKey }}')"
|
|
@endif
|
|
>
|
|
<div class="flex items-center gap-1.5 @if($align === 'end') justify-end @elseif($align === 'center') justify-center @endif">
|
|
<span>{{ $slot }}</span>
|
|
@if($sortable)
|
|
<span class="text-base/40">
|
|
@if($isSorted)
|
|
@if($currentDirection === 'asc')
|
|
<x-ri-arrow-up-s-line class="size-4" />
|
|
@else
|
|
<x-ri-arrow-down-s-line class="size-4" />
|
|
@endif
|
|
@else
|
|
<x-ri-arrow-up-down-line class="size-3.5 opacity-50" />
|
|
@endif
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</th>
|