diff options
author | Anton Tananaev <anton@traccar.org> | 2022-10-18 17:19:20 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-10-18 17:19:20 -0700 |
commit | f2529d17e6594eaa62f982629c6cf1079a254a84 (patch) | |
tree | 5992bb0af6b861e74374fc43a820c71f8d6c5476 /modern/src/other | |
parent | c8d49e57b95e3e91e35740967e1197f251f0c754 (diff) | |
download | trackermap-web-f2529d17e6594eaa62f982629c6cf1079a254a84.tar.gz trackermap-web-f2529d17e6594eaa62f982629c6cf1079a254a84.tar.bz2 trackermap-web-f2529d17e6594eaa62f982629c6cf1079a254a84.zip |
Unify status card styles
Diffstat (limited to 'modern/src/other')
-rw-r--r-- | modern/src/other/EventPage.js | 28 | ||||
-rw-r--r-- | modern/src/other/ReplayPage.js | 26 |
2 files changed, 13 insertions, 41 deletions
diff --git a/modern/src/other/EventPage.js b/modern/src/other/EventPage.js index b040bfb3..9da8be79 100644 --- a/modern/src/other/EventPage.js +++ b/modern/src/other/EventPage.js @@ -14,7 +14,7 @@ import MapPositions from '../map/MapPositions'; import MapGeofence from '../map/MapGeofence'; import StatusCard from '../common/components/StatusCard'; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles(() => ({ root: { height: '100%', display: 'flex', @@ -26,18 +26,6 @@ const useStyles = makeStyles((theme) => ({ mapContainer: { flexGrow: 1, }, - statusCard: { - position: 'fixed', - zIndex: 5, - left: '50%', - [theme.breakpoints.up('md')]: { - bottom: theme.spacing(3), - }, - [theme.breakpoints.down('md')]: { - bottom: `calc(${theme.spacing(3)} + ${theme.dimensions.bottomBarHeight}px)`, - }, - transform: 'translateX(-50%)', - }, })); const EventPage = () => { @@ -97,14 +85,12 @@ const EventPage = () => { </MapView> {position && <MapCamera latitude={position.latitude} longitude={position.longitude} />} {position && showCard && ( - <div className={classes.statusCard}> - <StatusCard - deviceId={position.deviceId} - position={position} - onClose={() => setShowCard(false)} - disableActions - /> - </div> + <StatusCard + deviceId={position.deviceId} + position={position} + onClose={() => setShowCard(false)} + disableActions + /> )} </div> </div> diff --git a/modern/src/other/ReplayPage.js b/modern/src/other/ReplayPage.js index ee9e15d9..ab549eba 100644 --- a/modern/src/other/ReplayPage.js +++ b/modern/src/other/ReplayPage.js @@ -73,18 +73,6 @@ const useStyles = makeStyles((theme) => ({ marginTop: theme.spacing(1), }, }, - statusCard: { - position: 'fixed', - zIndex: 5, - left: '50%', - [theme.breakpoints.up('md')]: { - bottom: theme.spacing(3), - }, - [theme.breakpoints.down('md')]: { - bottom: `calc(${theme.spacing(3)} + ${theme.dimensions.bottomBarHeight}px)`, - }, - transform: 'translateX(-50%)', - }, })); const ReplayPage = () => { @@ -228,14 +216,12 @@ const ReplayPage = () => { </Paper> </div> {showCard && index < positions.length && ( - <div className={classes.statusCard}> - <StatusCard - deviceId={selectedDeviceId} - position={positions[index]} - onClose={() => setShowCard(false)} - disableActions - /> - </div> + <StatusCard + deviceId={selectedDeviceId} + position={positions[index]} + onClose={() => setShowCard(false)} + disableActions + /> )} </div> ); |