mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update responsive drawer breakpoint
This commit is contained in:
parent
81192057e6
commit
09b80ba151
4 changed files with 11 additions and 11 deletions
|
@ -20,7 +20,7 @@ const AppLayout = () => {
|
|||
const { user } = useApi();
|
||||
const location = useLocation();
|
||||
|
||||
const isSmallScreen = useMediaQuery((t: Theme) => t.breakpoints.up('sm'));
|
||||
const isMediumScreen = useMediaQuery((t: Theme) => t.breakpoints.up('md'));
|
||||
const isDrawerAvailable = isDrawerPath(location.pathname) && Boolean(user);
|
||||
const isDrawerOpen = isDrawerActive && isDrawerAvailable;
|
||||
|
||||
|
@ -36,16 +36,16 @@ const AppLayout = () => {
|
|||
sx={{
|
||||
width: {
|
||||
xs: '100%',
|
||||
sm: isDrawerAvailable ? `calc(100% - ${DRAWER_WIDTH}px)` : '100%'
|
||||
md: isDrawerAvailable ? `calc(100% - ${DRAWER_WIDTH}px)` : '100%'
|
||||
},
|
||||
ml: {
|
||||
xs: 0,
|
||||
sm: isDrawerAvailable ? DRAWER_WIDTH : 0
|
||||
md: isDrawerAvailable ? DRAWER_WIDTH : 0
|
||||
}
|
||||
}}
|
||||
>
|
||||
<AppToolbar
|
||||
isDrawerAvailable={!isSmallScreen && isDrawerAvailable}
|
||||
isDrawerAvailable={!isMediumScreen && isDrawerAvailable}
|
||||
isDrawerOpen={isDrawerOpen}
|
||||
onDrawerButtonClick={onToggleDrawer}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue