From 72eca769a42df7743be15f7f972d6a6555a99357 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Fri, 14 Jul 2023 14:08:42 -0400 Subject: [PATCH] Put the settings tabs back in the right order --- src/settings/SettingsModal.tsx | 154 ++++++++++++++++++--------------- 1 file changed, 84 insertions(+), 70 deletions(-) diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index 19379cb4..82d32338 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -118,7 +118,7 @@ export const SettingsModal = (props: Props) => { const devices = props.mediaDevicesSwitcher; - const tabs = [ + const audioTab = ( { > {devices && generateDeviceSelection(devices.audioIn, t("Microphone"))} {devices && generateDeviceSelection(devices.audioOut, t("Speaker"))} - , + + ); + + const videoTab = ( { } > {devices && generateDeviceSelection(devices.videoIn, t("Camera"))} - , + + ); + + const profileTab = ( + + + {t("Profile")} + + } + > + + + ); + + const feedbackTab = ( { } > - , + + ); + + const moreTab = ( { }} /> - , + + ); + + const developerTab = ( + + + {t("Developer")} + + } + > + + + {t("Version: {{version}}", { + version: import.meta.env.VITE_APP_VERSION || "dev", + })} + + + + ) => + setShowInspector(e.target.checked) + } + /> + + + ) => + setShowConnectionStats(e.target.checked) + } + /> + + + + + + ); + + const tabs = [ + audioTab, + videoTab, + ...(isEmbedded ? [] : [profileTab]), + feedbackTab, + moreTab, + ...(developerSettingsTab ? [developerTab] : []), ]; - if (!isEmbedded) { - tabs.push( - - - {t("Profile")} - - } - > - - - ); - } - - if (developerSettingsTab) { - tabs.push( - - - {t("Developer")} - - } - > - - - {t("Version: {{version}}", { - version: import.meta.env.VITE_APP_VERSION || "dev", - })} - - - - ) => - setShowInspector(e.target.checked) - } - /> - - - ) => - setShowConnectionStats(e.target.checked) - } - /> - - - - - - ); - } - return (