mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 16:03:52 +00:00
077748e5a4
The timer view lets operators show an aux timer or the secondary message
as a smaller secondary timer under the main event timer. This adds a
placement control so that selected source can be promoted into the main
slot, swapping positions with the event timer.
The swap is deliberate: the event timer is demoted to the secondary slot
rather than removed, so the show-critical countdown (and its phase colour)
is never lost from screen.
- add `SecondaryPlacement` ('below' | 'main') to the timer message, with
server validation and a store default
- expose the aux timer direction to the timer view and honour it when
formatting a promoted aux (previously hard-coded to count-down)
- add a `getTimerSlots` helper that assigns the event timer and secondary
content to the main/secondary slots, routing phase colour, paused/finished
styling and font sizing to whichever slot holds the event timer
- add a Placement radio control to the timer view panel (disabled until a
secondary source is active) and reflect the swap in the control preview
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MbgWVAXTJUX7E5pAmv6Rs7
59 lines
1017 B
SCSS
59 lines
1017 B
SCSS
.preview {
|
|
background-color: $ui-black;
|
|
display: grid;
|
|
place-content: center;
|
|
text-align: center;
|
|
position: relative;
|
|
}
|
|
|
|
.mainContent {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
width: 100%;
|
|
color: var(--override-colour, $ui-white);
|
|
|
|
&[data-phase='pending'] {
|
|
color: $ontime-roll;
|
|
}
|
|
&[data-phase='overtime'] {
|
|
color: $playback-negative;
|
|
}
|
|
&[data-phase='none'] {
|
|
opacity: $opacity-disabled;
|
|
}
|
|
}
|
|
|
|
.secondaryContent {
|
|
border-top: 1px solid $white-7;
|
|
// when the event timer is demoted here (secondary swapped to main) it keeps its colour treatment
|
|
color: var(--override-colour, inherit);
|
|
|
|
&[data-phase='pending'] {
|
|
color: $ontime-roll;
|
|
}
|
|
&[data-phase='overtime'] {
|
|
color: $playback-negative;
|
|
}
|
|
}
|
|
|
|
.blackout {
|
|
display: none;
|
|
}
|
|
|
|
.eventStatus {
|
|
position: absolute;
|
|
left: 0;
|
|
margin: 0.5rem 0.25rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.statusIcon {
|
|
color: $gray-1000;
|
|
|
|
&[data-active='true'] {
|
|
color: $active-indicator;
|
|
}
|
|
}
|