Skip to content

Commit 94886de

Browse files
committed
feat: count label - time to planned start
1 parent d489a93 commit 94886de

File tree

3 files changed

+81
-22
lines changed

3 files changed

+81
-22
lines changed

packages/webui/src/client/styles/countdown/director.scss

Lines changed: 69 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ $hold-status-color: $liveline-timecode-color;
3939
text-align: left;
4040
}
4141

42+
.director-screen__top__time-to {
43+
text-align: center;
44+
}
45+
4246
.director-screen__top__planned-to {
43-
text-align: left;
47+
text-align: center;
4448
}
4549
.director-screen__top__planned-since {
4650
margin-left: -50px;
@@ -93,22 +97,6 @@ $hold-status-color: $liveline-timecode-color;
9397

9498
color: #ffffff;
9599

96-
// Default Roboto Flex settings:
97-
font-variation-settings:
98-
'GRAD' 0,
99-
'XOPQ' 96,
100-
'XTRA' 468,
101-
'YOPQ' 79,
102-
'YTAS' 750,
103-
'YTDE' -203,
104-
'YTFI' 738,
105-
'YTLC' 548,
106-
'YTUC' 712,
107-
'opsz' 100,
108-
'slnt' 0,
109-
'wdth' 100,
110-
'wght' 550;
111-
112100
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
113101
box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.3);
114102
z-index: 1;
@@ -214,6 +202,70 @@ $hold-status-color: $liveline-timecode-color;
214202
}
215203
}
216204

205+
.director-screen__body__part__timeto-content {
206+
grid-row: 2;
207+
grid-column: 2;
208+
text-align: center;
209+
width: 100vw;
210+
margin-left: -13vw;
211+
212+
.director-screen__body__part__timeto-name {
213+
color: #888;
214+
font-size: 9.63em;
215+
text-transform: uppercase;
216+
margin-top: -2vh;
217+
}
218+
219+
.director-screen__body__part__timeto-countdown {
220+
margin-top: 4vh;
221+
grid-row: inherit;
222+
text-align: center;
223+
justify-content: center;
224+
font-size: 60em;
225+
color: $general-countdown-to-next-color;
226+
font-feature-settings:
227+
'liga' off,
228+
'tnum' on;
229+
letter-spacing: 0.01em;
230+
font-variation-settings:
231+
'GRAD' 0,
232+
'XOPQ' 96,
233+
'XTRA' 468,
234+
'YOPQ' 79,
235+
'YTAS' 750,
236+
'YTDE' -203,
237+
'YTFI' 738,
238+
'YTLC' 514,
239+
'YTUC' 712,
240+
'opsz' 120,
241+
'slnt' 0,
242+
'wdth' 70,
243+
'wght' 500;
244+
padding: 0 0.1em;
245+
line-height: 1em;
246+
display: flex;
247+
align-items: center;
248+
249+
> .overtime {
250+
color: $general-late-color;
251+
font-variation-settings:
252+
'GRAD' 0,
253+
'XOPQ' 96,
254+
'XTRA' 468,
255+
'YOPQ' 79,
256+
'YTAS' 750,
257+
'YTDE' -203,
258+
'YTFI' 738,
259+
'YTLC' 548,
260+
'YTUC' 712,
261+
'opsz' 100,
262+
'slnt' 0,
263+
'wdth' 70,
264+
'wght' 600;
265+
}
266+
}
267+
}
268+
217269
.director-screen__body__part__piece-content {
218270
grid-row: 2;
219271
grid-column: 2;

packages/webui/src/client/styles/counterComponents.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@
105105
.counter-component__time-to-planned-end {
106106
color: $general-countdown-to-next-color;
107107
letter-spacing: 0%;
108-
text-align: right;
109-
margin-left: 1.2vw;
110108

111109
letter-spacing: 0.01em;
112110
font-variation-settings:

packages/webui/src/client/ui/ClockView/DirectorScreen.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@ function DirectorScreenRender({
367367

368368
const overUnderClock = getPlaylistTimingDiff(playlist, timingDurations) ?? 0
369369

370+
const currentSegmentIsFirst = currentSegment?._rank === 0
371+
const firstPieceNoDuration =
372+
(currentSegmentIsFirst && currentPartInstance?.instance.part.untimed) ||
373+
(currentSegment === undefined && nextPartInstance?.instance.part.untimed)
374+
370375
return (
371376
<div className="director-screen">
372377
<div className="director-screen__top">
@@ -379,7 +384,7 @@ function DirectorScreenRender({
379384
</div>
380385
) : null}
381386
{expectedEnd ? (
382-
<div>
387+
<div className="director-screen__top__time-to">
383388
<div>
384389
<TimeToPlannedEndComponent value={now - expectedEnd} />
385390
</div>
@@ -486,8 +491,12 @@ function DirectorScreenRender({
486491
</div>
487492
</>
488493
) : expectedStart ? (
489-
<div className="director-screen__body__rundown-countdown">
490-
<Timediff time={expectedStart - getCurrentTime()} />
494+
<div className="director-screen__body__part__timeto-content">
495+
<div className="director-screen__body__part__timeto-countdown">
496+
{/* <Timediff time={expectedStart - getCurrentTime()} /> */}
497+
<Timediff time={100000} />
498+
</div>
499+
<div className="director-screen__body__part__timeto-name">Time to planned start</div>
491500
</div>
492501
) : null}
493502
</div>

0 commit comments

Comments
 (0)