diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-01 20:29:10 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-01 20:29:10 -0700 |
commit | d3bd766cbc81f51c9b13b82d0ca92ae819561ea8 (patch) | |
tree | 7f76d29ead2628b0d3c67ae8e0715b9666b30136 /modern/src/MainPage.js | |
parent | d01f563d3909582acbcfd4fe20fa271ee224aba3 (diff) | |
download | trackermap-web-d3bd766cbc81f51c9b13b82d0ca92ae819561ea8.tar.gz trackermap-web-d3bd766cbc81f51c9b13b82d0ca92ae819561ea8.tar.bz2 trackermap-web-d3bd766cbc81f51c9b13b82d0ca92ae819561ea8.zip |
Global mobile bottom menu
Diffstat (limited to 'modern/src/MainPage.js')
-rw-r--r-- | modern/src/MainPage.js | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index 0f6db95a..75af9666 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -28,7 +28,7 @@ import { devicesActions } from './store'; const useStyles = makeStyles((theme) => ({ root: { - height: '100vh', + height: '100%', }, sidebar: { display: 'flex', @@ -53,9 +53,6 @@ const useStyles = makeStyles((theme) => ({ transform: 'translateX(-100vw)', }, }, - paper: { - zIndex: 1, - }, toolbar: { display: 'flex', padding: theme.spacing(0, 1), @@ -101,6 +98,12 @@ const useStyles = makeStyles((theme) => ({ backgroundColor: 'white', }, }, + bottomMenu: { + position: 'fixed', + left: theme.spacing(1.5), + bottom: theme.spacing(1.5), + width: theme.dimensions.drawerWidthDesktop, + }, })); const MainPage = () => { @@ -147,7 +150,7 @@ const MainPage = () => { <div className={classes.sidebarToggleText}>{t('deviceTitle')}</div> </Button> <Paper square elevation={3} className={`${classes.sidebar} ${collapsed && classes.sidebarCollapsed}`}> - <Paper className={classes.paper} square elevation={3}> + <Paper square elevation={3}> <Toolbar className={classes.toolbar} disableGutters> {isTablet && ( <IconButton onClick={handleClose}> @@ -178,7 +181,11 @@ const MainPage = () => { <DevicesList filter={searchKeyword} /> </div> </Paper> - <BottomMenu /> + {!isPhone && !isTablet && ( + <div className={classes.bottomMenu}> + <BottomMenu /> + </div> + )} {selectedDeviceId && ( <div className={classes.statusCard}> <StatusCard |