Files
Virtnet.bond/extensions/Servers/Proxmox/views/components/ui/info-row.blade.php
Joseph.Rawlings e7b33a2f6c 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.
2025-12-17 11:24:17 -05:00

52 lines
1.7 KiB
PHP

{{--
Info Row / Key-Value Pair Component - TailServer Theme
Usage:
<x-proxmox::ui.info-row label="IP Address" value="192.168.1.1" />
<x-proxmox::ui.info-row label="Status" :copyable="true">
<x-proxmox::ui.badge variant="success">Active</x-proxmox::ui.badge>
</x-proxmox::ui.info-row>
--}}
@props([
'label',
'value' => null,
'copyable' => false,
'icon' => null,
'muted' => false,
])
<div {{ $attributes->class(['flex items-center justify-between py-2 border-b border-neutral/10 last:border-b-0']) }}>
<div class="flex items-center gap-2 text-sm text-base/60">
@if($icon)
<x-dynamic-component :component="$icon" class="size-4" />
@endif
<span>{{ $label }}</span>
</div>
<div class="flex items-center gap-2">
<span @class([
'text-sm font-medium',
'text-base/50' => $muted,
'text-base' => !$muted,
])>
{{ $value ?? $slot }}
</span>
@if($copyable && $value)
<button
type="button"
x-data="{ copied: false }"
@click="
navigator.clipboard.writeText('{{ $value }}');
copied = true;
setTimeout(() => copied = false, 2000);
"
class="p-1 rounded hover:bg-neutral/10 transition-colors text-base/40 hover:text-base/70"
title="Copy to clipboard"
>
<x-ri-file-copy-line x-show="!copied" class="size-4" />
<x-ri-check-line x-show="copied" x-cloak class="size-4 text-success" />
</button>
@endif
</div>
</div>