From 1e38ec1ceceeb60693b4fe3c302ce5477caddf40 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Tue, 14 Dec 2021 19:02:16 -0600 Subject: Hours only shown for backhoes and tractors, changed favicon.ico, replay slider previous and back buttons, and other improvements --- modern/src/reports/ReplayPage.js | 43 +++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 14 deletions(-) (limited to 'modern/src/reports') diff --git a/modern/src/reports/ReplayPage.js b/modern/src/reports/ReplayPage.js index bb32daa..5d2b803 100644 --- a/modern/src/reports/ReplayPage.js +++ b/modern/src/reports/ReplayPage.js @@ -1,13 +1,17 @@ import React, { useState } from 'react'; import { - Accordion, AccordionDetails, AccordionSummary, Container, makeStyles, Paper, Slider, Tooltip, Typography, + Accordion, AccordionDetails, AccordionSummary, Container, makeStyles, Paper, Slider, Tooltip, Typography, IconButton, Box } from '@material-ui/core'; + import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; +import SkipNextIcon from '@material-ui/icons/SkipNext'; +import SkipPreviousIcon from '@material-ui/icons/SkipPrevious'; + import MainToolbar from '../MainToolbar'; import Map from '../map/Map'; import ReplayPathMap from '../map/ReplayPathMap'; import PositionsMap from '../map/PositionsMap'; -import { formatPosition } from '../common/formatter'; +import { formatPosition, formatDate } from '../common/formatter'; import ReportFilter from './ReportFilter'; import { useTranslation } from '../LocalizationProvider'; @@ -68,18 +72,29 @@ const ReplayPage = () => { {!!positions.length && ( - - ({ value: index }))} - value={index} - onChange={(_, index) => setIndex(index)} - valueLabelDisplay="auto" - valueLabelFormat={(i) => (i < positions.length ? formatPosition(positions[i], 'fixTime', t) : '')} - ValueLabelComponent={TimeLabel} - /> - + + + setIndex(index - 1)}> + + + + {formatDate(positions[index].deviceTime)} + + setIndex(index + 1)}> + + + + ({ value: index }))} + value={index} + onChange={(_, index) => setIndex(index)} + valueLabelDisplay="auto" + valueLabelFormat={(i) => (i < positions.length ? formatPosition(positions[i], 'fixTime', t) : '')} + ValueLabelComponent={TimeLabel} + /> + )}
setExpanded(!expanded)}> -- cgit v1.2.3