summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/start.js13
-rw-r--r--frontend/start/index.html2
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>