mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 21:44:13 +03:00
add ability to download clean snapshot
This commit is contained in:
parent
bf5e0c76fe
commit
4ff61a77e7
@ -170,6 +170,10 @@
|
|||||||
"label": "Download snapshot",
|
"label": "Download snapshot",
|
||||||
"aria": "Download snapshot"
|
"aria": "Download snapshot"
|
||||||
},
|
},
|
||||||
|
"downloadCleanSnapshot": {
|
||||||
|
"label": "Download clean snapshot",
|
||||||
|
"aria": "Download clean snapshot"
|
||||||
|
},
|
||||||
"viewTrackingDetails": {
|
"viewTrackingDetails": {
|
||||||
"label": "View tracking details",
|
"label": "View tracking details",
|
||||||
"aria": "Show the tracking details"
|
"aria": "Show the tracking details"
|
||||||
|
|||||||
@ -108,6 +108,18 @@ export default function SearchResultActions({
|
|||||||
</a>
|
</a>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
|
{searchResult.has_snapshot &&
|
||||||
|
config?.cameras[searchResult.camera].snapshots.clean_copy && (
|
||||||
|
<MenuItem aria-label={t("itemMenu.downloadCleanSnapshot.aria")}>
|
||||||
|
<a
|
||||||
|
className="flex items-center"
|
||||||
|
href={`${baseUrl}api/events/${searchResult.id}/snapshot-clean.webp`}
|
||||||
|
download={`${searchResult.camera}_${searchResult.label}-clean.webp`}
|
||||||
|
>
|
||||||
|
<span>{t("itemMenu.downloadCleanSnapshot.label")}</span>
|
||||||
|
</a>
|
||||||
|
</MenuItem>
|
||||||
|
)}
|
||||||
{searchResult.data.type == "object" && (
|
{searchResult.data.type == "object" && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
aria-label={t("itemMenu.viewTrackingDetails.aria")}
|
aria-label={t("itemMenu.viewTrackingDetails.aria")}
|
||||||
|
|||||||
@ -69,6 +69,20 @@ export default function DetailActionsMenu({
|
|||||||
</a>
|
</a>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
)}
|
||||||
|
{search.has_snapshot &&
|
||||||
|
config?.cameras[search.camera].snapshots.clean_copy && (
|
||||||
|
<DropdownMenuItem>
|
||||||
|
<a
|
||||||
|
className="w-full"
|
||||||
|
href={`${baseUrl}api/events/${search.id}/snapshot-clean.webp`}
|
||||||
|
download={`${search.camera}_${search.label}-clean.webp`}
|
||||||
|
>
|
||||||
|
<div className="flex cursor-pointer items-center gap-2">
|
||||||
|
<span>{t("itemMenu.downloadCleanSnapshot.label")}</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)}
|
||||||
{search.has_clip && (
|
{search.has_clip && (
|
||||||
<DropdownMenuItem>
|
<DropdownMenuItem>
|
||||||
<a
|
<a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user