mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
adding block now/next data (#1661)
* adding block now/next data * add to ui * add blockNext * indicate in UI * fix test * restore block start at value * one loop * stricter null comparison * test fails * dev throw if id cant be found * fix spelling * revert client stuff * rename * add comment
This commit is contained in:
committed by
GitHub
parent
6711cdaf4f
commit
063ae69409
@@ -1,7 +1,7 @@
|
||||
import type { MaybeNumber } from '../../utils/utils.type.js';
|
||||
import type { OntimeBlock } from '../core/OntimeEvent.type.js';
|
||||
import type { EntryId } from '../core/OntimeEvent.type.js';
|
||||
|
||||
export type CurrentBlockState = {
|
||||
block: OntimeBlock | null;
|
||||
export type BlockState = {
|
||||
id: EntryId;
|
||||
startedAt: MaybeNumber;
|
||||
};
|
||||
|
||||
@@ -40,10 +40,8 @@ export const runtimeStorePlaceholder: Readonly<RuntimeStore> = {
|
||||
expectedEnd: null, // changes with runtime, based on offset, overflows over dayInMs
|
||||
offsetMode: OffsetMode.Absolute,
|
||||
},
|
||||
currentBlock: {
|
||||
block: null,
|
||||
startedAt: null,
|
||||
},
|
||||
blockNow: null,
|
||||
blockNext: null,
|
||||
eventNow: null,
|
||||
eventNext: null,
|
||||
auxtimer1: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { OntimeEvent } from '../core/OntimeEvent.type.js';
|
||||
import type { SimpleTimerState } from './AuxTimer.type.js';
|
||||
import type { CurrentBlockState } from './CurrentBlockState.type.js';
|
||||
import type { BlockState } from './CurrentBlockState.type.js';
|
||||
import type { MessageState } from './MessageControl.type.js';
|
||||
import type { Runtime } from './Runtime.type.js';
|
||||
import type { TimerState } from './TimerState.type.js';
|
||||
@@ -16,9 +16,11 @@ export type RuntimeStore = {
|
||||
|
||||
// rundown data
|
||||
runtime: Runtime;
|
||||
currentBlock: CurrentBlockState;
|
||||
eventNow: OntimeEvent | null;
|
||||
eventNext: OntimeEvent | null;
|
||||
|
||||
blockNow: BlockState | null;
|
||||
blockNext: BlockState | null;
|
||||
|
||||
// extra timers
|
||||
auxtimer1: SimpleTimerState;
|
||||
|
||||
@@ -101,7 +101,7 @@ export { OffsetMode } from './definitions/runtime/Runtime.type.js';
|
||||
export type { RuntimeStore } from './definitions/runtime/RuntimeStore.type.js';
|
||||
export { runtimeStorePlaceholder } from './definitions/runtime/RuntimeStore.js';
|
||||
export { type TimerState, TimerPhase } from './definitions/runtime/TimerState.type.js';
|
||||
export type { CurrentBlockState } from './definitions/runtime/CurrentBlockState.type.js';
|
||||
export type { BlockState } from './definitions/runtime/CurrentBlockState.type.js';
|
||||
|
||||
// ---> Extra Timer
|
||||
export { type SimpleTimerState, SimplePlayback, SimpleDirection } from './definitions/runtime/AuxTimer.type.js';
|
||||
|
||||
Reference in New Issue
Block a user