aboutsummaryrefslogtreecommitdiff
path: root/modern/src/DevicesList.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/DevicesList.js')
-rw-r--r--modern/src/DevicesList.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js
index be24641..74aa6bc 100644
--- a/modern/src/DevicesList.js
+++ b/modern/src/DevicesList.js
@@ -48,6 +48,7 @@ const useStyles = makeStyles((theme) => ({
'&:hover': {
backgroundColor: 'white',
},
+ height: '150px',
},
listItemSecondary: {
fontSize: '0.92rem',
@@ -126,8 +127,8 @@ const DeviceRow = ({ data, index, style }) => {
<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 }} />
@@ -153,7 +154,11 @@ const DeviceRow = ({ data, index, style }) => {
{/* Datetime */}
<CalendarTodayIcon fontSize="inherit" /> {formatDate(position.serverTime)}
{/* Hours */}
- {position.attributes.hours && position.attributes.hours > 1 && ` (${formatHours(position.attributes.hours, t)})`}
+ {item.category
+ && (item.category.toLowerCase() === 'backhoe' || item.category.toLowerCase() === 'tractor' )
+ && position.attributes.hours
+ && position.attributes.hours > 1
+ && ` (${formatHours(position.attributes.hours, t)})`}
</>
)}
</>
@@ -217,7 +222,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick }) => {
height={height}
itemCount={items.length}
itemData={{ items, onMenuClick }}
- itemSize={144}
+ itemSize={150}
overscanCount={10}
innerRef={listInnerEl}
>