fix(webui): point app/category icon generators at /core/icons
The frontend modularization moved icons to frontend/core/icons/ and updated the frontend JS, but the host-side generators were never updated — they wrote the apps.json/categories 'icon' field as /icons/apps/<app>.svg and /icons/categories/ <cat>.svg, and webui_app_icons.sh / webui_config.sh synced icon files into the non-existent frontend/icons/apps. Those served paths 404 (text/html catch-all), so every app card fell back to default.svg (the generic box) instead of its real logo. Repointed to /core/icons/... (where the SVGs actually live and serve as image/svg+xml): - webui_config.sh: icon dir + emitted apps.json icon path - webui_app_icons.sh: icon sync dir + comment - webui_container_setup.sh: comment - webui_create_app_categories.sh: 11 category icon paths Source fix only — the live apps.json refreshes on the next host-side regen (lpRegen). NOT touched: scripts/backup/engines/*.json '/icons/config/backup.svg' (that SVG lives at the oddly-nested components/admin/config/icons/config/ and serves at neither path — needs a placement decision, flagged separately). Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
547970b1b4
commit
f0c5f607d7
@ -162,7 +162,7 @@ EOF
|
||||
icon_file="$app_name.png"
|
||||
fi
|
||||
if [[ -n "$icon_file" ]]; then
|
||||
local icons_apps_dir="${containers_dir}libreportal/frontend/icons/apps"
|
||||
local icons_apps_dir="${containers_dir}libreportal/frontend/core/icons/apps"
|
||||
runFileOp mkdir -p "$icons_apps_dir"
|
||||
cp "$dir/$icon_file" "$icons_apps_dir/$icon_file" 2>/dev/null
|
||||
fi
|
||||
@ -212,7 +212,7 @@ EOF
|
||||
fields+=(" \"backup_live_capable\": $backup_live_capable")
|
||||
[[ -n "$url" ]] && fields+=(" \"url\": \"$url\"")
|
||||
[[ -n "$description" ]] && fields+=(" \"description\": \"$description\"")
|
||||
[[ -n "$icon_file" ]] && fields+=(" \"icon\": \"/icons/apps/$icon_file\"")
|
||||
[[ -n "$icon_file" ]] && fields+=(" \"icon\": \"/core/icons/apps/$icon_file\"")
|
||||
[[ -n "$services_json" ]] && fields+=(" \"services\": [$services_json]")
|
||||
if [[ -n "$config_vars" ]]; then
|
||||
fields+=(" \"config\": {"$'\n'"${config_vars%,}"$'\n'" }")
|
||||
|
||||
@ -26,67 +26,67 @@ webuiCreateAppsCategories() {
|
||||
{
|
||||
"id": "recommended",
|
||||
"name": "Recommended",
|
||||
"icon": "/icons/categories/recommended.svg",
|
||||
"icon": "/core/icons/categories/recommended.svg",
|
||||
"description": "Hand-picked apps to round out your install"
|
||||
},
|
||||
{
|
||||
"id": "communication",
|
||||
"name": "Communication",
|
||||
"icon": "/icons/categories/communication.svg",
|
||||
"icon": "/core/icons/categories/communication.svg",
|
||||
"description": "Communication and collaboration tools"
|
||||
},
|
||||
{
|
||||
"id": "development",
|
||||
"name": "Development",
|
||||
"icon": "/icons/categories/development.svg",
|
||||
"icon": "/core/icons/categories/development.svg",
|
||||
"description": "Development tools and version control"
|
||||
},
|
||||
{
|
||||
"id": "knowledge",
|
||||
"name": "Knowledge",
|
||||
"icon": "/icons/categories/knowledge.svg",
|
||||
"icon": "/core/icons/categories/knowledge.svg",
|
||||
"description": "Knowledge management and wikis"
|
||||
},
|
||||
{
|
||||
"id": "media",
|
||||
"name": "Media",
|
||||
"icon": "/icons/categories/media.svg",
|
||||
"icon": "/core/icons/categories/media.svg",
|
||||
"description": "Media streaming and entertainment"
|
||||
},
|
||||
{
|
||||
"id": "monitoring",
|
||||
"name": "Monitoring",
|
||||
"icon": "/icons/categories/monitoring.svg",
|
||||
"icon": "/core/icons/categories/monitoring.svg",
|
||||
"description": "Metrics, dashboards and observability"
|
||||
},
|
||||
{
|
||||
"id": "networking",
|
||||
"name": "Networking",
|
||||
"icon": "/icons/categories/networking.svg",
|
||||
"icon": "/core/icons/categories/networking.svg",
|
||||
"description": "Network tools and services"
|
||||
},
|
||||
{
|
||||
"id": "productivity",
|
||||
"name": "Productivity",
|
||||
"icon": "/icons/categories/productivity.svg",
|
||||
"icon": "/core/icons/categories/productivity.svg",
|
||||
"description": "Productivity and business tools"
|
||||
},
|
||||
{
|
||||
"id": "security",
|
||||
"name": "Security",
|
||||
"icon": "/icons/categories/security.svg",
|
||||
"icon": "/core/icons/categories/security.svg",
|
||||
"description": "Security and privacy tools"
|
||||
},
|
||||
{
|
||||
"id": "storage",
|
||||
"name": "Storage",
|
||||
"icon": "/icons/categories/storage.svg",
|
||||
"icon": "/core/icons/categories/storage.svg",
|
||||
"description": "File storage and sharing solutions"
|
||||
},
|
||||
{
|
||||
"id": "system",
|
||||
"name": "System",
|
||||
"icon": "/icons/categories/system.svg",
|
||||
"icon": "/core/icons/categories/system.svg",
|
||||
"description": "LibrePortal itself and platform-level services"
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
# Sync app icons from container template dirs to the LibrePortal frontend.
|
||||
#
|
||||
# apps.json references /icons/apps/<app>.<ext> unconditionally (see
|
||||
# apps.json references /core/icons/apps/<app>.<ext> unconditionally (see
|
||||
# webui_config.sh), so the icon file must physically exist in the frontend
|
||||
# icons dir or the apps page falls back to the default icon.
|
||||
|
||||
@ -13,7 +13,7 @@ webuiSyncAppIcon() {
|
||||
local app_name="$1"
|
||||
[[ -z "$app_name" ]] && return 1
|
||||
|
||||
local icons_dir="${containers_dir}libreportal/frontend/icons/apps"
|
||||
local icons_dir="${containers_dir}libreportal/frontend/core/icons/apps"
|
||||
mkdir -p "$icons_dir"
|
||||
|
||||
# Icons live in the install template dir — copy_build_context.sh
|
||||
|
||||
@ -22,7 +22,7 @@ webuiContainerSetup()
|
||||
webuiGenerateLibrePortalConfig
|
||||
fi
|
||||
# The patch path rewrites apps.json (which references
|
||||
# /icons/apps/<app>.svg) but doesn't place the icon file — sync it here
|
||||
# /core/icons/apps/<app>.svg) but doesn't place the icon file — sync it here
|
||||
# so the apps page never points at a missing icon. The full regen
|
||||
# copies icons itself; this is cheap and idempotent regardless.
|
||||
if declare -F webuiSyncAppIcon >/dev/null 2>&1; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user