feat: enhance icon rendering logic for dynamic component selection based on user-set icon prefix

This commit is contained in:
2025-12-06 11:12:15 -05:00
parent 3bff0062be
commit c9e74148dd
2 changed files with 10 additions and 2 deletions

View File

@@ -53,8 +53,9 @@
$iconPrefix = $service->proxmoxServer->user_set_icon_prefix ?? 'ri';
$iconName = $service->proxmoxServer->user_set_icon;
$iconColor = $service->proxmoxServer->user_set_icon_color;
$componentName = $iconPrefix === 'vaadin' ? 'vaadin-' . $iconName : $iconPrefix . '-' . $iconName;
@endphp
<x-dynamic-component :component="$iconPrefix . '-' . $iconName" class="size-6" :style="$iconColor ? 'color: ' . $iconColor : ''" />
<x-dynamic-component :component="$componentName" class="size-6" :style="$iconColor ? 'color: ' . $iconColor : ''" />
@else
<x-ri-instance-line class="size-6 text-primary" />
@endif