Cleaning
This commit is contained in:
@@ -57,14 +57,18 @@
|
||||
<div id="name1" class="swimmer-name" style="display: none"></div>
|
||||
<h2>🏊♀️ Bahn 1</h2>
|
||||
<div id="time1" class="time-display">00.00</div>
|
||||
<div id="status1" class="status standby">Standby: Bitte beide 1x betätigen</div>
|
||||
<div id="status1" class="status standby">
|
||||
Standby: Bitte beide 1x betätigen
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lane">
|
||||
<div id="name2" class="swimmer-name" style="display: none"></div>
|
||||
<h2>🏊♂️ Bahn 2</h2>
|
||||
<div id="time2" class="time-display">00.00</div>
|
||||
<div id="status2" class="status standby">Standby: Bitte beide 1x betätigen</div>
|
||||
<div id="status2" class="status standby">
|
||||
Standby: Bitte beide 1x betätigen
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -332,41 +336,41 @@
|
||||
}
|
||||
|
||||
document.getElementById("time1").textContent = formatTime(display1);
|
||||
|
||||
|
||||
// Status für Bahn 1
|
||||
const s1 = document.getElementById("status1");
|
||||
const lane1Connected = areBothButtonsConnected(1);
|
||||
|
||||
|
||||
if (status1 === "ready" && !lane1Connected) {
|
||||
s1.className = "status standby";
|
||||
s1.textContent = "Standby: Bitte beide 1x betätigen";
|
||||
s1.textContent = "Standby: Bitte beide Buttons 1x betätigen";
|
||||
} else {
|
||||
s1.className = `status ${status1}`;
|
||||
s1.textContent =
|
||||
status1 === "ready"
|
||||
? "Bereit"
|
||||
: status1 === "running"
|
||||
? "Läuft..."
|
||||
: "Beendet";
|
||||
? "Läuft..."
|
||||
: "Beendet";
|
||||
}
|
||||
|
||||
document.getElementById("time2").textContent = formatTime(display2);
|
||||
|
||||
|
||||
// Status für Bahn 2
|
||||
const s2 = document.getElementById("status2");
|
||||
const lane2Connected = areBothButtonsConnected(2);
|
||||
|
||||
|
||||
if (status2 === "ready" && !lane2Connected) {
|
||||
s2.className = "status standby";
|
||||
s2.textContent = "Standby: Bitte beide 1x betätigen";
|
||||
s2.textContent = "Standby: Bitte beide Buttons 1x betätigen";
|
||||
} else {
|
||||
s2.className = `status ${status2}`;
|
||||
s2.textContent =
|
||||
status2 === "ready"
|
||||
? "Bereit"
|
||||
: status2 === "running"
|
||||
? "Läuft..."
|
||||
: "Beendet";
|
||||
? "Läuft..."
|
||||
: "Beendet";
|
||||
}
|
||||
|
||||
document.getElementById("best1").textContent =
|
||||
@@ -419,7 +423,7 @@
|
||||
updateDisplay();
|
||||
})
|
||||
.catch((error) =>
|
||||
console.error("Fehler beim Laden der Daten:", error),
|
||||
console.error("Fehler beim Laden der Daten:", error)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -448,4 +452,4 @@
|
||||
syncFromBackend();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user