mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
inti relative mode
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
AutomationSettings,
|
||||
CustomFields,
|
||||
OffsetMode,
|
||||
OntimeRundown,
|
||||
ProjectData,
|
||||
Settings,
|
||||
@@ -16,4 +17,5 @@ export type DatabaseModel = {
|
||||
urlPresets: URLPreset[];
|
||||
customFields: CustomFields;
|
||||
automation: AutomationSettings;
|
||||
offsetMode: OffsetMode;
|
||||
};
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import type { MaybeNumber } from '../../utils/utils.type.js';
|
||||
|
||||
export enum OffsetMode {
|
||||
Absolute = 'absolute',
|
||||
Relative = 'relative',
|
||||
}
|
||||
|
||||
export type Runtime = {
|
||||
numEvents: number;
|
||||
selectedEventIndex: MaybeNumber;
|
||||
offset: number;
|
||||
relativeOffset: number;
|
||||
plannedStart: MaybeNumber;
|
||||
actualStart: MaybeNumber;
|
||||
plannedEnd: MaybeNumber;
|
||||
expectedEnd: MaybeNumber;
|
||||
offsetMode: OffsetMode; // TODO: get proper names
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { SimpleDirection, SimplePlayback } from './AuxTimer.type.js';
|
||||
import { Playback } from './Playback.type.js';
|
||||
import { OffsetMode } from './Runtime.type.js';
|
||||
import type { RuntimeStore } from './RuntimeStore.type.js';
|
||||
import { TimerPhase } from './TimerState.type.js';
|
||||
|
||||
@@ -32,10 +33,12 @@ export const runtimeStorePlaceholder: RuntimeStore = {
|
||||
selectedEventIndex: null, // changes if rundown changes or we load a new event
|
||||
numEvents: 0, // change initiated by user
|
||||
offset: 0, // changes at runtime
|
||||
relativeOffset: 0, // changes at runtime
|
||||
plannedStart: 0, // only changes if event changes
|
||||
plannedEnd: 0, // only changes if event changes, overflows over dayInMs
|
||||
actualStart: null, // set once we start the timer
|
||||
expectedEnd: null, // changes with runtime, based on offset, overflows over dayInMs
|
||||
offsetMode: OffsetMode.Absolute,
|
||||
},
|
||||
currentBlock: {
|
||||
block: null,
|
||||
|
||||
@@ -87,6 +87,7 @@ export { TimerLifeCycle, timerLifecycleValues } from './definitions/core/TimerLi
|
||||
export type { TimerMessage, MessageState, SecondarySource } from './definitions/runtime/MessageControl.type.js';
|
||||
|
||||
export type { Runtime } from './definitions/runtime/Runtime.type.js';
|
||||
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';
|
||||
|
||||
Reference in New Issue
Block a user