[FIX] web_responsive: Add support to serve menu icon in image url

Add support to serve menu icon in image URL format rather than base64.

It can take advantanges from browser caching and Nginx proxy.

Signed-off-by: Fai <lamkafai1997@gmail.com>
pull/3037/head
Fai 2024-12-10 11:11:51 -05:00 committed by kobros-tech
parent c3811ace94
commit 11cefbf47e
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,11 @@
export function getWebIconData(menu) {
const result = "/web_responsive/static/img/default_icon_app.png";
const webIcon = menu.webIcon;
if (webIcon && webIcon.split(",").length === 2) {
const path = webIcon.replace(",", "/");
return path.startsWith("/") ? path : "/" + path;
}
const iconData = menu.webIconData;
if (!iconData) {
return result;