v2 styling (#263)

* feat: implement progress bar on running event

* refactor: use event action hook

* refactor: align backend data

* style: v2 style tweaks

* style: v2 style tweaks + ts <Info>

* fix: fix delay increment calls

* style: v2 style tweaks + ts <Playback>

* style: v2 style tweaks + ts <EventEditor>

* style: v2 style tweaks + ts <MessageControl>

* fix: naming issue with message control socket endpoint

* chore: upgrade style dependencies

* style: v2 style tweaks + ts <MenuBar>

* style: v2 style tweaks + ts <RundownMenu>

* style: v2 style tweaks + ts <Playback>

* fix: add selected and next information to EventTimer

* style: v2 style tweaks + ts <EventBlock>

* style: v2 style tweaks + ts <DelayBlock>

* style: v2 style tweaks + ts <BlockBlock>

* style: v2 style tweaks + ts <QuickEntry>

* refactor: extract <TextInput> logic

* chore: upgrade build dependencies

* chore: folder structure refactor

* fix: issue with dependency path in electron

* chore: update version in demo db
This commit is contained in:
Carlos Valente
2022-11-27 14:56:09 +01:00
committed by GitHub
parent 3626b5b357
commit d486d78594
104 changed files with 3027 additions and 3217 deletions
+1 -1
View File
@@ -116,7 +116,7 @@
},
"settings": {
"app": "ontime",
"version": 1,
"version": 2,
"serverPort": 4001,
"lock": null,
"pinCode": "1234"
+5 -1
View File
@@ -30,7 +30,11 @@ let isQuitting = false;
(async () => {
try {
const dbLoader = await import('./src/modules/loadDb.js');
const loadDepPath = isProduction
? path.join('file://', __dirname, '../', 'extraResources', 'src/modules/loadDb.js')
: path.join('file://', __dirname, 'src/modules/loadDb.js');
const dbLoader = await import(loadDepPath);
await dbLoader.promise;
const { startServer, startOSCServer } = await import(nodePath);
@@ -76,7 +76,7 @@ export class EventLoader {
/**
* loads an event given its id
* @param {string} eventId
* @returns {{loadedEvent: null, selectedEventId: null, nextEventId: null, loadedEventId: *, selectedPublicEventId: null, nextPublicEventId: null, numEvents: null, titles: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null, noteNow: null, noteNext: null}, titlesPublic: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null}, selectedEventIndex: null}}
* @returns {{loadedEvent: null, selectedEventId: null, nextEventId: null, selectedPublicEventId: null, nextPublicEventId: null, numEvents: null, titles: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null, noteNow: null, noteNext: null}, titlesPublic: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null}, selectedEventIndex: null}}
*/
loadById(eventId) {
const event = EventLoader.getEventWithId(eventId);
@@ -86,7 +86,7 @@ export class EventLoader {
/**
* loads an event given its index
* @param {number} eventIndex
* @returns {{loadedEvent: null, selectedEventId: null, nextEventId: null, loadedEventId: *, selectedPublicEventId: null, nextPublicEventId: null, numEvents: null, titles: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null, noteNow: null, noteNext: null}, titlesPublic: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null}, selectedEventIndex: null}}
* @returns {{loadedEvent: null, selectedEventId: null, nextEventId: null, selectedPublicEventId: null, nextPublicEventId: null, numEvents: null, titles: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null, noteNow: null, noteNext: null}, titlesPublic: {presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null}, selectedEventIndex: null}}
*/
loadByIndex(eventIndex) {
const event = EventLoader.getEventAtIndex(eventIndex);
@@ -143,12 +143,11 @@ export class EventLoader {
/**
* returns data for currently loaded event
* @returns {{loadedEvent: null, selectedEventId: (null|*), nextEventId: (null|*), loadedEventId, selectedPublicEventId: (null|*), nextPublicEventId: (null|*), numEvents: (null|number|*), titles: (*|{presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null, noteNow: null, noteNext: null}), titlesPublic: (*|{presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null}), selectedEventIndex: (null|number|*)}}
* @returns {{loadedEvent: null, selectedEventId: (null|*), nextEventId: (null|*), selectedPublicEventId: (null|*), nextPublicEventId: (null|*), numEvents: (null|number|*), titles: (*|{presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null, noteNow: null, noteNext: null}), titlesPublic: (*|{presenterNext: null, titleNow: null, subtitleNow: null, titleNext: null, subtitleNext: null, presenterNow: null}), selectedEventIndex: (null|number|*)}}
*/
getLoaded() {
return {
loadedEvent: this.loadedEvent,
loadedEventId: this.loadedEventId,
selectedEventIndex: this.selectedEventIndex,
selectedEventId: this.selectedEventId,
selectedPublicEventId: this.selectedPublicEventId,
@@ -203,8 +202,9 @@ export class EventLoader {
// we know some stuff now
this.loadedEvent = event;
this.selectedEventIndex = eventIndex;
this.loadedEventId = event.id;
this.selectedEventId = event.id;
this.numEvents = timedEvents.length;
// this.nextEventId = playableEvents[eventIndex + 1].id;
this._loadTitlesNow(event, playableEvents);
this._loadTitlesNext(playableEvents);
@@ -284,7 +284,7 @@ class SocketController {
/* MOLECULAR ENDPOINTS
* =====================
* 1. EVENT LIST
* 1. RUNDOWN
* 2. MESSAGE CONTROL
* 3. PLAYBACK CONTROL
* 4. INFO
@@ -292,29 +292,29 @@ class SocketController {
* 6. TIMER OBJECT
* */
// 1. EVENT LIST
socket.on('get-ontime-feat-rundown', () => {
// 1. RUNDOWN
socket.on('get-feat-rundown', () => {
global.timer._broadcastFeatureRundown();
});
// 2. MESSAGE CONTROL
socket.on('get-ontime-feat-messagecontrol', () => {
socket.on('get-feat-messagecontrol', () => {
const featureData = messageManager.getAll();
this.socket.emit(ADDRESS_MESSAGE_CONTROL, featureData);
});
// 3. PLAYBACK CONTROL
socket.on('get-ontime-feat-playbackcontrol', () => {
socket.on('get-feat-playbackcontrol', () => {
global.timer._broadcastFeaturePlaybackControl();
});
// 4. INFO
socket.on('get-ontime-feat-info', () => {
socket.on('get-feat-info', () => {
global.timer._broadcastFeatureInfo();
});
// 5. CUE SHEET
socket.on('get-ontime-feat-cuesheet', () => {
socket.on('get-feat-cuesheet', () => {
global.timer._broadcastFeatureCuesheet();
});
+1 -1
View File
@@ -1 +1 @@
export const ADDRESS_MESSAGE_CONTROL = 'ontime-feat-messagecontrol';
export const ADDRESS_MESSAGE_CONTROL = 'feat-messagecontrol';
+5 -2
View File
@@ -426,7 +426,8 @@ export class EventTimer extends Timer {
return;
}
const { loadedEvent, loadedEventIndex, loadedEventId, titles, titlesPublic } = loadedData;
const { loadedEvent, loadedEventIndex, selectedEventId, nextEventId, titles, titlesPublic } =
loadedData;
const start = loadedEvent.timeStart || 0;
let end = loadedEvent.timeEnd || 0;
@@ -438,7 +439,9 @@ export class EventTimer extends Timer {
this.duration = end - start;
this.selectedEventIndex = loadedEventIndex;
this.selectedEventId = loadedEventId;
this.selectedEventId = selectedEventId;
this.nextEventId = nextEventId;
if (type === 'load') {
this._resetTimers();
this.current = this.duration;