sidebar tweak

This commit is contained in:
Alex Holliday committed 2026-02-11 18:34:55 +00:00
1 parent 6f6920f3b2
commit e214d9a54c
2 files changed
+73 -63

No files matched your search

@@ -76,7 +76,7 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) =>
alignItems="center" alignItems="center"
py={theme.spacing(4)} py={theme.spacing(4)}
px={theme.spacing(8)} px={theme.spacing(8)}
gap={theme.spacing(2)} gap={theme.spacing(4)}
> >
<Avatar <Avatar
small small
+72 -62
View File
@@ -1,4 +1,5 @@
import { useEffect } from "react"; import { useEffect } from "react";
import Backdrop from "@mui/material/Backdrop";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import List from "@mui/material/List"; import List from "@mui/material/List";
import Divider from "@mui/material/Divider"; import Divider from "@mui/material/Divider";
@@ -51,71 +52,80 @@ export const Sidebar = () => {
}; };
return ( return (
<Stack <>
component="aside" <Backdrop
position={isSmall ? "fixed" : "sticky"} open={!collapsed && isSmall}
top={0} onClick={() => dispatch(setCollapsed({ collapsed: true }))}
left={0} sx={{ zIndex: 999 }}
minHeight={"100vh"} />
maxHeight={"100vh"} <Stack
paddingTop={theme.spacing(6)} component="aside"
paddingBottom={theme.spacing(6)} position={isSmall ? "fixed" : "sticky"}
gap={theme.spacing(6)} top={0}
borderRight={`1px solid ${theme.palette.divider}`} left={0}
width={width} minHeight={"100vh"}
sx={{ maxHeight={"100vh"}
transition: transition, paddingTop={theme.spacing(6)}
zIndex: isSmall ? (t) => t.zIndex.drawer : "auto", paddingBottom={theme.spacing(6)}
}} gap={theme.spacing(6)}
> borderRight={`1px solid ${theme.palette.divider}`}
<List width={width}
component="nav"
disablePadding
sx={{ sx={{
px: theme.spacing(6), touchAction: "none",
flex: 1, transition: transition,
zIndex: 1000,
backdropFilter: "blur(8px)",
}} }}
> >
<Logo <List
pt={theme.spacing(8)} component="nav"
pb={theme.spacing(10)} disablePadding
/> sx={{
{menu.map((item) => { px: theme.spacing(6),
const selected = location.pathname.startsWith(`/${item.path}`); flex: 1,
return ( }}
<NavItem >
key={item.path} <Logo
item={item} pt={theme.spacing(8)}
selected={selected} pb={theme.spacing(10)}
onClick={() => handleNavClick(item.path)} />
/> {menu.map((item) => {
); const selected = location.pathname.startsWith(`/${item.path}`);
})} return (
</List> <NavItem
<StarPrompt /> key={item.path}
<List item={item}
component="nav" selected={selected}
disablePadding onClick={() => handleNavClick(item.path)}
sx={{ px: theme.spacing(6) }} />
> );
{bottomMenu.map((item) => { })}
const selected = location.pathname.startsWith(`/${item.path}`); </List>
return ( <StarPrompt />
<NavItem <List
key={item.path} component="nav"
item={item} disablePadding
selected={selected} sx={{ px: theme.spacing(6) }}
onClick={() => handleNavClick(item.path)} >
/> {bottomMenu.map((item) => {
); const selected = location.pathname.startsWith(`/${item.path}`);
})} return (
</List> <NavItem
<Divider sx={{ borderColor: theme.palette.divider }} /> key={item.path}
item={item}
selected={selected}
onClick={() => handleNavClick(item.path)}
/>
);
})}
</List>
<Divider sx={{ borderColor: theme.palette.divider }} />
<AuthFooter <AuthFooter
collapsed={collapsed} collapsed={collapsed}
accountMenuItems={accountMenu} accountMenuItems={accountMenu}
/> />
</Stack> </Stack>
</>
); );
}; };