diff options
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/settings/DevicesPage.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modern/src/settings/DevicesPage.js b/modern/src/settings/DevicesPage.js index 07109aee..0ad76106 100644 --- a/modern/src/settings/DevicesPage.js +++ b/modern/src/settings/DevicesPage.js @@ -11,6 +11,8 @@ import CollectionFab from './components/CollectionFab'; import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; +import { usePreference } from '../common/util/preferences'; +import { formatTime } from '../common/util/formatter'; const useStyles = makeStyles((theme) => ({ columnAction: { @@ -23,6 +25,8 @@ const DevicesPage = () => { const classes = useStyles(); const t = useTranslation(); + const hours12 = usePreference('twelveHourFormat'); + const [timestamp, setTimestamp] = useState(Date.now()); const [items, setItems] = useState([]); const [searchKeyword, setSearchKeyword] = useState(''); @@ -53,6 +57,7 @@ const DevicesPage = () => { <TableCell>{t('sharedPhone')}</TableCell> <TableCell>{t('deviceModel')}</TableCell> <TableCell>{t('deviceContact')}</TableCell> + <TableCell>{t('userExpirationTime')}</TableCell> <TableCell className={classes.columnAction} /> </TableRow> </TableHead> @@ -64,6 +69,7 @@ const DevicesPage = () => { <TableCell>{item.phone}</TableCell> <TableCell>{item.model}</TableCell> <TableCell>{item.contact}</TableCell> + <TableCell>{formatTime(item.expirationTime, 'date', hours12)}</TableCell> <TableCell className={classes.columnAction} padding="none"> <CollectionActions itemId={item.id} editPath="/settings/device" endpoint="devices" setTimestamp={setTimestamp} /> </TableCell> |