summaryrefslogtreecommitdiff
path: root/frontend/start.js
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-12-03 17:48:33 +0700
committeraltaf-creator <dev@altafcreator.com>2025-12-03 17:48:33 +0700
commit84ef4a0d051d180724ebc38b474aa2a355427607 (patch)
treea6518b72f52c9a6d19f0d4bbcd8614155d419030 /frontend/start.js
parent761cd8abbdc72836be61d327adb0c31a887d6d0b (diff)
frontend changes, feedback, credits, new status page
Diffstat (limited to 'frontend/start.js')
-rw-r--r--frontend/start.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/start.js b/frontend/start.js
index 1bf7571..028e861 100644
--- a/frontend/start.js
+++ b/frontend/start.js
@@ -29,3 +29,19 @@ async function requestPermission() {
startbtn.disabled = false;
}
}
+
+(async () => {
+ const timers = await fetchTimers();
+
+ const existingPanel = document.getElementById("existing-laundry-panel");
+ const existingText = document.getElementById("existing-laundry-text");
+
+ if (timers.length > 0) {
+ existingPanel.style.display = 'inherit';
+ if (timers.length == 1) {
+ existingText.innerText = "You currently have another ongoing laundry. You are creating a new timer.";
+ } else {
+ existingText.innerText = "You currently have other ongoing laundries. You are creating a new timer.";
+ }
+ }
+})();