diff options
author | ditoaugusta <dt_ap@ymail.com> | 2020-03-27 18:30:47 +0700 |
---|---|---|
committer | ditoaugusta <dt_ap@ymail.com> | 2020-03-27 18:30:47 +0700 |
commit | 114604e02eea84d3de78fb340f1c91c72b46e904 (patch) | |
tree | 8ef061009cd1823ccadd06d28113c254dde0ec5a /modern/src/MainToolbar.js | |
parent | 8bef4f04c2b0b203450fe5753b6109a0b0d04e82 (diff) | |
parent | 79c36b9a84623fb99db0ab71cc9a31391f06489e (diff) | |
download | trackermap-web-114604e02eea84d3de78fb340f1c91c72b46e904.tar.gz trackermap-web-114604e02eea84d3de78fb340f1c91c72b46e904.tar.bz2 trackermap-web-114604e02eea84d3de78fb340f1c91c72b46e904.zip |
Merge branch 'master' of https://github.com/traccar/traccar-web into experimental/hooks
Diffstat (limited to 'modern/src/MainToolbar.js')
-rw-r--r-- | modern/src/MainToolbar.js | 68 |
1 files changed, 61 insertions, 7 deletions
diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js index 9ec89a2f..9c2e811b 100644 --- a/modern/src/MainToolbar.js +++ b/modern/src/MainToolbar.js @@ -9,6 +9,7 @@ import IconButton from '@material-ui/core/IconButton'; import MenuIcon from '@material-ui/icons/Menu'; import Drawer from '@material-ui/core/Drawer'; import List from '@material-ui/core/List'; +import ListSubheader from '@material-ui/core/ListSubheader'; import Divider from '@material-ui/core/Divider'; import ListItem from '@material-ui/core/ListItem'; import ListItemIcon from '@material-ui/core/ListItemIcon'; @@ -16,6 +17,7 @@ import ListItemText from '@material-ui/core/ListItemText'; import DashboardIcon from '@material-ui/icons/Dashboard'; import BarChartIcon from '@material-ui/icons/BarChart'; import SettingsIcon from '@material-ui/icons/Settings'; +import t from './common/localization'; const useStyles = makeStyles(theme => ({ flex: { @@ -60,8 +62,8 @@ const MainToolbar = () => { </IconButton> <Typography variant="h6" color="inherit" className={classes.flex}> Traccar - </Typography> - <Button color="inherit" onClick={handleLogout}>Logout</Button> + </Typography> + <Button color="inherit" onClick={handleLogout}>{t('loginLogout')}</Button> </Toolbar> </AppBar> <Drawer open={drawer} onClose={closeDrawer}> @@ -72,26 +74,78 @@ const MainToolbar = () => { onClick={closeDrawer} onKeyDown={closeDrawer}> <List> - <ListItem button> + <ListItem button onClick={() => history.push('/')}> <ListItemIcon> <DashboardIcon /> </ListItemIcon> - <ListItemText primary="Dashboard" /> + <ListItemText primary={t('mapTitle')} /> + </ListItem> + </List> + <Divider /> + <List subheader={<ListSubheader> + {t('reportTitle')} + </ListSubheader>}> + <ListItem button onClick={() => { history.push('/reports/route') }}> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportRoute')} /> </ListItem> <ListItem button disabled> <ListItemIcon> <BarChartIcon /> </ListItemIcon> - <ListItemText primary="Reports" /> + <ListItemText primary={t('reportEvents')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportTrips')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportStops')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportSummary')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportChart')} /> </ListItem> </List> <Divider /> - <List> + <List + subheader={ + <ListSubheader> + {t('settingsTitle')} + </ListSubheader> + }> + <ListItem button disabled> + <ListItemIcon> + <SettingsIcon /> + </ListItemIcon> + <ListItemText primary={t('settingsUser')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <SettingsIcon /> + </ListItemIcon> + <ListItemText primary={t('settingsServer')} /> + </ListItem> <ListItem button disabled> <ListItemIcon> <SettingsIcon /> </ListItemIcon> - <ListItemText primary="Settings" /> + <ListItemText primary={t('sharedNotifications')} /> </ListItem> </List> </div> |