Warning and danger per event (#677)

* feat: warning and danger per event

---------

Co-authored-by: Fabian Posenau <fabian@fphome.de>
This commit is contained in:
Fabian Posenau
2023-12-30 20:56:57 +01:00
committed by GitHub
parent 7b9f64a630
commit 3998b8927d
31 changed files with 290 additions and 203 deletions
+6
View File
@@ -79,6 +79,8 @@ export class TimerService {
duration: null,
timerType: null,
endAction: null,
timeWarning: null,
timeDanger: null,
};
this.loadedTimerId = null;
this.loadedTimerStart = null;
@@ -156,6 +158,8 @@ export class TimerService {
this.timer.endAction = timer.endAction;
this.loadedTimerStart = timer.timeStart;
this.loadedTimerEnd = timer.timeEnd;
this.timer.timeWarning = timer.timeWarning;
this.timer.timeDanger = timer.timeDanger;
// this might not be ideal
this.timer.finishedAt = null;
@@ -196,6 +200,8 @@ export class TimerService {
this.timer.endAction = timer.endAction;
this.pausedTime = 0;
this.pausedAt = 0;
this.timer.timeWarning = timer.timeWarning;
this.timer.timeDanger = timer.timeDanger;
this.timer.current = this.timer.duration;
if (this.timer.timerType === TimerType.TimeToEnd) {