aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorditoaugusta <dt_ap@ymail.com>2020-03-28 02:38:14 +0700
committerditoaugusta <dt_ap@ymail.com>2020-03-28 02:38:14 +0700
commit84da0d600ce4b048615b7e6a502c4feea9902eed (patch)
tree090c13739d1b64e23ea2e8d68f7e762c88c77447
parent8f74f238634f4779b0ada63b52b10a030d352899 (diff)
downloadetbsa-traccar-web-84da0d600ce4b048615b7e6a502c4feea9902eed.tar.gz
etbsa-traccar-web-84da0d600ce4b048615b7e6a502c4feea9902eed.tar.bz2
etbsa-traccar-web-84da0d600ce4b048615b7e6a502c4feea9902eed.zip
fix: jsx lines
-rw-r--r--modern/src/MainPage.js38
-rw-r--r--modern/src/MainToolbar.js200
2 files changed, 121 insertions, 117 deletions
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js
index f6dd7fe..4362569 100644
--- a/modern/src/MainPage.js
+++ b/modern/src/MainPage.js
@@ -53,26 +53,28 @@ const MainPage = () => {
});
}, [history]);
- return (loading ? (<div>Loading...</div>) : (<div className={classes.root}>
- <SocketController />
- <MainToobar />
- <div className={classes.content}>
- { /* <Drawer
- anchor={isWidthUp('sm', this.props.width) ? "left" : "bottom"} NOTE: What's this do?
- variant="permanent"
- classes={{ paper: classes.drawerPaper }}> */}
- <Drawer
- variant="permanent"
- classes={{ paper: classes.drawerPaper }}>
- <DeviceList />
- </Drawer>
- <div className={classes.mapContainer}>
- <ContainerDimensions>
- <MainMap />
- </ContainerDimensions>
+ return loading ? (<div>Loading...</div>) : (
+ <div className={classes.root}>
+ <SocketController />
+ <MainToobar />
+ <div className={classes.content}>
+ {/* <Drawer
+ anchor={isWidthUp('sm', this.props.width) ? "left" : "bottom"} NOTE: What's this do?
+ variant="permanent"
+ classes={{ paper: classes.drawerPaper }}> */}
+ <Drawer
+ variant="permanent"
+ classes={{ paper: classes.drawerPaper }}>
+ <DeviceList />
+ </Drawer>
+ <div className={classes.mapContainer}>
+ <ContainerDimensions>
+ <MainMap />
+ </ContainerDimensions>
+ </div>
</div>
</div>
- </div>));
+ );
}
export default MainPage;
diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js
index 9c2e811..bf4aa40 100644
--- a/modern/src/MainToolbar.js
+++ b/modern/src/MainToolbar.js
@@ -51,106 +51,108 @@ const MainToolbar = () => {
})
}
- return (<>
- <AppBar position="static" className={classes.appBar}>
- <Toolbar>
- <IconButton
- className={classes.menuButton}
- color="inherit"
- onClick={openDrawer}>
- <MenuIcon />
- </IconButton>
- <Typography variant="h6" color="inherit" className={classes.flex}>
- Traccar
+ return (
+ <>
+ <AppBar position="static" className={classes.appBar}>
+ <Toolbar>
+ <IconButton
+ className={classes.menuButton}
+ color="inherit"
+ onClick={openDrawer}>
+ <MenuIcon />
+ </IconButton>
+ <Typography variant="h6" color="inherit" className={classes.flex}>
+ Traccar
</Typography>
- <Button color="inherit" onClick={handleLogout}>{t('loginLogout')}</Button>
- </Toolbar>
- </AppBar>
- <Drawer open={drawer} onClose={closeDrawer}>
- <div
- tabIndex={0}
- className={classes.list}
- role="button"
- onClick={closeDrawer}
- onKeyDown={closeDrawer}>
- <List>
- <ListItem button onClick={() => history.push('/')}>
- <ListItemIcon>
- <DashboardIcon />
- </ListItemIcon>
- <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={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
- 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={t('sharedNotifications')} />
- </ListItem>
- </List>
- </div>
- </Drawer>
- </>);
+ <Button color="inherit" onClick={handleLogout}>{t('loginLogout')}</Button>
+ </Toolbar>
+ </AppBar>
+ <Drawer open={drawer} onClose={closeDrawer}>
+ <div
+ tabIndex={0}
+ className={classes.list}
+ role="button"
+ onClick={closeDrawer}
+ onKeyDown={closeDrawer}>
+ <List>
+ <ListItem button onClick={() => history.push('/')}>
+ <ListItemIcon>
+ <DashboardIcon />
+ </ListItemIcon>
+ <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={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
+ 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={t('sharedNotifications')} />
+ </ListItem>
+ </List>
+ </div>
+ </Drawer>
+ </>
+ );
}
export default MainToolbar;