summaryrefslogtreecommitdiff
path: root/frontend/start.js
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-12-03 18:37:00 +0700
committeraltaf-creator <dev@altafcreator.com>2025-12-03 18:37:00 +0700
commite22dadf8a838ef92e5d5fb81e84b5f811f74eaab (patch)
tree99e5683f8f61fdf5d93f4311f4b767bdb0f4b856 /frontend/start.js
parent2e76f7ef291d5a70286f7b53208c607acb956023 (diff)
machine view actually shows correct machine in frontend/start/
Diffstat (limited to 'frontend/start.js')
-rw-r--r--frontend/start.js13
1 files changed, 13 insertions, 0 deletions
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");
})();