mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 05:34:09 +00:00
feat: add time type none
This commit is contained in:
committed by
Carlos Valente
parent
7ccd41eeee
commit
0d8c186c77
@@ -23,6 +23,8 @@ export function getTimerByType(freezeEnd: boolean, timerObject?: TimerTypeParams
|
||||
return Math.abs(timerObject.elapsed ?? 0);
|
||||
case TimerType.Clock:
|
||||
return timerObject.clock;
|
||||
case TimerType.None:
|
||||
return null;
|
||||
default: {
|
||||
const exhaustiveCheck: never = timerObject.timerType;
|
||||
return exhaustiveCheck;
|
||||
|
||||
@@ -160,6 +160,7 @@ export default function Timer(props: TimerProps) {
|
||||
|
||||
const defaultFormat = getDefaultFormat(settings?.timeFormat);
|
||||
const timerOptions = getTimerOptions(defaultFormat, customFields);
|
||||
const disableProgress = timerIsTimeOfDay || time.timerType === TimerType.None;
|
||||
|
||||
return (
|
||||
<div className={showFinished ? `${baseClasses} stage-timer--finished` : baseClasses} data-testid='timer-view'>
|
||||
@@ -205,7 +206,7 @@ export default function Timer(props: TimerProps) {
|
||||
{!userOptions.hideProgress && (
|
||||
<MultiPartProgressBar
|
||||
className={isPlaying ? 'progress-container' : 'progress-container progress-container--paused'}
|
||||
now={timerIsTimeOfDay ? null : time.current}
|
||||
now={disableProgress ? null : time.current}
|
||||
complete={totalTime}
|
||||
normalColor={viewSettings.normalColor}
|
||||
warning={eventNow?.timeWarning}
|
||||
|
||||
Reference in New Issue
Block a user