Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Toolkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Web Component Framework
Toolkit
Commits
0f2421d0
Commit
0f2421d0
authored
3 years ago
by
Bekerle, Patrizio
Browse files
Options
Downloads
Patches
Plain Diff
Remove deprecated icon override code
parent
0a9d1496
No related branches found
No related tags found
No related merge requests found
Pipeline
#44226
passed
3 years ago
Stage: test
Stage: deploy
Stage: e2e
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/common/src/icon.js
+0
-44
0 additions, 44 deletions
packages/common/src/icon.js
with
0 additions
and
44 deletions
packages/common/src/icon.js
+
0
−
44
View file @
0f2421d0
...
...
@@ -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
=
{};
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment