summaryrefslogtreecommitdiff
path: root/frontend/start.js
diff options
context:
space:
mode:
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.";
+ }
+ }
+})();