From 3e2dd95c0e272f86228ce968ee9502858d748beb Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Tue, 16 Aug 2022 00:54:14 +0200 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D0=B2=20=D0=B2?= =?UTF-8?q?=D0=B5=D0=B1=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9?= =?UTF-8?q?=D1=81=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.svelte | 9 +++------ src/widgets/Input.svelte | 10 ++++------ src/widgets/Toggle.svelte | 22 +++++++++------------- 3 files changed, 16 insertions(+), 25 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index af5d8b1..b8d1228 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -511,12 +511,7 @@ topic = topic.substring(topic.lastIndexOf("/") + 1, topic.length); if (key === topic) { console.log("[i]", "value " + topic + " updated"); - //if (devLayout[i].widget == "toggle") { - //if (value == "1") devLayout[i].status = 1; - //if (value == "0") devLayout[i].status = 0; - //} else { devLayout[i].status = value; - //} break; } } @@ -542,6 +537,8 @@ let topic = layoutJson[i].topic; if (topic === newStatusJson.topic) { layoutJson[i].status = newStatusJson.status; + //получен ответ - выключаем красный цвет + layoutJson[i].sent = false; break; } } @@ -1125,7 +1122,7 @@ wsPush(ws, topic, status)} /> -