mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
feat: many timers (#706)
* wip: create simple timer class * refactor: service to manage extra timers * wip:ui for controlling the extra timer --------- Co-authored-by: arc-alex <ac@omnivox.dk>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export enum SimplePlayback {
|
||||
Start = 'start',
|
||||
Pause = 'pause',
|
||||
Stop = 'stop',
|
||||
}
|
||||
|
||||
export enum SimpleDirection {
|
||||
CountUp = 'count-up',
|
||||
CountDown = 'count-down',
|
||||
}
|
||||
|
||||
export type SimpleTimerState = {
|
||||
duration: number;
|
||||
current: number;
|
||||
playback: SimplePlayback;
|
||||
direction: SimpleDirection;
|
||||
};
|
||||
@@ -2,6 +2,7 @@ import { MessageState } from './MessageControl.type.js';
|
||||
import { TimerState } from './TimerState.type.js';
|
||||
import { Runtime } from './Runtime.type.js';
|
||||
import { OntimeEvent } from '../core/OntimeEvent.type.js';
|
||||
import { SimpleTimerState } from './ExtraTimer.type.js';
|
||||
|
||||
export type RuntimeStore = {
|
||||
// timer data
|
||||
@@ -18,4 +19,7 @@ export type RuntimeStore = {
|
||||
publicEventNow: OntimeEvent | null;
|
||||
eventNext: OntimeEvent | null;
|
||||
publicEventNext: OntimeEvent | null;
|
||||
|
||||
// extra timers
|
||||
timer1: SimpleTimerState;
|
||||
};
|
||||
|
||||
@@ -59,6 +59,9 @@ export type { Runtime } from './definitions/runtime/Runtime.type.js';
|
||||
export type { RuntimeStore } from './definitions/runtime/RuntimeStore.type.js';
|
||||
export type { TimerState } from './definitions/runtime/TimerState.type.js';
|
||||
|
||||
// ---> Extra Timer
|
||||
export { type SimpleTimerState, SimplePlayback, SimpleDirection } from './definitions/runtime/ExtraTimer.type.js';
|
||||
|
||||
// CLIENT
|
||||
|
||||
// TYPE UTILITIES
|
||||
|
||||
Reference in New Issue
Block a user