Skip to content

Commit

Permalink
[FIX] web_responsive: Add support to serve menu icon in image url
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kafai-lam authored and chaule97 committed Jan 10, 2025
1 parent e4e09e8 commit c1b496e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web_responsive/static/src/components/apps_menu_tools.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c1b496e

Please sign in to comment.