From f22c36eb475aa515c3991caff98605d67f1f18e0 Mon Sep 17 00:00:00 2001 From: Desmond Kyeremeh Date: Tue, 20 Jul 2021 22:30:36 +0000 Subject: Use ignition icon --- modern/src/DevicesList.js | 15 ++++++++++----- modern/src/MainPage.js | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'modern/src') diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js index b06f7f7..3ffd421 100644 --- a/modern/src/DevicesList.js +++ b/modern/src/DevicesList.js @@ -9,10 +9,11 @@ import ListItemAvatar from '@material-ui/core/ListItemAvatar'; import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; import Grid from '@material-ui/core/Grid'; import ListItemText from '@material-ui/core/ListItemText'; +import SvgIcon from '@material-ui/core/SvgIcon'; import { FixedSizeList } from 'react-window'; import AutoSizer from 'react-virtualized-auto-sizer'; import BatteryFullIcon from '@material-ui/icons/BatteryFull'; -import VpnKeyIcon from '@material-ui/icons/VpnKey'; +import { ReactComponent as IgnitionIcon } from '../public/images/icon/ignition.svg'; import { devicesActions } from './store'; import EditCollectionView from './EditCollectionView'; @@ -48,6 +49,9 @@ const useStyles = makeStyles((theme) => ({ gray: { color: theme.palette.common.gray, }, + indicators: { + lineHeight: 1, + }, })); const getStatusColor = (status) => { @@ -79,6 +83,7 @@ const DeviceRow = ({ data, index, style }) => { const { items } = data; const item = items[index]; const position = useSelector((state) => state.positions.items[item.id]); + const showIgnition = true;// position?.attributes.hasOwnProperty('ignition') && position.attributes.ignition return (
@@ -90,12 +95,12 @@ const DeviceRow = ({ data, index, style }) => { - + {position && ( - - {position.attributes.hasOwnProperty('ignition') && ( + + {showIgnition && ( - + )} {position.attributes.hasOwnProperty('batteryLevel') && ( diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index 6f6b05c..417cdb0 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -69,6 +69,7 @@ const useStyles = makeStyles((theme) => ({ left: theme.spacing(1.5), top: theme.spacing(3), borderRadius: '0px', + minWidth: 0, [theme.breakpoints.down('md')]: { left: theme.spacing(0), }, -- cgit v1.2.3