Added websockts for admin interface
This commit is contained in:
parent
536c1272d8
commit
b7cf1e4d9a
4 changed files with 34 additions and 6 deletions
|
|
@ -13,7 +13,7 @@ function pause() {};
|
|||
function reset() {};
|
||||
function end() {};
|
||||
function print() {};
|
||||
|
||||
function getValues() {};
|
||||
|
||||
function start() {
|
||||
if(isPaused == true && durationLeft.asSeconds() != 0) { // Only allow start if timer ist currently paused and durationLeft is not 0 seconds
|
||||
|
|
@ -61,6 +61,15 @@ function print() {
|
|||
return minutes + ":" + seconds
|
||||
}
|
||||
|
||||
function getValues() {
|
||||
return {
|
||||
isPaused: isPaused,
|
||||
duration: duration,
|
||||
durationLeft: durationLeft,
|
||||
print: print()
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
duration, durationLeft, isPaused, start, pause, reset, end, print
|
||||
};
|
||||
duration, durationLeft, isPaused, start, pause, reset, end, print, getValues
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue