colors
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 1m7s

This commit is contained in:
2026-10-11 22:50:37 +02:00
parent 1fab8ce20d
commit f3fb4ad534
9 changed files with 104 additions and 16 deletions

View File

@@ -44,7 +44,13 @@ function PopulateContext(val){
spanInfo.innerHTML = element.name;
contextMenuElement.appendChild(spanInfo);
if(element.icon){
if(element.color){
let swatch = document.createElement('span');
swatch.classList.add("context-menu-swatch");
swatch.style.backgroundColor = element.color;
contextMenuElement.appendChild(swatch);
}
else if(element.icon){
let iconContextElement = document.createElement('img');
iconContextElement.src = element.icon;
contextMenuElement.appendChild(iconContextElement);