mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Apply timestamp option to recordings page as well
This commit is contained in:
parent
27748d2b5b
commit
f0277f8eb3
@ -144,7 +144,11 @@ export function EventCard({ camera, event }) {
|
|||||||
const apiHost = useApiHost();
|
const apiHost = useApiHost();
|
||||||
const start = fromUnixTime(event.start_time);
|
const start = fromUnixTime(event.start_time);
|
||||||
const end = fromUnixTime(event.end_time);
|
const end = fromUnixTime(event.end_time);
|
||||||
|
|
||||||
|
const { data: config } = useSWR('config');
|
||||||
|
|
||||||
let duration = 'In Progress';
|
let duration = 'In Progress';
|
||||||
|
|
||||||
if (event.end_time) {
|
if (event.end_time) {
|
||||||
duration = formatDuration(intervalToDuration({ start, end }));
|
duration = formatDuration(intervalToDuration({ start, end }));
|
||||||
}
|
}
|
||||||
@ -160,7 +164,7 @@ export function EventCard({ camera, event }) {
|
|||||||
<div className="flex flex-row items-center">
|
<div className="flex flex-row items-center">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<div className="text-2xl text-white leading-tight capitalize">{event.label}</div>
|
<div className="text-2xl text-white leading-tight capitalize">{event.label}</div>
|
||||||
<div className="text-xs md:text-normal text-gray-300">Start: {format(start, 'HH:mm:ss')}</div>
|
<div className="text-xs md:text-normal text-gray-300">Start: {format(start, `${config.ui.timestamp.hour_12 ? 'hh' : 'HH'}:mm:ss ${config.ui.timestamp.hour_12 ? 'a' : ''}`)}</div>
|
||||||
<div className="text-xs md:text-normal text-gray-300">Duration: {duration}</div>
|
<div className="text-xs md:text-normal text-gray-300">Duration: {duration}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-lg text-white text-right leading-tight">{(event.top_score * 100).toFixed(1)}%</div>
|
<div className="text-lg text-white text-right leading-tight">{(event.top_score * 100).toFixed(1)}%</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user