refactor: pass events instead of derived data to titles (#493)

* refactor: pass events instead of derived data to titles
This commit is contained in:
Carlos Valente
2023-09-14 22:30:23 +02:00
committed by GitHub
parent 13eca98133
commit 9708f0bfc6
17 changed files with 178 additions and 399 deletions
@@ -1,8 +1,8 @@
import { Playback } from './Playback.type.js';
import { Message, TimerMessage } from './MessageControl.type.js';
import { TimerState } from './TimerState.type.js';
import { TitleBlock } from './TitleBlock.type.js';
import { Loaded } from './Playlist.type.js';
import { OntimeEvent } from '../core/OntimeEvent.type.js';
export type RuntimeStore = {
// timer service
@@ -17,6 +17,8 @@ export type RuntimeStore = {
// event loader
loaded: Loaded;
titles: TitleBlock;
titlesPublic: TitleBlock;
eventNow: OntimeEvent | null;
publicEventNow: OntimeEvent | null;
eventNext: OntimeEvent | null;
publicEventNext: OntimeEvent | null;
};
@@ -1,10 +0,0 @@
export type TitleBlock = {
titleNow: string | null;
subtitleNow: string | null;
presenterNow: string | null;
noteNow: string | null;
titleNext: string | null;
subtitleNext: string | null;
presenterNext: string | null;
noteNext: string | null;
};
+1 -2
View File
@@ -5,8 +5,8 @@ export type { DatabaseModel } from './definitions/DataModel.type.js';
export { EndAction } from './definitions/EndAction.type.js';
export {
type OntimeBaseEvent,
type OntimeBlock,
type OntimeDelay,
type OntimeBlock,
type OntimeEvent,
SupportedEvent,
} from './definitions/core/OntimeEvent.type.js';
@@ -42,7 +42,6 @@ export type { Message, TimerMessage } from './definitions/runtime/MessageControl
export type { Loaded } from './definitions/runtime/Playlist.type.js';
export type { RuntimeStore } from './definitions/runtime/RuntimeStore.type.js';
export type { TimerState } from './definitions/runtime/TimerState.type.js';
export type { TitleBlock } from './definitions/runtime/TitleBlock.type.js';
// CLIENT