From b4e2923a2c040cc9276b63829c1aadfb8a7ff6c6 Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Wed, 17 Dec 2025 12:33:10 -0500 Subject: [PATCH] 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. --- .../components/ui/action-button.blade.php | 22 +++--- .../components/ui/action-toolbar.blade.php | 4 +- .../components/ui/allocation-card.blade.php | 40 +++++------ .../components/ui/confirm-dialog.blade.php | 50 ++++++------- .../views/components/ui/copy-button.blade.php | 6 +- .../views/components/ui/copyable.blade.php | 16 ++--- .../components/ui/dropdown-divider.blade.php | 4 +- .../components/ui/dropdown-item.blade.php | 12 ++-- .../components/ui/editable-field.blade.php | 48 ++++++------- .../views/components/ui/empty-state.blade.php | 30 ++++---- .../views/components/ui/help-modal.blade.php | 20 +++--- .../views/components/ui/icon-picker.blade.php | 46 ++++++------ .../views/components/ui/index.blade.php | 32 ++++----- .../views/components/ui/info-row.blade.php | 17 ++--- .../ui/network-address-card.blade.php | 70 +++++++++---------- .../components/ui/notice-banner.blade.php | 44 ++++++------ .../views/components/ui/progress.blade.php | 37 ++++++---- .../components/ui/resource-gauge.blade.php | 50 ++++++------- .../components/ui/section-header.blade.php | 56 +++++++-------- .../components/ui/server-status.blade.php | 50 ++++++------- .../views/components/ui/spinner.blade.php | 16 ++--- .../views/components/ui/stat-card.blade.php | 38 +++++----- .../views/components/ui/tab-panel.blade.php | 6 +- 23 files changed, 364 insertions(+), 350 deletions(-) diff --git a/extensions/Servers/Proxmox/views/components/ui/action-button.blade.php b/extensions/Servers/Proxmox/views/components/ui/action-button.blade.php index afc2ded7c..19442655e 100644 --- a/extensions/Servers/Proxmox/views/components/ui/action-button.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/action-button.blade.php @@ -1,5 +1,5 @@ {{-- - Action Toolbar Button Component - shadcn-style + Action Toolbar Button Component - TailAdmin style Individual button for VM control actions Usage: @@ -24,23 +24,23 @@ @php $variants = [ - 'default' => 'border bg-background hover:bg-accent hover:text-accent-foreground', - 'primary' => 'border border-primary/20 bg-primary/10 text-primary hover:bg-primary/20', - 'success' => 'border border-success/20 bg-success/10 text-success hover:bg-success/20', - 'warning' => 'border border-warning/20 bg-warning/10 text-warning hover:bg-warning/20', - 'danger' => 'border border-danger/20 bg-danger/10 text-danger hover:bg-danger/20', + 'default' => 'border border-gray-300 bg-white text-gray-700 shadow-theme-xs hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700', + 'primary' => 'border border-brand-200 bg-brand-50 text-brand-600 hover:bg-brand-100 dark:border-brand-800 dark:bg-brand-500/10 dark:text-brand-400 dark:hover:bg-brand-500/20', + 'success' => 'border border-success-200 bg-success-50 text-success-600 hover:bg-success-100 dark:border-success-800 dark:bg-success-500/10 dark:text-success-400 dark:hover:bg-success-500/20', + 'warning' => 'border border-warning-200 bg-warning-50 text-warning-600 hover:bg-warning-100 dark:border-warning-800 dark:bg-warning-500/10 dark:text-warning-400 dark:hover:bg-warning-500/20', + 'danger' => 'border border-error-200 bg-error-50 text-error-600 hover:bg-error-100 dark:border-error-800 dark:bg-error-500/10 dark:text-error-400 dark:hover:bg-error-500/20', ]; $sizes = [ - 'sm' => 'h-8 px-3 text-xs', - 'md' => 'h-9 px-4 text-sm', - 'lg' => 'h-10 px-5 text-sm', + 'sm' => 'h-9 px-3 text-theme-xs', + 'md' => 'h-10 px-4 text-theme-sm', + 'lg' => 'h-11 px-5 text-theme-sm', ]; $iconSizes = [ 'sm' => 'size-3.5', 'md' => 'size-4', - 'lg' => 'size-4', + 'lg' => 'size-4.5', ]; @endphp @@ -53,7 +53,7 @@ {{ $attributes->merge([ 'disabled' => $disabled || $loading, ])->class([ - 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium ring-offset-background transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', + 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg font-medium transition-colors duration-150 focus:outline-none focus-visible:ring-3 focus-visible:ring-brand-500/20', $variants[$variant] ?? $variants['default'], $sizes[$size] ?? $sizes['md'], 'pointer-events-none opacity-50' => $disabled, diff --git a/extensions/Servers/Proxmox/views/components/ui/action-toolbar.blade.php b/extensions/Servers/Proxmox/views/components/ui/action-toolbar.blade.php index 7df0c5994..db12d0d99 100644 --- a/extensions/Servers/Proxmox/views/components/ui/action-toolbar.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/action-toolbar.blade.php @@ -1,5 +1,5 @@ {{-- - Action Toolbar Component - shadcn-inspired + Action Toolbar Component - TailAdmin style For VM control buttons (Start, Stop, Restart, etc.) Usage: @@ -17,7 +17,7 @@ ])
class([ - 'flex flex-wrap gap-2', + 'flex flex-wrap gap-3', 'justify-center' => $centered, 'justify-start' => !$centered, ]) }}> diff --git a/extensions/Servers/Proxmox/views/components/ui/allocation-card.blade.php b/extensions/Servers/Proxmox/views/components/ui/allocation-card.blade.php index a67c5e484..55e638d01 100644 --- a/extensions/Servers/Proxmox/views/components/ui/allocation-card.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/allocation-card.blade.php @@ -1,5 +1,5 @@ {{-- - Resource Allocation Card Component - shadcn-style + Resource Allocation Card Component - TailAdmin style For displaying CPU, Memory, and other resource allocation vs entitlement Usage: @@ -10,7 +10,7 @@ entitlement-label="4 vCPU entitlement" description="Live hypervisor usage sampled directly from the cluster." gradient="linear-gradient(90deg, #38bdf8 0%, #6366f1 100%)" - :badge="['label' => 'Healthy', 'class' => 'text-success bg-success/15']" + :badge="['label' => 'Healthy', 'class' => 'text-success-500 bg-success-50 dark:bg-success-500/15']" /> --}} @@ -20,41 +20,41 @@ 'usageSummary', 'entitlementLabel', 'description' => null, - 'gradient' => 'linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%)', + 'gradient' => 'linear-gradient(90deg, #465fff 0%, #8b5cf6 100%)', 'badge' => null, 'icon' => null, - 'iconColor' => 'text-primary', + 'iconColor' => 'text-brand-500', ]) -
class(['rounded-xl border bg-card p-4 shadow-sm transition-colors duration-150 hover:bg-accent/50']) }}> -
+
class(['rounded-2xl border border-gray-200 bg-white p-5 transition-colors duration-150 hover:bg-gray-50 dark:border-gray-800 dark:bg-white/[0.03] dark:hover:bg-gray-800/50']) }}> +
-
+
@if($icon) -
- +
+
@endif -
-

{{ $label }}

-

{{ $usageSummary }}

-

{{ $entitlementLabel }}

+
+

{{ $label }}

+

{{ $usageSummary }}

+

{{ $entitlementLabel }}

@if($badge) - + {{ $badge['label'] ?? '' }} @endif
@if(!is_null($percent)) -
-
- Usage - {{ $percent }}% +
+
+ Usage + {{ $percent }}%
-
+
{{ $description }}

+

{{ $description }}

@endif
diff --git a/extensions/Servers/Proxmox/views/components/ui/confirm-dialog.blade.php b/extensions/Servers/Proxmox/views/components/ui/confirm-dialog.blade.php index 12aafa934..713b53562 100644 --- a/extensions/Servers/Proxmox/views/components/ui/confirm-dialog.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/confirm-dialog.blade.php @@ -1,5 +1,5 @@ {{-- - Confirm Dialog Component - shadcn-style + Confirm Dialog Component - TailAdmin style For dangerous actions like delete, stop, etc. Usage: @@ -26,21 +26,21 @@ $variants = [ 'danger' => [ 'icon' => 'ri-error-warning-line', - 'iconBg' => 'bg-danger/10', - 'iconColor' => 'text-danger', - 'buttonClass' => 'bg-danger text-danger-foreground hover:bg-danger/90', + 'iconBg' => 'bg-error-50 dark:bg-error-500/10', + 'iconColor' => 'text-error-500', + 'buttonClass' => 'bg-error-500 text-white shadow-theme-xs hover:bg-error-600', ], 'warning' => [ 'icon' => 'ri-alert-line', - 'iconBg' => 'bg-warning/10', - 'iconColor' => 'text-warning', - 'buttonClass' => 'bg-warning text-warning-foreground hover:bg-warning/90', + 'iconBg' => 'bg-warning-50 dark:bg-warning-500/10', + 'iconColor' => 'text-warning-500', + 'buttonClass' => 'bg-warning-500 text-white shadow-theme-xs hover:bg-warning-600', ], 'primary' => [ 'icon' => 'ri-question-line', - 'iconBg' => 'bg-primary/10', - 'iconColor' => 'text-primary', - 'buttonClass' => 'bg-primary text-primary-foreground hover:bg-primary/90', + 'iconBg' => 'bg-brand-50 dark:bg-brand-500/10', + 'iconColor' => 'text-brand-500', + 'buttonClass' => 'bg-brand-500 text-white shadow-theme-xs hover:bg-brand-600', ], ]; @@ -52,52 +52,52 @@ x-show="open" x-cloak @keydown.escape.window="open = false" - class="fixed inset-0 z-50 overflow-y-auto" + class="fixed inset-0 z-99999 overflow-y-auto" {{ $attributes->whereDoesntStartWith('wire:click') }} > -
+
-
- +
+
-

{{ $title }}

+

{{ $title }}

-

{{ $message }}

+

{{ $message }}

-
+
@@ -105,7 +105,7 @@ type="button" @click="open = false" {{ $attributes->whereStartsWith('wire:click') }} - class="flex-1 inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors duration-150 h-9 px-4 py-2 {{ $config['buttonClass'] }}" + class="flex-1 inline-flex items-center justify-center whitespace-nowrap rounded-lg px-4 py-2.5 text-theme-sm font-medium transition-colors duration-150 {{ $config['buttonClass'] }}" > {{ $confirmLabel }} diff --git a/extensions/Servers/Proxmox/views/components/ui/copy-button.blade.php b/extensions/Servers/Proxmox/views/components/ui/copy-button.blade.php index 479596425..11fc58321 100644 --- a/extensions/Servers/Proxmox/views/components/ui/copy-button.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/copy-button.blade.php @@ -1,5 +1,5 @@ {{-- - Copy Button Component - shadcn-style + Copy Button Component - TailAdmin style Small inline button to copy text to clipboard Usage: @@ -26,10 +26,10 @@
diff --git a/extensions/Servers/Proxmox/views/components/ui/copyable.blade.php b/extensions/Servers/Proxmox/views/components/ui/copyable.blade.php index e7a213104..c5b52107b 100644 --- a/extensions/Servers/Proxmox/views/components/ui/copyable.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/copyable.blade.php @@ -1,5 +1,5 @@ {{-- - Copyable Text Component - shadcn-style + Copyable Text Component - TailAdmin style Text field with copy to clipboard functionality Usage: @@ -14,7 +14,7 @@
@if($label) - + @endif
@if($masked) - + @else - {{ $value }} + {{ $value }} @endif
diff --git a/extensions/Servers/Proxmox/views/components/ui/dropdown-divider.blade.php b/extensions/Servers/Proxmox/views/components/ui/dropdown-divider.blade.php index 37468ba75..cf68742b5 100644 --- a/extensions/Servers/Proxmox/views/components/ui/dropdown-divider.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/dropdown-divider.blade.php @@ -1,5 +1,5 @@ {{-- - Dropdown Divider Component - shadcn-style + Dropdown Divider Component - TailAdmin style --}} -
+
diff --git a/extensions/Servers/Proxmox/views/components/ui/dropdown-item.blade.php b/extensions/Servers/Proxmox/views/components/ui/dropdown-item.blade.php index 0d90fb4b3..4347db074 100644 --- a/extensions/Servers/Proxmox/views/components/ui/dropdown-item.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/dropdown-item.blade.php @@ -1,5 +1,5 @@ {{-- - Dropdown Item Component - shadcn-style + Dropdown Item Component - TailAdmin style --}} @props([ @@ -13,9 +13,9 @@ $tag = $href ? 'a' : 'button'; $variantClasses = [ - 'default' => 'text-foreground hover:bg-accent hover:text-accent-foreground', - 'danger' => 'text-danger focus:bg-danger/10 focus:text-danger', - 'success' => 'text-success focus:bg-success/10 focus:text-success', + 'default' => 'text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-white', + 'danger' => 'text-error-600 hover:bg-error-50 dark:text-error-400 dark:hover:bg-error-500/10', + 'success' => 'text-success-600 hover:bg-success-50 dark:text-success-400 dark:hover:bg-success-500/10', ]; $variantClass = $variantClasses[$variant] ?? $variantClasses['default']; @@ -26,13 +26,13 @@ @if($tag === 'button') type="button" @endif @if($disabled) disabled @endif {{ $attributes->class([ - 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors duration-100 w-full', + 'relative flex w-full cursor-pointer select-none items-center gap-2.5 rounded-lg px-3 py-2 text-theme-sm outline-none transition-colors duration-150', $variantClass, 'pointer-events-none opacity-50' => $disabled, ]) }} > @if($icon) - + @endif {{ $slot }} diff --git a/extensions/Servers/Proxmox/views/components/ui/editable-field.blade.php b/extensions/Servers/Proxmox/views/components/ui/editable-field.blade.php index 37fa54bc8..ac5c20212 100644 --- a/extensions/Servers/Proxmox/views/components/ui/editable-field.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/editable-field.blade.php @@ -1,5 +1,5 @@ {{-- - Editable Field Component - shadcn-inspired + Editable Field Component - TailAdmin style A field with display value and edit button that opens a modal Usage: @@ -32,14 +32,14 @@ ])
- -
- {{ $value ?? 'Not set' }} + +
+ {{ $value ?? 'Not set' }} @if($editClick)
-
+
- + whereStartsWith('wire:model') }} - class="w-full mt-1.5 px-3 py-2 rounded-lg border bg-background text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring" + class="mt-2 h-11 w-full rounded-lg border border-gray-300 bg-transparent px-4 text-theme-sm shadow-theme-xs placeholder:text-gray-400 focus:border-brand-300 focus:outline-none focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-gray-500 dark:focus:border-brand-600" placeholder="{{ $placeholder ?? 'Enter ' . strtolower($label) }}" />
@if($error) -
{{ $error }}
+
{{ $error }}
@endif @if(isset($hint)) -
{{ $hint }}
+
{{ $hint }}
@endif
-
+
@if($cancelClick) @@ -125,7 +125,7 @@ @@ -134,7 +134,7 @@ diff --git a/extensions/Servers/Proxmox/views/components/ui/empty-state.blade.php b/extensions/Servers/Proxmox/views/components/ui/empty-state.blade.php index 054d43b41..1c755c159 100644 --- a/extensions/Servers/Proxmox/views/components/ui/empty-state.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/empty-state.blade.php @@ -1,5 +1,5 @@ {{-- - Empty State Component - shadcn-style + Empty State Component - TailAdmin style Usage: @@ -23,21 +23,21 @@
class([ 'flex flex-col items-center justify-center text-center', - 'py-12 px-6' => !$compact, - 'py-6 px-4' => $compact, + 'px-6 py-12' => !$compact, + 'px-4 py-6' => $compact, ]) }} > @if($icon)
!$compact, - 'mb-3 size-10' => $compact, + 'flex items-center justify-center rounded-full bg-gray-100 dark:bg-gray-800', + 'mb-5 size-16' => !$compact, + 'mb-3 size-11' => $compact, ])> !$compact, + $iconClass ?? 'text-gray-400 dark:text-gray-500', + 'size-8' => !$compact, 'size-5' => $compact, ]) /> @@ -45,25 +45,25 @@ @endif

!$compact, - 'text-sm' => $compact, + 'font-semibold text-gray-800 dark:text-white/90', + 'text-lg' => !$compact, + 'text-theme-sm' => $compact, ])> {{ $title }}

@if($description)

!$compact, - 'mt-1 text-xs' => $compact, + 'max-w-sm text-gray-500 dark:text-gray-400', + 'mt-2 text-theme-sm' => !$compact, + 'mt-1 text-theme-xs' => $compact, ])> {{ $description }}

@endif @if($slot->isNotEmpty()) -
!$compact, 'mt-3' => $compact])> +
!$compact, 'mt-3' => $compact])> {{ $slot }}
@endif diff --git a/extensions/Servers/Proxmox/views/components/ui/help-modal.blade.php b/extensions/Servers/Proxmox/views/components/ui/help-modal.blade.php index 07f3c0983..37676fc3b 100644 --- a/extensions/Servers/Proxmox/views/components/ui/help-modal.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/help-modal.blade.php @@ -1,5 +1,5 @@ {{-- - Help Modal Trigger Component - shadcn-style + Help Modal Trigger Component - TailAdmin styled Question mark button that opens an info modal Usage: @@ -19,7 +19,7 @@ ])
- @@ -34,7 +34,7 @@ x-transition:leave-end="opacity-0" @click="open = false" @keydown.escape.window="open = false" - class="fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" + class="fixed inset-0 z-50 bg-gray-900/50 backdrop-blur-sm dark:bg-gray-950/70" style="display: none;" >
@@ -51,28 +51,28 @@ class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;" > -
-
-
- +
+
-

