mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 08:23:55 +00:00
feat: event timer
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
const Timer = require('./Timer');
|
||||
|
||||
/*
|
||||
* EventTimer adds functions specific to APP
|
||||
* namely:
|
||||
* - Presenter message, text and status
|
||||
* - Public message, text and status
|
||||
*
|
||||
*/
|
||||
|
||||
class EventTimer extends Timer {
|
||||
presenter = {
|
||||
text: '',
|
||||
visible: false,
|
||||
};
|
||||
public = {
|
||||
text: '',
|
||||
visible: false,
|
||||
};
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
set presenterText(text) {
|
||||
this.presenter.text = text;
|
||||
}
|
||||
|
||||
set presenterVisible(state) {
|
||||
this.presenter.visible = state;
|
||||
}
|
||||
|
||||
set publicText(text) {
|
||||
this.public.text = text;
|
||||
}
|
||||
|
||||
set publicVisible(state) {
|
||||
this.public.visible = state;
|
||||
}
|
||||
|
||||
get presenter() {
|
||||
return this.presenter;
|
||||
}
|
||||
|
||||
get public() {
|
||||
return this.public;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = EventTimer;
|
||||
|
||||
Reference in New Issue
Block a user