From 1ec8590202e744d22711810f33150fd826149073 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 20 Jan 2023 15:42:58 -0800 Subject: List device expiration (fix #1075) --- modern/src/settings/DevicesPage.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modern/src/settings') 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 = () => { {t('sharedPhone')} {t('deviceModel')} {t('deviceContact')} + {t('userExpirationTime')} @@ -64,6 +69,7 @@ const DevicesPage = () => { {item.phone} {item.model} {item.contact} + {formatTime(item.expirationTime, 'date', hours12)} -- cgit v1.2.3