mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 17:33:55 +00:00
refactor: allow aux change direction while playing
This commit is contained in:
committed by
Carlos Valente
parent
9a6ca7ac67
commit
16fd44a441
@@ -230,8 +230,9 @@ const actionHandlers: Record<string, ActionHandler> = {
|
||||
} else if (command && typeof command === 'object') {
|
||||
const reply = { payload: {} };
|
||||
if ('duration' in command) {
|
||||
const time = numberOrError(command.duration);
|
||||
reply.payload = auxTimerService.setTime(time * 1000); //frontend is seconds based
|
||||
// convert duration in seconds to ms
|
||||
const timeInMs = numberOrError(command.duration) * 1000;
|
||||
reply.payload = auxTimerService.setTime(timeInMs);
|
||||
}
|
||||
if ('direction' in command) {
|
||||
if (command.direction === SimpleDirection.CountUp || command.direction === SimpleDirection.CountDown) {
|
||||
|
||||
Reference in New Issue
Block a user