Put the settings tabs back in the right order

This commit is contained in:
Robin Townsend
2023-07-14 14:08:42 -04:00
parent 8cee8c8779
commit 72eca769a4

View File

@@ -118,7 +118,7 @@ export const SettingsModal = (props: Props) => {
const devices = props.mediaDevicesSwitcher;
const tabs = [
const audioTab = (
<TabItem
key="audio"
title={
@@ -130,7 +130,10 @@ export const SettingsModal = (props: Props) => {
>
{devices && generateDeviceSelection(devices.audioIn, t("Microphone"))}
{devices && generateDeviceSelection(devices.audioOut, t("Speaker"))}
</TabItem>,
</TabItem>
);
const videoTab = (
<TabItem
key="video"
title={
@@ -141,7 +144,24 @@ export const SettingsModal = (props: Props) => {
}
>
{devices && generateDeviceSelection(devices.videoIn, t("Camera"))}
</TabItem>,
</TabItem>
);
const profileTab = (
<TabItem
key="profile"
title={
<>
<UserIcon width={15} height={15} />
<span>{t("Profile")}</span>
</>
}
>
<ProfileSettingsTab client={props.client} />
</TabItem>
);
const feedbackTab = (
<TabItem
key="feedback"
title={
@@ -152,7 +172,10 @@ export const SettingsModal = (props: Props) => {
}
>
<FeedbackSettingsTab roomId={props.roomId} />
</TabItem>,
</TabItem>
);
const moreTab = (
<TabItem
key="more"
title={
@@ -188,27 +211,10 @@ export const SettingsModal = (props: Props) => {
}}
/>
</FieldRow>
</TabItem>,
];
if (!isEmbedded) {
tabs.push(
<TabItem
key="profile"
title={
<>
<UserIcon width={15} height={15} />
<span>{t("Profile")}</span>
</>
}
>
<ProfileSettingsTab client={props.client} />
</TabItem>
);
}
if (developerSettingsTab) {
tabs.push(
const developerTab = (
<TabItem
key="developer"
title={
@@ -254,7 +260,15 @@ export const SettingsModal = (props: Props) => {
</FieldRow>
</TabItem>
);
}
const tabs = [
audioTab,
videoTab,
...(isEmbedded ? [] : [profileTab]),
feedbackTab,
moreTab,
...(developerSettingsTab ? [developerTab] : []),
];
return (
<Modal