refactor: rename external message to secondary message

This commit is contained in:
Carlos Valente
2025-06-21 20:17:22 +02:00
committed by Carlos Valente
parent 0aeec12ccd
commit 3cd6cd2f55
18 changed files with 49 additions and 48 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ export default function Timer(props: TimerProps) {
hideCards,
hideProgress,
hideMessage,
hideExternal,
hideSecondary,
hideTimerSeconds,
removeLeadingZeros,
mainSource,
@@ -110,7 +110,7 @@ export default function Timer(props: TimerProps) {
localisedMinutes,
hideTimerSeconds,
removeLeadingZeros,
hideExternal,
hideSecondary,
);
// gather presentation styles
+4 -4
View File
@@ -99,8 +99,8 @@ export const getTimerOptions = (timeFormat: string, customFields: CustomFields):
defaultValue: false,
},
{
id: 'hideExternal',
title: 'Hide Auxiliary timer / External message',
id: 'hideSecondary',
title: 'Hide Auxiliary timer / Secondary message',
description: 'Prevents the screen from displaying the secondary timer field',
type: 'boolean',
defaultValue: false,
@@ -115,7 +115,7 @@ type TimerOptions = {
hideCards: boolean;
hideProgress: boolean;
hideMessage: boolean;
hideExternal: boolean;
hideSecondary: boolean;
hideTimerSeconds: boolean;
removeLeadingZeros: boolean;
mainSource: keyof OntimeEvent | null;
@@ -135,7 +135,7 @@ function getOptionsFromParams(searchParams: URLSearchParams): TimerOptions {
hideCards: isStringBoolean(searchParams.get('hideCards')),
hideProgress: isStringBoolean(searchParams.get('hideProgress')),
hideMessage: isStringBoolean(searchParams.get('hideMessage')),
hideExternal: isStringBoolean(searchParams.get('hideExternal')),
hideSecondary: isStringBoolean(searchParams.get('hideSecondary')),
hideTimerSeconds: isStringBoolean(searchParams.get('hideTimerSeconds')),
removeLeadingZeros: !isStringBoolean(searchParams.get('showLeadingZeros')),
+4 -4
View File
@@ -111,9 +111,9 @@ export function getSecondaryDisplay(
localisedMinutes: string,
removeSeconds: boolean,
removeLeadingZero: boolean,
hideExternal: boolean,
hideSecondary: boolean,
): string | undefined {
if (hideExternal) {
if (hideSecondary) {
return;
}
if (message.timer.secondarySource === 'aux') {
@@ -122,8 +122,8 @@ export function getSecondaryDisplay(
removeLeadingZero,
});
}
if (message.timer.secondarySource === 'external' && message.external) {
return message.external;
if (message.timer.secondarySource === 'secondary' && message.secondary) {
return message.secondary;
}
return;
}