mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 12:53:32 +00:00
feat: time to next flag
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import type { MaybeNumber } from '../../utils/utils.type.js';
|
||||
import type { EntryId } from '../core/OntimeEntry.js';
|
||||
|
||||
export type BlockState = {
|
||||
export type CurrentBlockState = {
|
||||
id: EntryId;
|
||||
startedAt: MaybeNumber;
|
||||
expectedEnd: MaybeNumber;
|
||||
};
|
||||
|
||||
export type UpcomingEntry = {
|
||||
id: EntryId;
|
||||
start: number;
|
||||
};
|
||||
|
||||
@@ -6,8 +6,8 @@ export enum OffsetMode {
|
||||
}
|
||||
|
||||
export type Runtime = {
|
||||
numEvents: number;
|
||||
selectedEventIndex: MaybeNumber;
|
||||
numEvents: number;
|
||||
offset: number;
|
||||
relativeOffset: number;
|
||||
plannedStart: MaybeNumber;
|
||||
|
||||
@@ -42,6 +42,7 @@ export const runtimeStorePlaceholder: Readonly<RuntimeStore> = {
|
||||
},
|
||||
blockNow: null,
|
||||
blockNext: null,
|
||||
nextFlag: null,
|
||||
eventNow: null,
|
||||
eventNext: null,
|
||||
auxtimer1: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { MaybeString } from '../../utils/utils.type.js';
|
||||
import type { OntimeEvent } from '../core/OntimeEntry.js';
|
||||
import type { SimpleTimerState } from './AuxTimer.type.js';
|
||||
import type { BlockState } from './CurrentBlockState.type.js';
|
||||
import type { CurrentBlockState, UpcomingEntry } 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';
|
||||
@@ -20,8 +20,9 @@ export type RuntimeStore = {
|
||||
eventNow: OntimeEvent | null;
|
||||
eventNext: OntimeEvent | null;
|
||||
|
||||
blockNow: BlockState | null;
|
||||
blockNow: CurrentBlockState | null;
|
||||
blockNext: MaybeString;
|
||||
nextFlag: UpcomingEntry | null;
|
||||
|
||||
// extra timers
|
||||
auxtimer1: SimpleTimerState;
|
||||
|
||||
@@ -100,7 +100,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 { BlockState } from './definitions/runtime/CurrentBlockState.type.js';
|
||||
export type { CurrentBlockState, UpcomingEntry } 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