mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
hide recordings page if record is not enabled, show error if no recordings available.
This commit is contained in:
committed by
Blake Blackshear
parent
0bb998c465
commit
68dfaaf767
@@ -14,6 +14,18 @@ export default function Recording({ camera, date, hour, seconds }) {
|
||||
return <ActivityIndicator />;
|
||||
}
|
||||
|
||||
if (data.length === 0) {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<Heading>{camera} Recordings</Heading>
|
||||
<div class="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4" role="alert">
|
||||
<p class="font-bold">No Recordings Found</p>
|
||||
<p>Make sure you have enabled the record role in your configuration for the {camera} camera.</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const recordingDates = data.map((item) => item.date);
|
||||
const selectedDate = closestTo(
|
||||
date ? parseISO(date) : new Date(),
|
||||
|
||||
Reference in New Issue
Block a user