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 = ` ...@@ -18,14 +18,6 @@ const errorIcon = `
</svg> </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) { function getCSSVariable(name) {
let value = window.getComputedStyle(document.documentElement).getPropertyValue(name); let value = window.getComputedStyle(document.documentElement).getPropertyValue(name);
...@@ -58,17 +50,6 @@ export function getIconSVGURL(name) { ...@@ -58,17 +50,6 @@ export function getIconSVGURL(name) {
return path; 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'); return commonUtils.getAssetURL(pkgName, 'icons/' + encodeURI(name) + '.svg');
} }
...@@ -106,31 +87,6 @@ async function getSVGTextElement(name) { ...@@ -106,31 +87,6 @@ async function getSVGTextElement(name) {
return unsafeHTML(text); 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 = {}; 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