fix: force generic icon on 'Other' category even when API provides linux_logo.png
VirtFusion API returns an 'Other' category with icon=linux_logo.png by default. Null out the icon in groupOsTemplates() so the JS SVG fallback renders instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -303,9 +303,10 @@ class Module
|
|||||||
if (count($catTemplates) <= 1) {
|
if (count($catTemplates) <= 1) {
|
||||||
$otherTemplates = array_merge($otherTemplates, $catTemplates);
|
$otherTemplates = array_merge($otherTemplates, $catTemplates);
|
||||||
} else {
|
} else {
|
||||||
|
$catName = $osCategory['name'] ?? 'Unknown';
|
||||||
$categories[] = [
|
$categories[] = [
|
||||||
'name' => $esc($osCategory['name'] ?? 'Unknown'),
|
'name' => $esc($catName),
|
||||||
'icon' => $osCategory['icon'] ?? null,
|
'icon' => ($catName === 'Other') ? null : ($osCategory['icon'] ?? null),
|
||||||
'templates' => $catTemplates,
|
'templates' => $catTemplates,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user