feat: implement server tag management with individual fields and update routes

This commit is contained in:
2025-12-18 21:09:45 -05:00
parent db04b8a6c3
commit b0f7c7f20d
6 changed files with 167 additions and 217 deletions

View File

@@ -24,17 +24,27 @@
@endif
<span class="font-medium">{{ $status->name }}</span>
{{-- Server Tags (Proxmox-style) --}}
@if($server->tags && count($server->tags) > 0)
<div class="flex items-center gap-1.5 ml-2">
@foreach($server->tags as $tag)
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium text-white"
style="background-color: {{ $tag['color'] ?? '#6366f1' }};">
{{ $tag['text'] }}
</span>
@endforeach
</div>
@endif
{{-- Server Tags --}}
<div class="flex items-center gap-1.5 ml-2">
@if($server->tag1)
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium text-white"
style="background-color: {{ $server->tag1color ?? '#3498db' }};">
{{ $server->tag1 }}
</span>
@endif
@if($server->tag2)
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium text-white"
style="background-color: {{ $server->tag2color ?? '#2ecc71' }};">
{{ $server->tag2 }}
</span>
@endif
@if($server->tag3)
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium text-white"
style="background-color: {{ $server->tag3color ?? '#e74c3c' }};">
{{ $server->tag3 }}
</span>
@endif
</div>
</div>
<div class="flex items-center gap-2 px-3 py-1.5 rounded-lg
@if($status->status == 'running') text-success bg-success/20