Skip to content
Snippets Groups Projects
Commit 0f2421d0 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Remove deprecated icon override code

parent 0a9d1496
No related branches found
No related tags found
No related merge requests found
Pipeline #44226 passed
......@@ -18,14 +18,6 @@ const errorIcon = `
</svg>
`;
// // This variable holds overrides for icons
// // Example: {"cloud": "/new/path/to/icon.svg"}
// let iconOverride = null;
// This variable holds the base path
// Example: "/dist"
// let basePath = null;
function getCSSVariable(name) {
let value = window.getComputedStyle(document.documentElement).getPropertyValue(name);
......@@ -58,17 +50,6 @@ export function getIconSVGURL(name) {
return path;
}
// if (iconOverride && iconOverride[name]) {
// let path = iconOverride[name];
//
// // try to take care of relative paths
// if (!path.startsWith('/') && !path.startsWith('http://') && !path.startsWith('https://') && basePath) {
// path = basePath + path;
// }
//
// return path;
// }
return commonUtils.getAssetURL(pkgName, 'icons/' + encodeURI(name) + '.svg');
}
......@@ -106,31 +87,6 @@ async function getSVGTextElement(name) {
return unsafeHTML(text);
}
// /**
// * Fetch and interpret the icon override data
// *
// * @param path
// * @returns {Promise<{}|any>} json object
// */
// async function fetchIconOverrideData(path) {
// // try to take care of relative paths
// if (!path.startsWith('/') && !path.startsWith('http://') && !path.startsWith('https://') && basePath) {
// path = basePath + path;
// }
//
// const response = await fetch(path);
//
// if (!response.ok) {
// return {};
// }
//
// try {
// return JSON.parse(await response.text());
// } catch(e) {
// return {};
// }
// }
const iconCache = {};
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment