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,56 @@
|
||||
{{--
|
||||
Copyable Text Component - TailServer Theme
|
||||
Text field with copy to clipboard functionality
|
||||
|
||||
Usage:
|
||||
<x-proxmox::ui.copyable label="IPv4 Address" value="192.168.1.1" />
|
||||
--}}
|
||||
|
||||
@props([
|
||||
'label' => null,
|
||||
'value',
|
||||
'masked' => false,
|
||||
])
|
||||
|
||||
<div class="space-y-2">
|
||||
@if($label)
|
||||
<label class="text-sm font-semibold text-base/70">{{ $label }}</label>
|
||||
@endif
|
||||
<div
|
||||
x-data="{
|
||||
copied: false,
|
||||
showValue: @js(!$masked),
|
||||
copyText: @js($value),
|
||||
copyToClipboard() {
|
||||
navigator.clipboard.writeText(this.copyText);
|
||||
this.copied = true;
|
||||
setTimeout(() => this.copied = false, 3000);
|
||||
}
|
||||
}"
|
||||
class="group flex items-center gap-2 border border-neutral/15 rounded-xl bg-gradient-to-r from-neutral/5 to-transparent px-3.5 py-2.5 text-sm text-base hover:border-neutral/30 transition-all duration-200 shadow-sm hover:shadow"
|
||||
>
|
||||
@if($masked)
|
||||
<span class="truncate flex-1 font-mono" x-text="showValue ? copyText : '••••••••••••'"></span>
|
||||
<button
|
||||
@click="showValue = !showValue"
|
||||
type="button"
|
||||
class="text-base/40 hover:text-primary transition-colors duration-200"
|
||||
:aria-label="showValue ? 'Hide value' : 'Show value'"
|
||||
>
|
||||
<x-ri-eye-line x-show="!showValue" class="size-4" />
|
||||
<x-ri-eye-off-line x-show="showValue" x-cloak class="size-4" />
|
||||
</button>
|
||||
@else
|
||||
<span class="truncate flex-1 font-mono">{{ $value }}</span>
|
||||
@endif
|
||||
<button
|
||||
@click="copyToClipboard()"
|
||||
type="button"
|
||||
class="text-base/40 hover:text-primary transition-all duration-200 relative inline-flex items-center justify-center size-5 hover:scale-110 active:scale-95"
|
||||
aria-label="Copy to clipboard"
|
||||
>
|
||||
<x-ri-check-fill x-show="copied" x-transition x-cloak class="absolute size-4 text-success" />
|
||||
<x-ri-file-copy-line x-show="!copied" x-transition class="absolute size-4" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user