Web: Hide "Sign out" for Zoom App

This commit is contained in:
Alexey Safronov 2023-09-14 17:31:06 +04:00
parent 9287468461
commit f5bb35760d
2 changed files with 38 additions and 25 deletions

View File

@ -98,12 +98,15 @@ const PortalUnavailable = ({ theme, logoUrl, onLogoutClick }) => {
<Text textAlign="center" className="portal-unavailable_text">
{t("PortalUnavailable:AccessingProblem")}
</Text>
<Button
scale
label={t("Common:LogoutButton")}
size={"medium"}
onClick={onClick}
/>
{!window.navigator.userAgent.includes("ZoomWebKit") &&
!window.navigator.userAgent.includes("ZoomApps") && (
<Button
scale
label={t("Common:LogoutButton")}
size={"medium"}
onClick={onClick}
/>
)}
<ColorTheme
textAlign="center"

View File

@ -129,8 +129,9 @@ class ProfileActionsStore {
};
onSupportClick = () => {
const supportUrl = this.authStore.settingsStore.additionalResourcesData
?.feedbackAndSupportUrl;
const supportUrl =
this.authStore.settingsStore.additionalResourcesData
?.feedbackAndSupportUrl;
window.open(supportUrl, "_blank");
};
@ -293,19 +294,27 @@ class ProfileActionsStore {
label: t("Common:AboutCompanyTitle"),
onClick: this.onAboutClick,
},
{
isSeparator: true,
key: "separator3",
},
{
key: "user-menu-logout",
icon: LogoutReactSvgUrl,
label: t("Common:LogoutButton"),
onClick: this.onLogoutClick,
isButton: true,
},
];
if (
!window.navigator.userAgent.includes("ZoomWebKit") &&
!window.navigator.userAgent.includes("ZoomApps")
) {
actions.push(
{
isSeparator: true,
key: "separator3",
},
{
key: "user-menu-logout",
icon: LogoutReactSvgUrl,
label: t("Common:LogoutButton"),
onClick: this.onLogoutClick,
isButton: true,
}
);
}
if (debugInfo) {
actions.splice(4, 0, {
key: "user-menu-debug",
@ -338,12 +347,13 @@ class ProfileActionsStore {
return actionsArray;
}
const feedbackAndSupportEnabled = this.authStore.settingsStore
.additionalResourcesData?.feedbackAndSupportEnabled;
const videoGuidesEnabled = this.authStore.settingsStore
.additionalResourcesData?.videoGuidesEnabled;
const helpCenterEnabled = this.authStore.settingsStore
.additionalResourcesData?.helpCenterEnabled;
const feedbackAndSupportEnabled =
this.authStore.settingsStore.additionalResourcesData
?.feedbackAndSupportEnabled;
const videoGuidesEnabled =
this.authStore.settingsStore.additionalResourcesData?.videoGuidesEnabled;
const helpCenterEnabled =
this.authStore.settingsStore.additionalResourcesData?.helpCenterEnabled;
if (!feedbackAndSupportEnabled) {
const index = actionsArray.findIndex(