diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-13 22:15:27 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-13 22:15:27 -0600 |
commit | ef46ac4ed003781c19ceda22998160e6dd06a6bb (patch) | |
tree | e19bd496d4eb0016bf06564491caf2c49b376840 /modern/src | |
parent | a0cd63630f67f0dec0c839cdcf53e36d1d8aebb8 (diff) | |
download | etbsa-traccar-web-ef46ac4ed003781c19ceda22998160e6dd06a6bb.tar.gz etbsa-traccar-web-ef46ac4ed003781c19ceda22998160e6dd06a6bb.tar.bz2 etbsa-traccar-web-ef46ac4ed003781c19ceda22998160e6dd06a6bb.zip |
Apparently some automatic formatting
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/DevicesList.js | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js index fda6f60..b7222a2 100644 --- a/modern/src/DevicesList.js +++ b/modern/src/DevicesList.js @@ -116,44 +116,44 @@ const DeviceRow = ({ data, index, style }) => { return ( <div style={style}> <ListItem button key={item.id} className={classes.listItem} onClick={() => { - dispatch(devicesActions.select(item)); - dispatch(uiActions.setCollapsed(true)); - setTimeout (() => { - dispatch(devicesActions.unselect()); - }, 1000); + dispatch(devicesActions.select(item)); + dispatch(uiActions.setCollapsed(true)); + setTimeout(() => { + dispatch(devicesActions.unselect()); + }, 1000); }}> {/* Avatar */} <ListItemAvatar> <img className={classes.icon} src={`images/icon/${(item.category || 'default').toLowerCase()}.png`} alt="" /> </ListItemAvatar> {/* Status icon */} - + <ListItemText primary={ <> - <FiberManualRecordIcon fontSize="inherit" color={statusColor()} classes={{ colorPrimary: classes.green }} /> + <FiberManualRecordIcon fontSize="inherit" color={statusColor()} classes={{ colorPrimary: classes.green }} /> {position && position.attributes.out1 == false && ( <LockOpenIcon fontSize="inherit" color="primary" classes={{ colorPrimary: classes.green }} /> )} {position && position.attributes.out1 == true && ( <LockIcon fontSize="inherit" color="error" /> - ) } + )} {` ${item.name}`} </>} secondary={( - <> - {/* Contact */} - <PersonIcon fontSize="inherit" /> {item.contact}<br/> - {position && ( - <> - {/* Speed */} - <SpeedIcon fontSize="inherit" /> {formatSpeed(position.speed, speedUnit, t)}<br/> - {/* Datetime */} - <CalendarTodayIcon fontSize="inherit" /> {formatDate(position.serverTime)} - {/* Hours */} - {position.attributes.hours && position.attributes.hours > 1 && ` (${formatHours(position.attributes.hours, t)})`} - </> - )} - </> - )} classes={{ secondary: classes.listItemSecondary }} /> + <> + {/* Contact */} + <PersonIcon fontSize="inherit" /> {item.contact}<br /> + {position && ( + <> + {/* Speed */} + <SpeedIcon fontSize="inherit" /> {formatSpeed(position.speed, speedUnit, t)}<br /> + {/* Datetime */} + <CalendarTodayIcon fontSize="inherit" /> {formatDate(position.serverTime)} + {/* Hours */} + {position.attributes.hours && position.attributes.hours > 1 && ` (${formatHours(position.attributes.hours, t)})`} + </> + )} + </> + )} classes={{ secondary: classes.listItemSecondary }} /> <ListItemSecondaryAction className={classes.indicators}> {position && ( <Grid container direction="row" alignItems="center" alignContent="center" spacing={2}> @@ -189,7 +189,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick }) => { const filteredItems = useSelector(getFilteredDevices); const unfilteredItems = useSelector(getDevices); - + const items = filteredItems.length > 0 ? filteredItems : unfilteredItems; if (listInnerEl.current) { @@ -211,7 +211,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick }) => { width={width} height={height} itemCount={items.length} - itemData={{items, onMenuClick}} + itemData={{ items, onMenuClick }} itemSize={144} overscanCount={10} innerRef={listInnerEl} |