From f49bc5a9e648bb8164108475b3b1ae93eb0e7488 Mon Sep 17 00:00:00 2001 From: Rune Harlyk Date: Mon, 5 Feb 2024 21:02:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=AB=20Adds=20stop=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/components/Topbar.svelte | 10 ++++++++-- mock/server.js | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/components/Topbar.svelte b/app/src/components/Topbar.svelte index 6549402..232f46a 100644 --- a/app/src/components/Topbar.svelte +++ b/app/src/components/Topbar.svelte @@ -1,5 +1,5 @@ @@ -50,7 +56,7 @@
- +
diff --git a/mock/server.js b/mock/server.js index 26c30a8..d96d210 100644 --- a/mock/server.js +++ b/mock/server.js @@ -277,8 +277,9 @@ wss.on("connection", (ws) => { } break; case "system/stop": - model.running = false; - ws.send(JSON.stringify(settings)); + ws.clientState.model.running = false; + ws.clientState.logs.push("[2024-02-05 19:10:00] [Warning] STOPPING SERVOS") + ws.send(JSON.stringify({type:"log", log:ws.clientState.logs.last()})); break; default: ws.send(JSON.stringify({ error: "Unknown request type" }));