Don't show profile settings in embedded mode
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -46,6 +46,7 @@ import {
|
|||||||
MediaDevices,
|
MediaDevices,
|
||||||
MediaDevicesState,
|
MediaDevicesState,
|
||||||
} from "../livekit/useMediaDevicesSwitcher";
|
} from "../livekit/useMediaDevicesSwitcher";
|
||||||
|
import { useUrlParams } from "../UrlParams";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mediaDevicesSwitcher?: MediaDevicesState;
|
mediaDevicesSwitcher?: MediaDevicesState;
|
||||||
@@ -59,6 +60,8 @@ interface Props {
|
|||||||
export const SettingsModal = (props: Props) => {
|
export const SettingsModal = (props: Props) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const { isEmbedded } = useUrlParams();
|
||||||
|
|
||||||
const [showInspector, setShowInspector] = useShowInspector();
|
const [showInspector, setShowInspector] = useShowInspector();
|
||||||
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
||||||
const [developerSettingsTab, setDeveloperSettingsTab] =
|
const [developerSettingsTab, setDeveloperSettingsTab] =
|
||||||
@@ -147,17 +150,19 @@ export const SettingsModal = (props: Props) => {
|
|||||||
>
|
>
|
||||||
{devices && generateDeviceSelection(devices.videoIn, t("Camera"))}
|
{devices && generateDeviceSelection(devices.videoIn, t("Camera"))}
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem
|
{!isEmbedded && (
|
||||||
key="profile"
|
<TabItem
|
||||||
title={
|
key="profile"
|
||||||
<>
|
title={
|
||||||
<UserIcon width={15} height={15} />
|
<>
|
||||||
<span>{t("Profile")}</span>
|
<UserIcon width={15} height={15} />
|
||||||
</>
|
<span>{t("Profile")}</span>
|
||||||
}
|
</>
|
||||||
>
|
}
|
||||||
<ProfileSettingsTab client={props.client} />
|
>
|
||||||
</TabItem>
|
<ProfileSettingsTab client={props.client} />
|
||||||
|
</TabItem>
|
||||||
|
)}
|
||||||
<TabItem
|
<TabItem
|
||||||
key="feedback"
|
key="feedback"
|
||||||
title={
|
title={
|
||||||
|
|||||||
Reference in New Issue
Block a user