feat:time to end of first shift is hidden
This commit is contained in:
@@ -97,6 +97,10 @@ H1 {
|
||||
color: #b9c8d6;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-block.break-current {
|
||||
border: 2px solid #d4a017;
|
||||
color: #d4a017;
|
||||
|
||||
+8
-3
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user