feat: enhance icon rendering logic for dynamic component selection based on user-set icon prefix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user