feat:time to end of first shift is hidden

This commit is contained in:
2026-08-09 18:11:36 +03:00
parent bc88882ec4
commit 37d0b33ea9
2 changed files with 12 additions and 3 deletions
+4
View File
@@ -97,6 +97,10 @@ H1 {
color: #b9c8d6;
}
.hidden {
display: none;
}
.time-block.break-current {
border: 2px solid #d4a017;
color: #d4a017;
+8 -3
View File
@@ -281,9 +281,14 @@ function updateNextBreak() {
const shift1Ms = getShift1EndMs(now);
const timeUntilShift1End = Math.max(0, shift1Ms - now.getTime());
shift1EndEl.textContent =
"До конца смены 1 (" + getShift1EndForToday(now) + ") · " +
formatDuration(timeUntilShift1End);
if (timeUntilShift1End === 0) {
shift1EndEl.classList.add("hidden");
} else {
shift1EndEl.classList.remove("hidden");
shift1EndEl.textContent =
"До конца смены 1 (" + getShift1EndForToday(now) + ") · " +
formatDuration(timeUntilShift1End);
}
scheduleNextBreakTick();
}