diff --git a/apps/client/src/common/models/View.types.ts b/apps/client/src/common/models/View.types.ts deleted file mode 100644 index 2d8979a66..000000000 --- a/apps/client/src/common/models/View.types.ts +++ /dev/null @@ -1,19 +0,0 @@ -export type OverridableOptions = { - keyColour?: string; - textColour?: string; - textBackground?: string; - font?: string; - size?: number; - justifyContent?: 'start' | 'center' | 'end'; - alignItems?: 'start' | 'center' | 'end'; - left?: string; - top?: string; - hideNav?: boolean; - hideOvertime?: boolean; - hideMessagesOverlay?: boolean; - hideEndMessage?: boolean; - language?: string; - showProgressBar?: boolean; - hideTimerSeconds?: boolean; - removeLeadingZeros?: boolean; -}; diff --git a/apps/client/src/views/timer/Timer.tsx b/apps/client/src/views/timer/Timer.tsx index d9a9e659e..187052d01 100644 --- a/apps/client/src/views/timer/Timer.tsx +++ b/apps/client/src/views/timer/Timer.tsx @@ -68,7 +68,7 @@ function Timer({ customFields, projectData, isMirrored, settings, viewSettings } hidePhase, font, keyColour, - textColour, + timerColour, } = useTimerOptions(); const { getLocalizedString } = useTranslation(); @@ -131,11 +131,11 @@ function Timer({ customFields, projectData, isMirrored, settings, viewSettings } ); // gather presentation styles - const timerColour = getTimerColour(viewSettings, textColour, showWarning, showDanger); + const resolvedTimerColour = getTimerColour(viewSettings, timerColour, showWarning, showDanger); const { timerFontSize, externalFontSize } = getEstimatedFontSize(display, secondaryContent); const userStyles = { ...(keyColour && { '--timer-bg': keyColour }), - ...(textColour && { '--timer-colour': timerColour }), + ...(resolvedTimerColour && { '--timer-colour': resolvedTimerColour }), ...(font && { '--timer-font': font }), }; diff --git a/apps/client/src/views/timer/timer.options.ts b/apps/client/src/views/timer/timer.options.ts index 4d88636b9..ca7a3238b 100644 --- a/apps/client/src/views/timer/timer.options.ts +++ b/apps/client/src/views/timer/timer.options.ts @@ -163,9 +163,9 @@ export const getTimerOptions = (timeFormat: string, customFields: CustomFields): defaultValue: '101010', }, { - id: 'textColour', - title: 'Text Colour', - description: 'Text colour. Default: #f6f6f6', + id: 'timerColour', + title: 'Timer Colour', + description: 'Timer colour. Default: #f6f6f6', type: 'colour', defaultValue: 'f6f6f6', }, @@ -191,7 +191,7 @@ type TimerOptions = { hidePhase: boolean; font?: string; keyColour?: string; - textColour?: string; + timerColour?: string; }; /** @@ -226,7 +226,7 @@ function getOptionsFromParams(searchParams: URLSearchParams, defaultValues?: URL font: getValue('font') ?? undefined, keyColour: makeColourString(getValue('keyColour')), - textColour: makeColourString(getValue('textColour')), + timerColour: makeColourString(getValue('timerColour')), }; } diff --git a/apps/server/src/models/demoProject.ts b/apps/server/src/models/demoProject.ts index c0d5b9da4..9aaee1463 100644 --- a/apps/server/src/models/demoProject.ts +++ b/apps/server/src/models/demoProject.ts @@ -337,7 +337,7 @@ export const demoDb: DatabaseModel = { alias: 'minimal', target: OntimeView.Timer, search: - 'hideclock=true&hidecards=true&hideprogress=true&hidemessage=true&hidesecondary=true&hidelogo=true&font=arial+black&keycolour=00ff00&textcolour=ffffff', + 'hideclock=true&hidecards=true&hideprogress=true&hidemessage=true&hidesecondary=true&hidelogo=true&font=arial+black&keycolour=00ff00&timerColour=ffffff', }, ], customFields: {