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 { } else {
let iconPath = icon || `/core/icons/categories/${id}.svg`; let iconPath = icon || `/core/icons/categories/${id}.svg`;
if (!iconPath.startsWith('/')) iconPath = '/' + iconPath; 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}`; div.innerHTML = `${iconHtml} ${name}`;

View File

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

View File

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