diff --git a/wled00/data/index.js b/wled00/data/index.js index 54d6ac05..6b4602ec 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -286,7 +286,7 @@ function showErrorToast() showToast('Connection to light failed!', true); } -function clearErrorToast() {gId("toast").className = gId("toast").className.replace("error", "");} +function clearErrorToast() {gId("toast").classList.remove("error");} function getRuntimeStr(rt) { @@ -498,8 +498,7 @@ function loadFXData(callback = null) clearErrorToast(); fxdata = json||[]; // add default value for Solid - fxdata.shift(); - fxdata.unshift("@;!;"); + fxdata.shift().unshift("@;!;"); }) .catch(function (error) { fxdata = []; @@ -547,9 +546,9 @@ function populatePresets(fromls) cn += `
`; if (cfg.comp.pid) cn += `
${i}
`; cn += `
${isPlaylist(i)?"":""}${pName(i)}
- -
-
`; + +
+`; pNum++; } @@ -832,15 +831,9 @@ function genPalPrevCss(id) } else { if (selColors) { let e = element[1] - 1; - //if (Array.isArray(selColors[e])) { - r = selColors[e][0]; - g = selColors[e][1]; - b = selColors[e][2]; - //} else { - // r = (selColors[e]>>16) & 0xFF; - // g = (selColors[e]>> 8) & 0xFF; - // b = (selColors[e] ) & 0xFF; - //} + r = selColors[e][0]; + g = selColors[e][1]; + b = selColors[e][2]; } } if (index === false) {