From eab45ac6c2ae904b4969d4a271a87a1be6e2ff06 Mon Sep 17 00:00:00 2001 From: Balte de Wit Date: Wed, 22 Sep 2021 09:38:47 +0200 Subject: [PATCH 1/2] fix: default label setting if undefined --- client/utils/labels.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/utils/labels.ts b/client/utils/labels.ts index b4020687..53036c2f 100644 --- a/client/utils/labels.ts +++ b/client/utils/labels.ts @@ -30,18 +30,19 @@ export function getFaderLabel(faderIndex: number, defaultName = 'CH'): string { const channelLabel = getChannelLabel(state, faderIndex) switch (state.settings[0].labelType) { + case 'automation': + return automationLabel || defaultName + ' ' + (faderIndex + 1) + case 'user': + return userLabel || defaultName + ' ' + (faderIndex + 1) + case 'channel': + return channelLabel || defaultName + ' ' + (faderIndex + 1) case 'automatic': + default: return ( userLabel || automationLabel || channelLabel || defaultName + ' ' + (faderIndex + 1) ) - case 'automation': - return automationLabel || defaultName + ' ' + (faderIndex + 1) - case 'user': - return userLabel || defaultName + ' ' + (faderIndex + 1) - case 'channel': - return channelLabel || defaultName + ' ' + (faderIndex + 1) } } From f854be0431a7f488d0b9372620d1702d674dffcb Mon Sep 17 00:00:00 2001 From: Balte de Wit Date: Wed, 22 Sep 2021 09:49:04 +0200 Subject: [PATCH 2/2] fix: automation labels fallback --- server/utils/labels.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/server/utils/labels.ts b/server/utils/labels.ts index 8630ce08..026f4609 100644 --- a/server/utils/labels.ts +++ b/server/utils/labels.ts @@ -31,18 +31,19 @@ export function getFaderLabel(faderIndex: number, defaultName = 'CH'): string { const channelLabel = getChannelLabel(state, faderIndex) switch (state.settings[0].labelType) { + case 'automation': + return automationLabel || defaultName + ' ' + (faderIndex + 1) + case 'user': + return userLabel || defaultName + ' ' + (faderIndex + 1) + case 'channel': + return channelLabel || defaultName + ' ' + (faderIndex + 1) case 'automatic': + default: return ( userLabel || automationLabel || channelLabel || defaultName + ' ' + (faderIndex + 1) ) - case 'automation': - return automationLabel || defaultName + ' ' + (faderIndex + 1) - case 'user': - return userLabel || defaultName + ' ' + (faderIndex + 1) - case 'channel': - return channelLabel || defaultName + ' ' + (faderIndex + 1) } }