diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-12-03 18:37:00 +0700 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-12-03 18:37:00 +0700 |
| commit | e22dadf8a838ef92e5d5fb81e84b5f811f74eaab (patch) | |
| tree | 99e5683f8f61fdf5d93f4311f4b767bdb0f4b856 /frontend | |
| parent | 2e76f7ef291d5a70286f7b53208c607acb956023 (diff) | |
machine view actually shows correct machine in frontend/start/
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/start.js | 13 | ||||
| -rw-r--r-- | frontend/start/index.html | 2 |
2 files changed, 14 insertions, 1 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"); })(); 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 @@ <img src="/assets/img/dryer_off.png" alt="" id="dryer1-img"> <span id="dryer1-span"></span> </div> - <div class="txtcol-washer machine-selected" id="washer1"> + <div class="txtcol-washer" id="washer1"> <span>Washer 1</span> <img src="/assets/img/washer_off.png" alt="" id="washer1-img"> <span id="washer1-span"></span> |
