diff --git a/apps/client/src/views/timer/Timer.tsx b/apps/client/src/views/timer/Timer.tsx index b487a2cc1..85de0f405 100644 --- a/apps/client/src/views/timer/Timer.tsx +++ b/apps/client/src/views/timer/Timer.tsx @@ -20,6 +20,7 @@ import { formatTime, getDefaultFormat } from '../../common/utils/time'; import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; import { getFormattedTimer, getTimerByType } from '../../features/viewers/common/viewUtils'; import { useTranslation } from '../../translation/TranslationProvider'; +import { getTimerColour } from '../utils/presentation.utils'; import { getTimerOptions, useTimerOptions } from './timer.options'; import { @@ -31,7 +32,6 @@ import { getShowMessage, getShowModifiers, getShowProgressBar, - getTimerColour, getTotalTime, } from './timer.utils'; diff --git a/apps/client/src/views/timer/timer.utils.ts b/apps/client/src/views/timer/timer.utils.ts index b46bc5a3f..ae85030ff 100644 --- a/apps/client/src/views/timer/timer.utils.ts +++ b/apps/client/src/views/timer/timer.utils.ts @@ -102,15 +102,6 @@ export function getShowModifiers( }; } -/** - * Which colour should the timer have at a given moment - */ -export function getTimerColour(viewSettings: ViewSettings, showWarning: boolean, showDanger: boolean) { - if (showWarning) return viewSettings.warningColor; - if (showDanger) return viewSettings.dangerColor; - return viewSettings.normalColor; -} - /** * What, if anything, should be displayed in the secondary field */ diff --git a/apps/client/src/views/utils/presentation.utils.ts b/apps/client/src/views/utils/presentation.utils.ts new file mode 100644 index 000000000..9891e2acb --- /dev/null +++ b/apps/client/src/views/utils/presentation.utils.ts @@ -0,0 +1,10 @@ +import { ViewSettings } from 'ontime-types'; + +/** + * Which colour should the timer have at a given moment + */ +export function getTimerColour(viewSettings: ViewSettings, showWarning: boolean, showDanger: boolean) { + if (showWarning) return viewSettings.warningColor; + if (showDanger) return viewSettings.dangerColor; + return viewSettings.normalColor; +}