mirror of https://github.com/OCA/web.git
[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
parent
c3811ace94
commit
11cefbf47e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue