From 94e7e64ec481cd004546f02869c1c0dd2904a406 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 25 Mar 2020 23:50:06 -0700 Subject: Add menu options --- modern/src/App.js | 2 ++ modern/src/MainToolbar.js | 64 ++++++++++++++++++++++++++++++++++++++++--- modern/src/RouteReportPage.js | 23 ++++++++++++++++ 3 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 modern/src/RouteReportPage.js (limited to 'modern/src') diff --git a/modern/src/App.js b/modern/src/App.js index 31b8b69b..0a7ad12e 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -3,6 +3,7 @@ import { Switch, Route } from 'react-router-dom' import CssBaseline from '@material-ui/core/CssBaseline'; import MainPage from './MainPage'; import LoginPage from './LoginPage'; +import RouteReportPage from './RouteReportPage'; class App extends Component { render() { @@ -12,6 +13,7 @@ class App extends Component { + ); diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js index 41382b0b..fc3281cd 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'; @@ -92,26 +93,81 @@ class MainToobar extends Component { onClick={this.closeDrawer} onKeyDown={this.closeDrawer}> - + this.props.history.push('/')}> + + + + {t('reportTitle')} + + }> + this.props.history.push('/reports/route')}> + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + {t('settingsTitle')} + + }> + + + + + + + + + + + + - + diff --git a/modern/src/RouteReportPage.js b/modern/src/RouteReportPage.js new file mode 100644 index 00000000..c444ffbc --- /dev/null +++ b/modern/src/RouteReportPage.js @@ -0,0 +1,23 @@ +import React, { Component } from 'react'; +import ContainerDimensions from 'react-container-dimensions'; +import MainToobar from './MainToolbar'; +import MainMap from './MainMap'; +import Drawer from '@material-ui/core/Drawer'; +import withStyles from '@material-ui/core/styles/withStyles'; +import SocketController from './SocketController'; +import withWidth, { isWidthUp } from '@material-ui/core/withWidth'; +import DeviceList from './DeviceList'; + +const styles = theme => ({}); + +class ReouteReportPage extends Component { + render() { + return ( +
+ +
+ ); + } +} + +export default withWidth()(withStyles(styles)(ReouteReportPage)); -- cgit v1.2.3