[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>
This commit is contained in:
Fai
2024-12-10 11:11:51 -05:00
parent 520304ba5a
commit 34aac9e021

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;