summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-12-02 18:22:27 +0700
committeraltaf-creator <dev@altafcreator.com>2025-12-02 18:22:27 +0700
commitc5d2d59d8288daf99d452642674efaf071995a08 (patch)
treec29e702a8dfcaa04ad7311b71f87a2b1ffd9178f /frontend
parent3ac24a5a5f1f06193ef8377ec1619cb477996d4c (diff)
this bettwer work
Diffstat (limited to 'frontend')
-rw-r--r--frontend/main.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/frontend/main.js b/frontend/main.js
index 4a62ec2..0319aaa 100644
--- a/frontend/main.js
+++ b/frontend/main.js
@@ -139,7 +139,7 @@ async function updateMachines() {
}
const now = Date.now();
const end = Date.parse(status[2][i]);
- machine_txts[i].innerHTML = Math.ceil((end - now) / 60000000).toString() + " min(s) left";
+ machine_txts[i].innerHTML = Math.ceil((end - now) / 60000).toString() + " min(s) left";
} else if (status[0][i] == "FINISHED") {
if ((i + 1) % 2 == 0) {
machine_imgs[i].src = "/assets/img/washer_clothes.png";
@@ -242,8 +242,7 @@ async function startLoadTimers() {
const prog = document.getElementById(progList[i]);
const totalTime = endTimestamps - startTimestamps;
- console.log(totalTime);
- prog.style.width = ((timeRemaining / (totalTime / 60000)) * 100).toString() + "%";
+ prog.style.width = ((minutes / (totalTime / 60000)) * 100).toString() + "%";
if (timeRemaining <= 0) {
document.getElementById(`timer-btn-${i}`).disabled = false;