fix(web): mask zone editor to handle object filter masks

Includes additional handlers for adding/removing masks, as well as click to copy configs

fixes #523
This commit is contained in:
Paul Armstrong
2021-01-15 12:29:30 -08:00
committed by Blake Blackshear
parent 3c072f94b0
commit d39111a294
6 changed files with 663 additions and 298 deletions

View File

@@ -30,10 +30,15 @@ export default function Event({ eventId }) {
{data.camera} {data.label} <span className="text-sm">{datetime.toLocaleString()}</span>
</Heading>
<img
src={`data:image/jpeg;base64,${data.thumbnail}`}
src={`${apiHost}/clips/${data.camera}-${eventId}.jpg`}
alt={`${data.label} at ${(data.top_score * 100).toFixed(1)}% confidence`}
/>
<video className="w-96" src={`${apiHost}/clips/${data.camera}-${eventId}.mp4`} controls />
{data.has_clip ? (
<video className="w-96" src={`${apiHost}/clips/${data.camera}-${eventId}.mp4`} controls />
) : (
<p>No clip available</p>
)}
<pre>{JSON.stringify(data, null, 2)}</pre>
</div>
);