+

{{ $title }}

@if(isset($description)) -
+
{{ $description }}
@endif @if(isset($details)) -
+
{{ $details }}
@endif diff --git a/extensions/Servers/Proxmox/views/components/ui/icon-picker.blade.php b/extensions/Servers/Proxmox/views/components/ui/icon-picker.blade.php index d5ad9e73a..35b850b21 100644 --- a/extensions/Servers/Proxmox/views/components/ui/icon-picker.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/icon-picker.blade.php @@ -1,5 +1,5 @@ {{-- - Icon Picker Component - shadcn-inspired + Icon Picker Component - TailAdmin styled Modal-based icon picker with search and categories Usage: @@ -40,15 +40,15 @@ @@ -69,7 +69,7 @@ x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" @click="open = false" - class="fixed inset-0 bg-black/50" + class="fixed inset-0 bg-gray-900/50 dark:bg-gray-950/70" >
@@ -81,44 +81,44 @@ x-transition:leave="ease-in duration-100" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" - class="relative rounded-xl border bg-card shadow-lg w-full max-w-2xl max-h-[80vh] overflow-hidden" + class="relative rounded-2xl border border-gray-200 bg-white shadow-theme-lg dark:border-gray-800 dark:bg-gray-900 w-full max-w-2xl max-h-[80vh] overflow-hidden" > -
+
-

Select Icon

-
- +
@if(count($categories) > 0) -
+
@foreach($categories as $category) @@ -132,7 +132,7 @@