mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 17:33:55 +00:00
fix: subdue paused only for running timers
This commit is contained in:
committed by
Carlos Valente
parent
03184b0321
commit
14e21214af
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react';
|
||||
import { OntimeView } from 'ontime-types';
|
||||
import { OntimeView, TimerType } from 'ontime-types';
|
||||
|
||||
import { FitText } from '../../common/components/fit-text/FitText';
|
||||
import MultiPartProgressBar from '../../common/components/multi-part-progress-bar/MultiPartProgressBar';
|
||||
@@ -133,6 +133,7 @@ function Timer({ customFields, projectData, isMirrored, settings, viewSettings }
|
||||
// gather presentation styles
|
||||
const resolvedTimerColour = getTimerColour(viewSettings, timerColour, showWarning, showDanger);
|
||||
const timerFontSize = getEstimatedFontSize(display, secondaryContent);
|
||||
const subduePaused = !isPlaying && viewTimerType !== TimerType.Clock;
|
||||
const userStyles = {
|
||||
...(keyColour && { '--timer-bg': keyColour }),
|
||||
...(resolvedTimerColour && { '--timer-colour': resolvedTimerColour }),
|
||||
@@ -177,7 +178,7 @@ function Timer({ customFields, projectData, isMirrored, settings, viewSettings }
|
||||
</FitText>
|
||||
) : (
|
||||
<div
|
||||
className={cx(['timer', !isPlaying && 'timer--paused', showFinished && 'timer--finished'])}
|
||||
className={cx(['timer', subduePaused && 'timer--paused', showFinished && 'timer--finished'])}
|
||||
style={{ fontSize: `${timerFontSize}vw` }}
|
||||
data-type={viewTimerType}
|
||||
data-phase={time.phase}
|
||||
|
||||
Reference in New Issue
Block a user