diff --git a/Client/src/Components/Sidebar/index.css b/Client/src/Components/Sidebar/index.css index 10cdfc77d..8ce0089bc 100644 --- a/Client/src/Components/Sidebar/index.css +++ b/Client/src/Components/Sidebar/index.css @@ -76,16 +76,19 @@ aside .MuiCollapse-wrapperInner .MuiList-root > .MuiListItemButton-root::after { content: ""; position: absolute; left: -8px; - top: 50%; - transform: translateY(-50%); + top: 45%; height: 3px; width: 3px; border-radius: 50%; background-color: #d6d9dd; } -aside { - transition: flex 300ms ease-out; +aside + .MuiCollapse-wrapperInner + .MuiList-root + > .selected-path.MuiListItemButton-root::after { + background-color: var(--env-var-color-2); + transform: scale(1.2); } .sidebar-popup .MuiPaper-root { @@ -95,7 +98,7 @@ aside { gap: 1px; } .sidebar-popup .MuiList-root { - padding: 6px 6px; + padding: 3px; min-width: 100px; } .sidebar-popup li.MuiButtonBase-root { @@ -104,21 +107,65 @@ aside { padding: 5px 8px; border-radius: var(--env-var-radius-1); } -.sidebar-popup li.MuiButtonBase-root:hover{ +.sidebar-popup li.MuiButtonBase-root:hover { background-color: var(--env-var-color-13); } -.sidebar-popup li.MuiButtonBase-root:has(.MuiBox-root):hover{ +.sidebar-popup li.MuiButtonBase-root:has(.MuiBox-root):hover { background-color: white; } -.sidebar-popup li.MuiButtonBase-root:has(.MuiBox-root){ +.sidebar-popup li.MuiButtonBase-root:has(.MuiBox-root) { padding-bottom: 0; } .sidebar-popup .MuiModal-root p.MuiTypography-root { font-size: var(--env-var-font-size-medium); color: var(--env-var-color-2); } -.sidebar-popup svg{ +.sidebar-popup svg { width: 16px; height: 16px; opacity: 0.9; } + +/* TRANSITIONS */ +aside { + flex: 1; + transition: max-width 650ms cubic-bezier(0.36, -0.01, 0, 0.77); +} +.home-layout aside.collapsed { + max-width: 64px; +} + +aside.expanded .MuiTypography-root, +aside.expanded p.MuiTypography-root, +aside.expanded .MuiListItemText-root + svg, +aside.expanded .MuiAvatar-root + .MuiBox-root + .MuiIconButton-root { + visibility: visible; + animation: fadeIn 1s ease; +} + +aside.collapsed .MuiTypography-root, +aside.collapsed p.MuiTypography-root, +aside.collapsed .MuiListItemText-root + svg, +aside.collapsed .MuiAvatar-root + .MuiBox-root + .MuiIconButton-root { + opacity: 0; + visibility: hidden; +} + +aside .MuiListSubheader-root { + transition: all 200ms ease; +} + +@keyframes fadeIn { + 0% { + opacity: 0; + visibility: hidden; + } + 30% { + opacity: 0; + visibility: hidden; + } + 100% { + opacity: 0.9; + visibility: visible; + } +} diff --git a/Client/src/Components/Sidebar/index.jsx b/Client/src/Components/Sidebar/index.jsx index 69b44c125..f1bfcb719 100644 --- a/Client/src/Components/Sidebar/index.jsx +++ b/Client/src/Components/Sidebar/index.jsx @@ -26,8 +26,6 @@ import LockSvg from "../../assets/icons/lock.svg?react"; import UserSvg from "../../assets/icons/user.svg?react"; import TeamSvg from "../../assets/icons/user-two.svg?react"; import LogoutSvg from "../../assets/icons/logout.svg?react"; -import BWULogo from "../../assets/Images/bwl-logo.svg?react"; -import BWULogoAbbreviated from "../../assets/icons/bwu-abbreviated.svg?react"; import Support from "../../assets/icons/support.svg?react"; import Dashboard from "../../assets/icons/dashboard.svg?react"; import Account from "../../assets/icons/user-edit.svg?react"; @@ -125,24 +123,41 @@ function Sidebar() { return ( - - {collapsed ? ( - - ) : ( - - )} + + + + BU + + + BlueWave Uptime + + dispatch(toggleSidebar())} + onClick={() => { + setOpen({ Dashboard: false, Account: false }); + dispatch(toggleSidebar()); + }} > {collapsed ? : } @@ -175,14 +193,13 @@ function Sidebar() { id="nested-menu-subheader" sx={{ pt: theme.gap.small, - px: collapsed ? theme.gap.xs : theme.gap.ml, - textAlign: collapsed ? "center" : "left", + px: collapsed ? theme.gap.xs : theme.gap.small, }} > Menu } - sx={{ px: collapsed ? theme.gap.xs : theme.gap.ml }} + sx={{ px: theme.gap.medium }} > {menu.map((item) => item.path ? ( @@ -210,13 +227,14 @@ function Sidebar() { } onClick={() => navigate(`/${item.path}`)} sx={{ - gap: theme.gap.medium, + height: "37px", + gap: theme.gap.small, borderRadius: `${theme.shape.borderRadius}px`, - justifyContent: collapsed ? "center" : "flex-start", + px: theme.gap.small, }} > {item.icon} - {!collapsed && {item.name}} + {item.name} ) : collapsed ? ( @@ -247,13 +265,13 @@ function Sidebar() { onClick={(event) => openPopup(event, item.name)} sx={{ position: "relative", - gap: theme.gap.medium, + gap: theme.gap.small, borderRadius: `${theme.shape.borderRadius}px`, - justifyContent: collapsed ? "center" : "flex-start", + px: theme.gap.small, }} > {item.icon} - {!collapsed && {item.name}} + {item.name} {item.nested.map((child) => { if ( @@ -292,6 +310,7 @@ function Sidebar() { gap: theme.gap.small, borderRadius: `${theme.shape.borderRadius}px`, pl: theme.gap.small, + mb:"1px" }} > {child.icon} @@ -311,9 +330,9 @@ function Sidebar() { })) } sx={{ - gap: theme.gap.medium, + gap: theme.gap.small, borderRadius: `${theme.shape.borderRadius}px`, - justifyContent: collapsed ? "center" : "flex-start", + px: theme.gap.small, }} > {item.icon} @@ -324,7 +343,7 @@ function Sidebar() { {item.nested.map((child) => { if ( @@ -374,14 +393,13 @@ function Sidebar() { id="nested-other-subheader" sx={{ pt: theme.gap.small, - px: collapsed ? theme.gap.xs : theme.gap.ml, - textAlign: collapsed ? "center" : "left", + px: collapsed ? 0 : theme.gap.small, }} > Other } - sx={{ px: collapsed ? theme.gap.xs : theme.gap.ml }} + sx={{ px: theme.gap.medium }} > {other.map((item) => ( {item.icon} - {!collapsed && {item.name}} + {item.name} ))} @@ -432,10 +450,9 @@ function Sidebar() { diff --git a/Client/src/Pages/Monitors/index.jsx b/Client/src/Pages/Monitors/index.jsx index dc293ef49..15c98ce24 100644 --- a/Client/src/Pages/Monitors/index.jsx +++ b/Client/src/Pages/Monitors/index.jsx @@ -437,6 +437,7 @@ const Monitors = () => { - - -