refactor: update Proxmox UI components to use TailAdmin styling

- Changed component styles and classes to align with TailAdmin design patterns.
- Updated color schemes, typography, and layout for consistency across components.
- Refactored Info Row, Network Address Card, Notice Banner, Progress Bar, Resource Gauge, Section Header, Server Status, Spinner, Stat Card, and Tab Panel components.
- Enhanced responsiveness and accessibility features in various components.
This commit is contained in:
2025-12-17 12:33:10 -05:00
parent 7a089f53e2
commit b4e2923a2c
23 changed files with 364 additions and 350 deletions

View File

@@ -1,5 +1,5 @@
{{--
Network Address Card Component - shadcn-inspired
Network Address Card Component - TailAdmin style
For displaying IP address information with gateway, netmask, and tools
Usage:
@@ -24,53 +24,53 @@
'fromGuestAgent' => false,
])
<div class="rounded-xl border bg-card p-6 shadow-sm mb-4">
<div class="mb-4 rounded-2xl border border-gray-200 bg-white p-6 dark:border-gray-800 dark:bg-white/[0.03]">
{{-- Header --}}
<div class="flex items-center justify-between mb-4">
<h3 class="text-base font-semibold">{{ strtoupper($type) }} Address</h3>
<div class="mb-5 flex items-center justify-between">
<h3 class="text-lg font-semibold text-gray-800 dark:text-white/90">{{ strtoupper($type) }} Address</h3>
<x-proxmox::ui.badge variant="default">
{{ $type === 'ipv6' ? 'IPv6' : 'IPv4' }}
</x-proxmox::ui.badge>
</div>
{{-- Address Grid --}}
<div class="grid md:grid-cols-3 gap-4">
<div class="grid gap-5 md:grid-cols-3">
{{-- IP Address --}}
<div class="space-y-1.5">
<span class="text-sm font-medium text-muted-foreground">IP Address</span>
<div class="flex items-center gap-2">
<span class="font-semibold font-mono">{{ $ip }}</span>
<div class="space-y-2">
<span class="text-theme-sm font-medium text-gray-500 dark:text-gray-400">IP Address</span>
<div class="flex items-center gap-2.5">
<span class="font-mono font-semibold text-gray-800 dark:text-white/90">{{ $ip }}</span>
<x-proxmox::ui.copy-button :value="$ip" />
</div>
@if($cidr)
<p class="text-xs text-muted-foreground">CIDR: {{ $ip }}{{ $cidr }}</p>
<p class="text-theme-xs text-gray-500 dark:text-gray-400">CIDR: {{ $ip }}{{ $cidr }}</p>
@endif
</div>
{{-- Gateway --}}
<div class="space-y-1.5">
<span class="text-sm font-medium text-muted-foreground">Gateway</span>
<div class="flex items-center gap-2">
<span class="font-semibold font-mono">{{ $gateway ?? 'N/A' }}</span>
<div class="space-y-2">
<span class="text-theme-sm font-medium text-gray-500 dark:text-gray-400">Gateway</span>
<div class="flex items-center gap-2.5">
<span class="font-mono font-semibold text-gray-800 dark:text-white/90">{{ $gateway ?? 'N/A' }}</span>
@if($gateway)
<x-proxmox::ui.copy-button :value="$gateway" />
@endif
</div>
<p class="text-xs text-muted-foreground">
<p class="text-theme-xs text-gray-500 dark:text-gray-400">
{{ $fromGuestAgent && !$gateway ? 'Not configured in database' : 'Default route' }}
</p>
</div>
{{-- Netmask --}}
<div class="space-y-1.5">
<span class="text-sm font-medium text-muted-foreground">Subnet Mask</span>
<div class="flex items-center gap-2">
<span class="font-semibold font-mono">{{ $netmask ?? 'N/A' }}</span>
<div class="space-y-2">
<span class="text-theme-sm font-medium text-gray-500 dark:text-gray-400">Subnet Mask</span>
<div class="flex items-center gap-2.5">
<span class="font-mono font-semibold text-gray-800 dark:text-white/90">{{ $netmask ?? 'N/A' }}</span>
@if($netmask)
<x-proxmox::ui.copy-button :value="$netmask" />
@endif
</div>
<p class="text-xs text-muted-foreground">
<p class="text-theme-xs text-gray-500 dark:text-gray-400">
{{ $fromGuestAgent && !$netmask ? 'Not configured' : 'Network range' }}
</p>
</div>
@@ -78,7 +78,7 @@
{{-- Network Tools (for public IPs) --}}
@if($isPublic)
<div class="flex gap-2 justify-end mt-4 pt-4 border-t">
<div class="mt-5 flex justify-end gap-3 border-t border-gray-200 pt-5 dark:border-gray-800">
@if($isIpv6)
<x-proxmox::ui.button
variant="outline"
@@ -130,7 +130,7 @@
{{-- Guest Agent Technical Details --}}
@if($guestInterface)
<div
class="border-t pt-4 mt-4"
class="mt-5 border-t border-gray-200 pt-5 dark:border-gray-800"
x-data="{ isAdvancedView: localStorage.getItem('proxmox-view-mode') === 'advanced' }"
x-init="
isAdvancedView = localStorage.getItem('proxmox-view-mode') === 'advanced';
@@ -139,33 +139,33 @@
});
"
x-show="isAdvancedView"
x-transition:enter="transition ease-out duration-150"
x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
>
<h4 class="text-sm font-medium text-muted-foreground mb-3">Technical Details</h4>
<div class="grid md:grid-cols-2 gap-4">
<h4 class="mb-4 text-theme-sm font-medium text-gray-500 dark:text-gray-400">Technical Details</h4>
<div class="grid gap-4 md:grid-cols-2">
@if(isset($guestInterface['hardware-address']))
<div class="space-y-1">
<span class="text-xs font-medium text-muted-foreground">MAC Address</span>
<div class="flex items-center gap-2">
<span class="text-sm font-mono">{{ $guestInterface['hardware-address'] }}</span>
<div class="space-y-1.5">
<span class="text-theme-xs font-medium text-gray-500 dark:text-gray-400">MAC Address</span>
<div class="flex items-center gap-2.5">
<span class="font-mono text-theme-sm text-gray-700 dark:text-gray-300">{{ $guestInterface['hardware-address'] }}</span>
<x-proxmox::ui.copy-button :value="$guestInterface['hardware-address']" />
</div>
</div>
@endif
@if(isset($guestInterface['name']))
<div class="space-y-1">
<span class="text-xs font-medium text-muted-foreground">Interface</span>
<span class="text-sm font-mono block">{{ $guestInterface['name'] }}</span>
<div class="space-y-1.5">
<span class="text-theme-xs font-medium text-gray-500 dark:text-gray-400">Interface</span>
<span class="block font-mono text-theme-sm text-gray-700 dark:text-gray-300">{{ $guestInterface['name'] }}</span>
</div>
@endif
@if(isset($guestInterface['statistics']))
<div class="space-y-1 md:col-span-2">
<span class="text-xs font-medium text-muted-foreground">Statistics</span>
<div class="flex flex-wrap gap-4 text-sm text-muted-foreground">
<div class="space-y-1.5 md:col-span-2">
<span class="text-theme-xs font-medium text-gray-500 dark:text-gray-400">Statistics</span>
<div class="flex flex-wrap gap-4 text-theme-sm text-gray-600 dark:text-gray-400">
@if(isset($guestInterface['statistics']['rx-bytes']))
<span>RX: {{ number_format($guestInterface['statistics']['rx-bytes']) }} bytes</span>
@endif