feat:time to end of first shift is hidden
This commit is contained in:
@@ -97,6 +97,10 @@ H1 {
|
|||||||
color: #b9c8d6;
|
color: #b9c8d6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.time-block.break-current {
|
.time-block.break-current {
|
||||||
border: 2px solid #d4a017;
|
border: 2px solid #d4a017;
|
||||||
color: #d4a017;
|
color: #d4a017;
|
||||||
|
|||||||
+8
-3
@@ -281,9 +281,14 @@ function updateNextBreak() {
|
|||||||
|
|
||||||
const shift1Ms = getShift1EndMs(now);
|
const shift1Ms = getShift1EndMs(now);
|
||||||
const timeUntilShift1End = Math.max(0, shift1Ms - now.getTime());
|
const timeUntilShift1End = Math.max(0, shift1Ms - now.getTime());
|
||||||
shift1EndEl.textContent =
|
if (timeUntilShift1End === 0) {
|
||||||
"До конца смены 1 (" + getShift1EndForToday(now) + ") · " +
|
shift1EndEl.classList.add("hidden");
|
||||||
formatDuration(timeUntilShift1End);
|
} else {
|
||||||
|
shift1EndEl.classList.remove("hidden");
|
||||||
|
shift1EndEl.textContent =
|
||||||
|
"До конца смены 1 (" + getShift1EndForToday(now) + ") · " +
|
||||||
|
formatDuration(timeUntilShift1End);
|
||||||
|
}
|
||||||
|
|
||||||
scheduleNextBreakTick();
|
scheduleNextBreakTick();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user