From 0524fb298a793fce5a369303dc86a3e0e2f726b9 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Apr 2024 10:08:10 +0300 Subject: [PATCH] SDK: Hide banners for frame --- packages/client/src/Shell.jsx | 6 ++++-- packages/client/src/components/Article/Body/index.js | 11 ++++++++--- packages/client/src/store/ProfileActionsStore.js | 6 +----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/client/src/Shell.jsx b/packages/client/src/Shell.jsx index 1168a2fe2e..c88eb14d03 100644 --- a/packages/client/src/Shell.jsx +++ b/packages/client/src/Shell.jsx @@ -86,6 +86,7 @@ const Shell = ({ items = [], page = "home", ...rest }) => { setConvertPasswordDialogVisible, version, pagesWithoutNavMenu, + isFrame, } = rest; const theme = useTheme(); @@ -429,13 +430,13 @@ const Shell = ({ items = [], page = "home", ...rest }) => { {toast} {/* */} {withoutNavMenu ? <> : } - {currentDeviceType === DeviceType.mobile && } + {currentDeviceType === DeviceType.mobile && !isFrame && }
- {currentDeviceType !== DeviceType.mobile && } + {currentDeviceType !== DeviceType.mobile && !isFrame && }
@@ -543,6 +544,7 @@ const ShellWrapper = inject( setConvertPasswordDialogVisible, version, pagesWithoutNavMenu, + isFrame, }; }, )(observer(Shell)); diff --git a/packages/client/src/components/Article/Body/index.js b/packages/client/src/components/Article/Body/index.js index 68ce554105..059b8ac8f0 100644 --- a/packages/client/src/components/Article/Body/index.js +++ b/packages/client/src/components/Article/Body/index.js @@ -73,6 +73,7 @@ const ArticleBodyContent = (props) => { currentDeviceType, campaigns, userId, + isFrame, } = props; const navigate = useNavigate(); @@ -265,9 +266,11 @@ const ArticleBodyContent = (props) => { activeItemId={activeItemId} /> - {!isDesktopClient && showText && !firstLoad && campaigns.length > 0 && ( - - )} + {!isDesktopClient && + showText && + !firstLoad && + campaigns.length > 0 && + !isFrame && } ); }; @@ -314,6 +317,7 @@ export default inject( theme, setIsBurgerLoading, currentDeviceType, + isFrame, } = settingsStore; const { campaigns } = campaignsStore; @@ -346,6 +350,7 @@ export default inject( setSelection, currentDeviceType, campaigns, + isFrame, }; }, )(withTranslation([])(observer(ArticleBodyContent))); diff --git a/packages/client/src/store/ProfileActionsStore.js b/packages/client/src/store/ProfileActionsStore.js index 335c2356ff..64288e62a4 100644 --- a/packages/client/src/store/ProfileActionsStore.js +++ b/packages/client/src/store/ProfileActionsStore.js @@ -419,11 +419,7 @@ class ProfileActionsStore { }, ]; - if ( - !window.navigator.userAgent.includes("ZoomWebKit") && - !window.navigator.userAgent.includes("ZoomApps") && - showFrameSignOut - ) { + if (showFrameSignOut) { actions.push({ key: "user-menu-logout", icon: LogoutReactSvgUrl,