mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 07:29:08 +00:00
feat: implement multiple aux timers
This commit is contained in:
committed by
Carlos Valente
parent
d1c58712ae
commit
bf8ed8d017
@@ -8,18 +8,32 @@ export function toOntimeAction(action: OntimeAction) {
|
||||
const actionType = action.action;
|
||||
switch (actionType) {
|
||||
// Aux timer actions
|
||||
case 'aux-start':
|
||||
auxTimerService.start();
|
||||
break;
|
||||
case 'aux-stop':
|
||||
auxTimerService.stop();
|
||||
break;
|
||||
case 'aux-pause':
|
||||
auxTimerService.pause();
|
||||
break;
|
||||
case 'aux-set': {
|
||||
auxTimerService.setTime(action.time);
|
||||
break;
|
||||
case 'aux1-start':
|
||||
return auxTimerService.start(1);
|
||||
case 'aux1-stop':
|
||||
return auxTimerService.stop(1);
|
||||
case 'aux1-pause':
|
||||
return auxTimerService.pause(1);
|
||||
case 'aux1-set': {
|
||||
return auxTimerService.setTime(action.time, 1);
|
||||
}
|
||||
case 'aux2-start':
|
||||
return auxTimerService.start(2);
|
||||
case 'aux2-stop':
|
||||
return auxTimerService.stop(2);
|
||||
case 'aux2-pause':
|
||||
return auxTimerService.pause(2);
|
||||
case 'aux2-set': {
|
||||
return auxTimerService.setTime(action.time, 2);
|
||||
}
|
||||
case 'aux3-start':
|
||||
return auxTimerService.start(3);
|
||||
case 'aux3-stop':
|
||||
return auxTimerService.stop(3);
|
||||
case 'aux3-pause':
|
||||
return auxTimerService.pause(3);
|
||||
case 'aux3-set': {
|
||||
return auxTimerService.setTime(action.time, 3);
|
||||
}
|
||||
|
||||
// Message actions
|
||||
|
||||
Reference in New Issue
Block a user