mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-03 21:39:08 +00:00
update multiple events "defaults"
This commit is contained in:
@@ -99,27 +99,27 @@ export default function EventEditorWrapper() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const multipleEvents: OntimeEvent = {
|
const multipleEvents: Partial<OntimeEvent> = {
|
||||||
id: eventsIds.trim().split(' ').join(', '),
|
id: eventsIds.trim().split(' ').join(', '),
|
||||||
colour: allHaveSameValue(events, 'colour') ? events[0]['colour'] : '',
|
colour: allHaveSameValue(events, 'colour') ? events[0]['colour'] : 'unkown',
|
||||||
custom: allHaveSameValue(events, 'custom') ? events[0]['custom'] : {},
|
custom: allHaveSameValue(events, 'custom') ? events[0]['custom'] : undefined,
|
||||||
duration: allHaveSameValue(events, 'duration') ? events[0]['duration'] : 600000,
|
duration: allHaveSameValue(events, 'duration') ? events[0]['duration'] : undefined,
|
||||||
endAction: allHaveSameValue(events, 'endAction') ? events[0]['endAction'] : EndAction.None,
|
endAction: allHaveSameValue(events, 'endAction') ? events[0]['endAction'] : EndAction.Unkown,
|
||||||
delay: allHaveSameValue(events, 'delay') ? events[0]['delay'] : 0,
|
delay: allHaveSameValue(events, 'delay') ? events[0]['delay'] : undefined,
|
||||||
isPublic: allHaveSameValue(events, 'isPublic') ? events[0]['isPublic'] : true,
|
isPublic: allHaveSameValue(events, 'isPublic') ? events[0]['isPublic'] : true, // ??
|
||||||
linkStart: allHaveSameValue(events, 'linkStart') ? events[0]['linkStart'] : null,
|
linkStart: allHaveSameValue(events, 'linkStart') ? events[0]['linkStart'] : null,
|
||||||
note: allHaveSameValue(events, 'note') ? events[0]['note'] : '',
|
note: allHaveSameValue(events, 'note') ? events[0]['note'] : '', // ??
|
||||||
revision: allHaveSameValue(events, 'revision') ? events[0]['revision'] : 0,
|
revision: allHaveSameValue(events, 'revision') ? events[0]['revision'] : undefined,
|
||||||
skip: allHaveSameValue(events, 'skip') ? events[0]['skip'] : false,
|
skip: allHaveSameValue(events, 'skip') ? events[0]['skip'] : undefined,
|
||||||
timeDanger: allHaveSameValue(events, 'timeDanger') ? events[0]['timeDanger'] : 60000,
|
timeDanger: allHaveSameValue(events, 'timeDanger') ? events[0]['timeDanger'] : undefined,
|
||||||
timeEnd: allHaveSameValue(events, 'timeEnd') ? events[0]['timeEnd'] : 600000,
|
timeEnd: allHaveSameValue(events, 'timeEnd') ? events[0]['timeEnd'] : undefined,
|
||||||
timeStart: allHaveSameValue(events, 'timeStart') ? events[0]['timeStart'] : 0,
|
timeStart: allHaveSameValue(events, 'timeStart') ? events[0]['timeStart'] : undefined,
|
||||||
timeStrategy: allHaveSameValue(events, 'timeStrategy') ? events[0]['timeStrategy'] : TimeStrategy.LockDuration,
|
timeStrategy: allHaveSameValue(events, 'timeStrategy') ? events[0]['timeStrategy'] : TimeStrategy.Unkown,
|
||||||
timeWarning: allHaveSameValue(events, 'timeWarning') ? events[0]['timeWarning'] : 120000,
|
timeWarning: allHaveSameValue(events, 'timeWarning') ? events[0]['timeWarning'] : undefined,
|
||||||
timerType: allHaveSameValue(events, 'timerType') ? events[0]['timerType'] : TimerType.CountDown,
|
timerType: allHaveSameValue(events, 'timerType') ? events[0]['timerType'] : TimerType.Unkown,
|
||||||
title: allHaveSameValue(events, 'title') ? events[0]['title'] : '',
|
title: allHaveSameValue(events, 'title') ? events[0]['title'] : '', // ??
|
||||||
type: allHaveSameValue(events, 'type') ? events[0]['type'] : SupportedEvent.Event,
|
type: allHaveSameValue(events, 'type') ? events[0]['type'] : SupportedEvent.Event,
|
||||||
cue: allHaveSameValue(events, 'cue') ? events[0]['cue'] : '0.01',
|
cue: allHaveSameValue(events, 'cue') ? events[0]['cue'] : 'unkown',
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ export enum EndAction {
|
|||||||
None = 'none',
|
None = 'none',
|
||||||
PlayNext = 'play-next',
|
PlayNext = 'play-next',
|
||||||
Stop = 'stop',
|
Stop = 'stop',
|
||||||
|
Unkown = 'unkown',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export enum TimeStrategy {
|
export enum TimeStrategy {
|
||||||
LockEnd = 'lock-end',
|
LockEnd = 'lock-end',
|
||||||
LockDuration = 'lock-duration',
|
LockDuration = 'lock-duration',
|
||||||
|
Unkown = 'unkown',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ export enum TimerType {
|
|||||||
CountUp = 'count-up',
|
CountUp = 'count-up',
|
||||||
TimeToEnd = 'time-to-end',
|
TimeToEnd = 'time-to-end',
|
||||||
Clock = 'clock',
|
Clock = 'clock',
|
||||||
|
Unkown = 'unkown',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user