Enhance Proxmox service icon handling with custom color and prefix support
This commit is contained in:
@@ -47,12 +47,15 @@
|
||||
flex flex-col md:flex-row items-start md:items-center justify-between gap-4">
|
||||
|
||||
<div class="flex items-start md:items-center gap-4 flex-grow">
|
||||
<div class="bg-primary/10 p-3 rounded-full flex-shrink-0 shadow-sm">
|
||||
@if(optional($service->product->server)->extension === 'Proxmox' && $service->proxmoxServer && $service->proxmoxServer->user_set_icon)
|
||||
@php
|
||||
$hasCustomIcon = optional($service->product->server)->extension === 'Proxmox' && $service->proxmoxServer && $service->proxmoxServer->user_set_icon;
|
||||
$iconColor = $hasCustomIcon ? $service->proxmoxServer->user_set_icon_color : null;
|
||||
@endphp
|
||||
<div class="p-3 rounded-full flex-shrink-0 shadow-sm" style="{{ $iconColor ? 'background-color: ' . $iconColor . '20;' : 'background-color: rgb(var(--color-primary) / 0.1);' }}">
|
||||
@if($hasCustomIcon)
|
||||
@php
|
||||
$iconPrefix = $service->proxmoxServer->user_set_icon_prefix ?? 'ri';
|
||||
$iconName = $service->proxmoxServer->user_set_icon;
|
||||
$iconColor = $service->proxmoxServer->user_set_icon_color;
|
||||
if ($iconPrefix === 'vaadin') {
|
||||
$componentName = 'vaadin-' . str_replace('_', '-', $iconName);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user