aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-11-01 21:25:10 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-11-01 21:25:10 -0800
commit1a06115aa27a0c1545b8eb9bfb38930fcb8b56bf (patch)
treecc839bff2fdba47c1774faef1605edfa6103012b
parent0802e051c2a27c4df5020f2a65a57504a762ad30 (diff)
downloadtrackermap-web-1a06115aa27a0c1545b8eb9bfb38930fcb8b56bf.tar.gz
trackermap-web-1a06115aa27a0c1545b8eb9bfb38930fcb8b56bf.tar.bz2
trackermap-web-1a06115aa27a0c1545b8eb9bfb38930fcb8b56bf.zip
Empty page for replay
-rw-r--r--modern/src/App.js2
-rw-r--r--modern/src/MainToolbar.js7
-rw-r--r--modern/src/reports/ReplayPage.js38
-rw-r--r--web/l10n/en.json1
4 files changed, 48 insertions, 0 deletions
diff --git a/modern/src/App.js b/modern/src/App.js
index 1f6b55a4..6fd5c007 100644
--- a/modern/src/App.js
+++ b/modern/src/App.js
@@ -14,6 +14,7 @@ import NotificationPage from './settings/NotificationPage';
import GroupsPage from './settings/GroupsPage';
import GroupPage from './settings/GroupPage';
import PositionPage from './PositionPage';
+import ReplayPage from './reports/ReplayPage';
const App = () => {
return (
@@ -23,6 +24,7 @@ const App = () => {
<Switch>
<Route exact path='/' component={MainPage} />
<Route exact path='/login' component={LoginPage} />
+ <Route exact path='/replay' component={ReplayPage} />
<Route exact path='/position/:id?' component={PositionPage} />
<Route exact path='/user/:id?' component={UserPage} />
<Route exact path='/device/:id?' component={DevicePage} />
diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js
index b4757d89..942aac67 100644
--- a/modern/src/MainToolbar.js
+++ b/modern/src/MainToolbar.js
@@ -29,6 +29,7 @@ import NotificationsActiveIcon from '@material-ui/icons/NotificationsActive';
import FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted';
import TrendingUpIcon from '@material-ui/icons/TrendingUp';
import FolderIcon from '@material-ui/icons/Folder';
+import ReplayIcon from '@material-ui/icons/Replay';
import t from './common/localization';
const useStyles = makeStyles(theme => ({
@@ -96,6 +97,12 @@ const MainToolbar = () => {
</ListItemIcon>
<ListItemText primary={t('mapTitle')} />
</ListItem>
+ <ListItem button onClick={() => history.push('/replay')}>
+ <ListItemIcon>
+ <ReplayIcon />
+ </ListItemIcon>
+ <ListItemText primary={t('reportReplay')} />
+ </ListItem>
</List>
<Divider />
<List
diff --git a/modern/src/reports/ReplayPage.js b/modern/src/reports/ReplayPage.js
new file mode 100644
index 00000000..826b361a
--- /dev/null
+++ b/modern/src/reports/ReplayPage.js
@@ -0,0 +1,38 @@
+import React from 'react';
+import { makeStyles } from '@material-ui/core';
+import MainToolbar from '../MainToolbar';
+import Map from '../map/Map';
+
+const useStyles = makeStyles(theme => ({
+ root: {
+ height: '100%',
+ display: 'flex',
+ flexDirection: 'column',
+ },
+ content: {
+ flexGrow: 1,
+ overflow: 'hidden',
+ display: 'flex',
+ flexDirection: 'row',
+ [theme.breakpoints.down('xs')]: {
+ flexDirection: 'column-reverse',
+ }
+ },
+ mapContainer: {
+ flexGrow: 1,
+ },
+}));
+
+const ReplayPage = () => {
+ const classes = useStyles();
+
+ return (
+ <div className={classes.root}>
+ <MainToolbar />
+ <Map>
+ </Map>
+ </div>
+ );
+}
+
+export default ReplayPage;
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 4f0825c5..2b24cf2d 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -380,6 +380,7 @@
"notificatorSms": "SMS",
"notificatorFirebase": "Firebase",
"notificatorTraccar": "Traccar",
+ "reportReplay": "Replay",
"reportRoute": "Route",
"reportEvents": "Events",
"reportTrips": "Trips",