- 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.
62 lines
2.1 KiB
PHP
62 lines
2.1 KiB
PHP
{{--
|
|
Dropdown Component - TailServer Theme
|
|
|
|
Usage:
|
|
<x-proxmox::ui.dropdown>
|
|
<x-slot:trigger>
|
|
<x-proxmox::ui.button>Options</x-proxmox::ui.button>
|
|
</x-slot:trigger>
|
|
|
|
<x-proxmox::ui.dropdown-item href="/profile">Profile</x-proxmox::ui.dropdown-item>
|
|
<x-proxmox::ui.dropdown-item href="/settings">Settings</x-proxmox::ui.dropdown-item>
|
|
<x-proxmox::ui.dropdown-divider />
|
|
<x-proxmox::ui.dropdown-item wire:click="logout" variant="danger">Sign out</x-proxmox::ui.dropdown-item>
|
|
</x-proxmox::ui.dropdown>
|
|
--}}
|
|
|
|
@props([
|
|
'align' => 'right',
|
|
'width' => '48',
|
|
'contentClasses' => '',
|
|
])
|
|
|
|
@php
|
|
$alignClasses = [
|
|
'left' => 'ltr:origin-top-left rtl:origin-top-right start-0',
|
|
'right' => 'ltr:origin-top-right rtl:origin-top-left end-0',
|
|
'center' => 'origin-top left-1/2 -translate-x-1/2',
|
|
];
|
|
|
|
$widthClasses = [
|
|
'32' => 'w-32',
|
|
'40' => 'w-40',
|
|
'48' => 'w-48',
|
|
'56' => 'w-56',
|
|
'64' => 'w-64',
|
|
'80' => 'w-80',
|
|
];
|
|
@endphp
|
|
|
|
<div class="relative inline-block" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
|
|
<div @click="open = !open">
|
|
{{ $trigger }}
|
|
</div>
|
|
|
|
<div
|
|
x-show="open"
|
|
x-transition:enter="transition ease-out duration-200"
|
|
x-transition:enter-start="opacity-0 scale-95 -translate-y-1"
|
|
x-transition:enter-end="opacity-100 scale-100 translate-y-0"
|
|
x-transition:leave="transition ease-in duration-100"
|
|
x-transition:leave-start="opacity-100 scale-100 translate-y-0"
|
|
x-transition:leave-end="opacity-0 scale-95 -translate-y-1"
|
|
class="absolute z-50 mt-2 {{ $widthClasses[$width] ?? 'w-48' }} {{ $alignClasses[$align] ?? $alignClasses['right'] }}"
|
|
style="display: none;"
|
|
@click="open = false"
|
|
>
|
|
<div class="rounded-xl bg-background-secondary py-2 ring-1 ring-neutral/10 shadow-2xl border border-neutral/5 backdrop-blur-xl {{ $contentClasses }}">
|
|
{{ $slot }}
|
|
</div>
|
|
</div>
|
|
</div>
|