diff --git a/code/espurna/light.cpp b/code/espurna/light.cpp index 8580a033..b9ac83ee 100644 --- a/code/espurna/light.cpp +++ b/code/espurna/light.cpp @@ -2338,7 +2338,7 @@ void _lightWebSocketStatus(JsonObject& root) { } void _lightWebSocketOnVisible(JsonObject& root) { - wsPayloadModule(root, "color"); + wsPayloadModule(root, "light"); } void _lightWebSocketOnConnected(JsonObject& root) { diff --git a/code/html/custom.css b/code/html/custom.css index 8f3dc6c0..89a6e092 100644 --- a/code/html/custom.css +++ b/code/html/custom.css @@ -173,17 +173,13 @@ label { /* removeIf(!curtain) */ -.curtain-div { - text-align: center; -} - .curtain-roller { width: 300px; height: 200px; display: inline-block; } -.curtain-button{ +.curtain-button { margin-left: 10px; margin-right: 10px; text-align: center; diff --git a/code/html/custom.js b/code/html/custom.js index 7f506782..003967be 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -1752,7 +1752,7 @@ function initMagnitudesList(data, callbacks) { function createMagnitudeInfo(id, magnitude) { const container = document.getElementById("magnitudes"); - const info = loadTemplate("magnitude-info-form"); + const info = loadTemplate("magnitude-info"); const label = info.querySelector("label"); label.textContent = magnitude.name; @@ -1997,9 +1997,6 @@ function initCurtain() { return; } - // simple position slider - document.getElementById("curtainSet").addEventListener("change", curtainSetHandler); - // add and init curtain template, prepare multi switches let line = loadConfigTemplate("curtain-control"); line.querySelector(".button-curtain-open").addEventListener("click", curtainButtonHandler); @@ -2007,6 +2004,9 @@ function initCurtain() { line.querySelector(".button-curtain-close").addEventListener("click", curtainButtonHandler); mergeTemplate(container, line); + // simple position slider + document.getElementById("curtainSet").addEventListener("change", curtainSetHandler); + addSimpleEnumerables("curtain", "Curtain", 1); } diff --git a/code/html/index.html b/code/html/index.html index 8751b8e6..e1796942 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -62,7 +62,7 @@ - + @@ -125,8 +125,8 @@ -