mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 06:29:07 +00:00
Refactor: split runtime state (#1725)
* refactor: runtime types * refactor: runtimeState functions to use the split type * refactor: RuntimeService to use the new split data * refactor: use the split data in the UI * update comments * refactor: rename runtime to offset * fix utils test
This commit is contained in:
committed by
Carlos Valente
parent
ed93cf313a
commit
048a9c96ea
@@ -17,9 +17,13 @@ interface StudioTimersProps {
|
||||
|
||||
export default function StudioTimers({ viewSettings }: StudioTimersProps) {
|
||||
const { getLocalizedString } = useTranslation();
|
||||
const { eventNow, eventNext, message, time, runtime } = useStudioTimersSocket();
|
||||
const { eventNow, eventNext, message, time, offset, rundown } = useStudioTimersSocket();
|
||||
|
||||
const schedule = getFormattedScheduleTimes(runtime);
|
||||
const schedule = getFormattedScheduleTimes({
|
||||
offset: offset.absolute,
|
||||
actualStart: rundown.actualStart,
|
||||
expectedEnd: offset.expectedRundownEnd,
|
||||
});
|
||||
const event = getFormattedEventData(eventNow, time);
|
||||
const eventNextTitle = eventNext?.title || '-';
|
||||
const formattedTimerMessage = (message.timer.visible && message.timer.text) || '-';
|
||||
@@ -33,7 +37,7 @@ export default function StudioTimers({ viewSettings }: StudioTimersProps) {
|
||||
time.phase === TimerPhase.Danger,
|
||||
);
|
||||
|
||||
const offsetState = getOffsetState(runtime.offsetAbs);
|
||||
const offsetState = getOffsetState(offset.absolute);
|
||||
|
||||
return (
|
||||
<div className='studio__timers'>
|
||||
|
||||
Reference in New Issue
Block a user