diff --git a/frontend/app/initialize.tsx b/frontend/app/initialize.tsx index 0928cea07..0157f48de 100644 --- a/frontend/app/initialize.tsx +++ b/frontend/app/initialize.tsx @@ -35,7 +35,12 @@ const customTheme: ThemeConfig = { itemActiveBg: colors['active-blue'], itemSelectedBg: colors['active-blue'], - itemSelectedColor: colors['teal'] + itemSelectedColor: colors['teal'], + + itemMarginBlock: 0, + itemPaddingInline: 50, + iconMarginInlineEnd: 14, + collapsedWidth: 180, }, Button: { colorPrimary: colors.teal diff --git a/frontend/app/layout/SideMenu.tsx b/frontend/app/layout/SideMenu.tsx index b88f77295..87710ca05 100644 --- a/frontend/app/layout/SideMenu.tsx +++ b/frontend/app/layout/SideMenu.tsx @@ -47,14 +47,14 @@ function SideMenu(props: Props) { const updatedItems = category.items.map(item => { if (item.hidden) return item; - const isHidden = [ - (item.key === MENU.NOTES && modules.includes(MODULES.NOTES)), - (item.key === MENU.LIVE_SESSIONS || item.key === MENU.RECORDINGS || item.key === MENU.STATS) && modules.includes(MODULES.ASSIST), - (item.key === MENU.SESSIONS && modules.includes(MODULES.OFFLINE_RECORDINGS)), - (item.key === MENU.ALERTS && modules.includes(MODULES.ALERTS)), - (item.isAdmin && !isAdmin), - (item.isEnterprise && !isEnterprise) - ].some(cond => cond); + const isHidden = [ + (item.key === MENU.NOTES && modules.includes(MODULES.NOTES)), + (item.key === MENU.LIVE_SESSIONS || item.key === MENU.RECORDINGS || item.key === MENU.STATS) && modules.includes(MODULES.ASSIST), + (item.key === MENU.SESSIONS && modules.includes(MODULES.OFFLINE_RECORDINGS)), + (item.key === MENU.ALERTS && modules.includes(MODULES.ALERTS)), + (item.isAdmin && !isAdmin), + (item.isEnterprise && !isEnterprise) + ].some(cond => cond); return { ...item, hidden: isHidden }; }); @@ -81,7 +81,7 @@ function SideMenu(props: Props) { const menuRoutes: any = { - exit: () => props.history.push(withSiteId(routes.sessions(), siteId)), + [MENU.EXIT]: () => props.history.push(withSiteId(routes.sessions(), siteId)), [MENU.SESSIONS]: () => withSiteId(routes.sessions(), siteId), [MENU.BOOKMARKS]: () => withSiteId(routes.bookmarks(), siteId), [MENU.NOTES]: () => withSiteId(routes.notes(), siteId), @@ -122,7 +122,7 @@ function SideMenu(props: Props) { const isMenuItemActive = (key: string) => { const { pathname } = location; const activeRoute = menuRoutes[key]; - if (activeRoute) { + if (activeRoute && !key.includes('exit')) { const route = activeRoute(); return pathname.startsWith(route); } @@ -142,17 +142,6 @@ function SideMenu(props: Props) { style={{ marginTop: '8px', border: 'none' }} selectedKeys={menu.flatMap(category => category.items.filter((item: any) => isMenuItemActive(item.key)).map(item => item.key))} > - {isPreferencesActive && ( -