fix(webui): category-icon fallback + flatten forms/ + manifest order

From the feng-shui audit (all adversarially verified):

- BUG (high): apps-grid.js category tiles used onerror fallback
  /core/icons/categories/default.svg, which doesn't exist (the dir has
  misc.svg as its generic icon, which data-loader.js already uses). Any
  category missing its named SVG showed a broken-image glyph. Repointed to
  /core/icons/categories/misc.svg.
- TIDY: core/forms was the lone depth-3 nesting — JS at forms/controls/js/
  while its CSS sat at forms/css/ and every other core subsystem uses
  <name>/js/. 'controls/' grouped nothing (just the 2 custom-* widgets), so
  flattened to core/forms/js/ (+ updated index.html). forms is now symmetric.
- CONSISTENCY: components/manifest.dev.json entries carried nav.order but not
  the top-level 'order' that each feature.json has; added it so the API-down
  fallback matches the live /api/features/list scan.

Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
librelad 2026-05-31 00:39:08 +01:00
parent 1b3bb59179
commit 8d86855098
5 changed files with 15 additions and 9 deletions

View File

@ -52,7 +52,7 @@ Object.assign(AppsManager.prototype, {
} else {
let iconPath = icon || `/core/icons/categories/${id}.svg`;
if (!iconPath.startsWith('/')) iconPath = '/' + iconPath;
iconHtml = `<img src="${iconPath}" alt="${name}" onerror="this.src='/core/icons/categories/default.svg'"/>`;
iconHtml = `<img src="${iconPath}" alt="${name}" onerror="this.src='/core/icons/categories/misc.svg'"/>`;
}
div.innerHTML = `${iconHtml} ${name}`;

View File

@ -14,7 +14,8 @@
"nav": {
"label": "Dashboard",
"order": 10
}
},
"order": 10
},
{
"id": "apps",
@ -30,7 +31,8 @@
"nav": {
"label": "App Center",
"order": 20
}
},
"order": 20
},
{
"id": "admin",
@ -44,7 +46,8 @@
"nav": {
"label": "Admin",
"order": 40
}
},
"order": 40
},
{
"id": "tasks",
@ -58,7 +61,8 @@
"nav": {
"label": "Tasks",
"order": 60
}
},
"order": 60
},
{
"id": "updater",
@ -71,7 +75,8 @@
"nav": {
"label": "Updates",
"order": 30
}
},
"order": 30
},
{
"id": "backup",
@ -85,7 +90,8 @@
"nav": {
"label": "Backups",
"order": 50
}
},
"order": 50
}
]
}

View File

@ -67,8 +67,8 @@
})();
</script>
<script src="/core/theme/js/theme-registry.js"></script>
<script src="/core/forms/controls/js/custom-select.js"></script>
<script src="/core/forms/controls/js/custom-number.js"></script>
<script src="/core/forms/js/custom-select.js"></script>
<script src="/core/forms/js/custom-number.js"></script>
</head>
<body>
<!-- Topbar Container -->