From e22dadf8a838ef92e5d5fb81e84b5f811f74eaab Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Wed, 3 Dec 2025 18:37:00 +0700 Subject: machine view actually shows correct machine in frontend/start/ --- frontend/start.js | 13 +++++++++++++ frontend/start/index.html | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'frontend') diff --git a/frontend/start.js b/frontend/start.js index 50a3485..07b4643 100644 --- a/frontend/start.js +++ b/frontend/start.js @@ -46,4 +46,17 @@ async function requestPermission() { existingText.innerText = "You currently have other ongoing laundries. You are creating a new timer."; } } + + const info = await information(); + + const machine = info["machine"]; + + const divs = [ + document.getElementById("dryer1"), + document.getElementById("washer1"), + document.getElementById("dryer2"), + document.getElementById("washer2"), + ] + + divs[machine - 1].classList.add("machine-selected"); })(); diff --git a/frontend/start/index.html b/frontend/start/index.html index 10b9dc3..803aab0 100644 --- a/frontend/start/index.html +++ b/frontend/start/index.html @@ -46,7 +46,7 @@ -
+
Washer 1 -- cgit v1.2.3