From f0ef7ae0493277c403bfbd77dbb8125a93f9e42d Mon Sep 17 00:00:00 2001 From: malmen237 Date: Tue, 14 Jan 2025 11:31:13 +0100 Subject: [PATCH 1/2] fix: added variable to toggle-hotkey --- .../production-line/hotkeys-component.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/production-line/hotkeys-component.tsx b/src/components/production-line/hotkeys-component.tsx index c0837942..8c33db4b 100644 --- a/src/components/production-line/hotkeys-component.tsx +++ b/src/components/production-line/hotkeys-component.tsx @@ -70,12 +70,14 @@ export const HotkeysComponent = ({ Toggle Output Mute - - - {(savedHotkeys?.pushToTalkHotkey || "").toUpperCase()}:{" "} - - Push to Talk - + {!isProgramOutputLine && ( + + + {(savedHotkeys?.pushToTalkHotkey || "").toUpperCase()}:{" "} + + Push to Talk + + )} {savedHotkeys?.increaseVolumeHotkey.toUpperCase()}:{" "} From 3679a0a57863ca6d465f05f97b023a4436a721cd Mon Sep 17 00:00:00 2001 From: malmen237 Date: Tue, 14 Jan 2025 11:40:02 +0100 Subject: [PATCH 2/2] fix: added conditions to hotkeys-settings --- .../production-line/settings-modal.tsx | 132 +++++++++--------- 1 file changed, 68 insertions(+), 64 deletions(-) diff --git a/src/components/production-line/settings-modal.tsx b/src/components/production-line/settings-modal.tsx index 13f033ad..b259d76f 100644 --- a/src/components/production-line/settings-modal.tsx +++ b/src/components/production-line/settings-modal.tsx @@ -300,39 +300,41 @@ export const SettingsModal = ({ /> )} - - Toggle push to talk: - setInputRef(2, el)} - type="text" - value={hotkeys.pushToTalkHotkey} - onChange={(e) => - handleInputChange("pushToTalkHotkey", e.target.value) - } - placeholder="Enter hotkey" - maxLength={1} - onKeyDown={(e) => handleKeyDown(e, 2)} - /> - {errors.pushToTalkHotkey && ( - } + {!programOutPutLine && ( + + Toggle push to talk: + setInputRef(2, el)} + type="text" + value={hotkeys.pushToTalkHotkey} + onChange={(e) => + handleInputChange("pushToTalkHotkey", e.target.value) + } + placeholder="Enter hotkey" + maxLength={1} + onKeyDown={(e) => handleKeyDown(e, 2)} /> - )} - {!errors.pushToTalkHotkey && warning.pushToTalkHotkey && ( - - )} - + {errors.pushToTalkHotkey && ( + } + /> + )} + {!errors.pushToTalkHotkey && warning.pushToTalkHotkey && ( + + )} + + )} Increase volume: )} - - Toggle mute all microphones: - setInputRef(3, el)} - type="text" - value={hotkeys.globalMuteHotkey} - onChange={(e) => - handleInputChange("globalMuteHotkey", e.target.value) - } - placeholder="Enter hotkey" - maxLength={1} - onKeyDown={(e) => handleKeyDown(e, 3)} - /> - {errors.globalMuteHotkey && ( - } - /> - )} - {!errors.globalMuteHotkey && warning.globalMuteHotkey && ( - + Toggle mute all microphones: + setInputRef(3, el)} + type="text" + value={hotkeys.globalMuteHotkey} + onChange={(e) => + handleInputChange("globalMuteHotkey", e.target.value) + } + placeholder="Enter hotkey" + maxLength={1} + onKeyDown={(e) => handleKeyDown(e, 3)} /> - )} - + {errors.globalMuteHotkey && ( + } + /> + )} + {!errors.globalMuteHotkey && warning.globalMuteHotkey && ( + + )} + + )} Cancel