diff --git a/frontend/app/Router.tsx b/frontend/app/Router.tsx index e31d5273d..101fba9e8 100644 --- a/frontend/app/Router.tsx +++ b/frontend/app/Router.tsx @@ -271,7 +271,6 @@ const Router: React.FC = (props) => { - {!isEnterprise && !isPlayer && } ) : diff --git a/frontend/app/components/shared/ProjectDropdown/ProjectDropdown.tsx b/frontend/app/components/shared/ProjectDropdown/ProjectDropdown.tsx index eda9c5a78..e5b23caec 100644 --- a/frontend/app/components/shared/ProjectDropdown/ProjectDropdown.tsx +++ b/frontend/app/components/shared/ProjectDropdown/ProjectDropdown.tsx @@ -39,8 +39,6 @@ function ProjectDropdown(props: Props) { const showCurrent = hasSiteId(location.pathname) || siteChangeAvailable(location.pathname); const { showModal, hideModal } = useModal(); - console.log('activeSite', activeSite); - const handleSiteChange = (newSiteId: string) => { props.setSiteId(newSiteId); // Fixed: should set the new siteId, not the existing one props.fetchIntegrationVariables(); diff --git a/frontend/app/layout/Logo.tsx b/frontend/app/layout/Logo.tsx index f38e93e74..5ddc3634d 100644 --- a/frontend/app/layout/Logo.tsx +++ b/frontend/app/layout/Logo.tsx @@ -15,7 +15,7 @@ function Logo(props: Props) { return ( ); diff --git a/frontend/app/layout/SideMenu.tsx b/frontend/app/layout/SideMenu.tsx index c4ef8ef7b..9e57add1a 100644 --- a/frontend/app/layout/SideMenu.tsx +++ b/frontend/app/layout/SideMenu.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Divider, Menu, Typography } from 'antd'; +import { Divider, Menu, Typography, Drawer, Button, Space } from 'antd'; import SVG from 'UI/SVG'; import * as routes from 'App/routes'; import { client, CLIENT_DEFAULT_TAB, CLIENT_TABS, withSiteId } from 'App/routes'; @@ -8,8 +8,10 @@ import { categories as main_menu, MENU, preferences, PREFERENCES_MENU } from './ import { connect } from 'react-redux'; import { MODULES } from 'Components/Client/Modules'; import cn from 'classnames'; -import { Icon as IconX } from 'UI'; -import Icon from '@ant-design/icons'; +import { Icon } from 'UI'; +import { ArrowRightOutlined } from '@ant-design/icons'; +import SupportModal from 'App/layout/SupportModal'; + const { Text } = Typography; @@ -24,7 +26,7 @@ function SideMenu(props: RouteComponentProps) { // @ts-ignore const { siteId, modules } = props; const isPreferencesActive = props.location.pathname.includes('/client/'); - console.log('modules', modules); + const [supportOpen, setSupportOpen] = React.useState(false); let menu = isPreferencesActive ? preferences : main_menu; @@ -76,6 +78,10 @@ function SideMenu(props: RouteComponentProps) { }; const handleClick = (item: any) => { + if (item.key === MENU.SUPPORT) { + setSupportOpen(true); + return; + } const handler = menuRoutes[item.key]; if (handler) { const route = handler(); @@ -100,44 +106,50 @@ function SideMenu(props: RouteComponentProps) { return ( - - {isPreferencesActive && - }> - Exit - } - {(isPreferencesActive ? preferences : main_menu).map((category, index) => ( - - {index > 0 && } - {category.title}}> - {category.items.filter((item: any) => !item.hidden).map((item: any) => { - const isActive = isMenuItemActive(item.key); - return item.children ? ( - {item.label}} - icon={}> - {item.children.map((child: any) => {child.label})} - - ) : ( - } - style={{ color: '#333', height: '32px' }} - className={cn('!rounded', { 'ant-menu-item-selected !bg-active-dark-blue': isActive })} - itemIcon={item.leading ? - : null}> - {item.label} - - ); - })} - - - ))} - + <> + + {isPreferencesActive && + }> + Exit + } + {(isPreferencesActive ? preferences : main_menu).map((category, index) => ( + + {index > 0 && } + {category.title}}> + {category.items.filter((item: any) => !item.hidden).map((item: any) => { + const isActive = isMenuItemActive(item.key); + return item.children ? ( + {item.label}} + icon={}> + {item.children.map((child: any) => {child.label})} + + ) : ( + } + style={{ color: '#333', height: '32px' }} + className={cn('!rounded', { 'ant-menu-item-selected !bg-active-dark-blue': isActive })} + itemIcon={item.leading ? + : null}> + {item.label} + + ); + })} + + + ))} + + { + setSupportOpen(false); + }} open={supportOpen} /> + ); } diff --git a/frontend/app/layout/SupportModal.tsx b/frontend/app/layout/SupportModal.tsx new file mode 100644 index 000000000..34821450d --- /dev/null +++ b/frontend/app/layout/SupportModal.tsx @@ -0,0 +1,80 @@ +import React from 'react'; +import { Icon } from 'UI'; +import { Button, Drawer, Space, Typography } from 'antd'; +import { ArrowRightOutlined } from '@ant-design/icons'; + +const { Text } = Typography; + +interface Props { + onClose: () => void; + open: boolean; +} + +function SupportModal(props: Props) { + const { onClose, open } = props; + const WEBSITE_ID = window.env.CRISP_KEY; + return ( + +
+
+
+ +
+
+ Documentation + + Deploy, manage and customize OpenReplay through quick starts, tutorials, samples, and guides. + +
+ +
+
+ +
+ +
+
+ +
+
+ Slack Community + + Ask OpenReplay community and get quick resolution to your questions from 1000+ members. + +
+ +
+
+ +
+ + {!!WEBSITE_ID && ( +
+