send data to component

- title data
- added note to title data
- add total events info into socket
This commit is contained in:
cv
2021-06-11 14:40:24 +02:00
parent 8221c72629
commit df44d3fcbc
3 changed files with 86 additions and 8 deletions
+13
View File
@@ -44,9 +44,11 @@ export class EventTimer extends Timer {
titleNow: null,
subtitleNow: null,
presenterNow: null,
noteNow: null,
titleNext: null,
subtitleNext: null,
presenterNext: null,
noteNext: null,
};
selectedEventIndex = null;
@@ -93,6 +95,7 @@ export class EventTimer extends Timer {
this.io.emit('selected', {
id: this.selectedEventId,
index: this.selectedEventIndex,
total: this.numEvents,
});
this.io.emit('selected-id', this.selectedEventId);
this.io.emit('next-id', this.nextEventId);
@@ -289,6 +292,7 @@ export class EventTimer extends Timer {
socket.emit('selected', {
id: this.selectedEventId,
index: this.selectedEventIndex,
total: this.numEvents,
});
});
@@ -588,6 +592,7 @@ export class EventTimer extends Timer {
this.titles.titleNow = e.title;
this.titles.subtitleNow = e.subtitle;
this.titles.presenterNow = e.presenter;
this.titles.noteNow = e.note;
this.selectedEventId = e.id;
break;
@@ -601,6 +606,7 @@ export class EventTimer extends Timer {
this.titles.titleNow = e.title;
this.titles.subtitleNow = e.subtitle;
this.titles.presenterNow = e.presenter;
this.titles.noteNow = e.note;
this.selectedEventId = e.id;
break;
@@ -616,6 +622,7 @@ export class EventTimer extends Timer {
this.titles.titleNext = e.title;
this.titles.subtitleNext = e.subtitle;
this.titles.presenterNext = e.presenter;
this.titles.noteNext = e.note;
this.nextEventId = e.id;
break;
case 'next-public':
@@ -628,6 +635,7 @@ export class EventTimer extends Timer {
this.titles.titleNext = e.title;
this.titles.subtitleNext = e.subtitle;
this.titles.presenterNext = e.presenter;
this.titles.noteNext = e.note;
this.nextEventId = e.id;
break;
@@ -644,6 +652,7 @@ export class EventTimer extends Timer {
this.titles.titleNext = null;
this.titles.subtitleNext = null;
this.titles.presenterNext = null;
this.titles.noteNext = null;
this.nextEventId = null;
this.titlesPublic.titleNext = null;
@@ -682,9 +691,11 @@ export class EventTimer extends Timer {
titleNow: null,
subtitleNow: null,
presenterNow: null,
noteNow: null,
titleNext: null,
subtitleNext: null,
presenterNext: null,
noteNext: null,
};
this.publicTitles = {
@@ -731,9 +742,11 @@ export class EventTimer extends Timer {
Title Now = ${this.titles.titleNow}
Subtitle Now = ${this.titles.subtitleNow}
Presenter Now = ${this.titles.presenterNow}
Note Now = ${this.titles.noteNow}
Title Next = ${this.titles.titleNext}
Subtitle Next = ${this.titles.subtitleNext}
Presenter Next = ${this.titles.presenterNext}
Note Next = ${this.titles.noteNext}
Public Titles
------------------------------