mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Add download button to UI
This commit is contained in:
parent
acc170e64d
commit
b2737a3955
@ -462,7 +462,6 @@ def recording_clip(
|
||||
while True:
|
||||
data = ffmpeg.stdout.read(1024)
|
||||
if not data:
|
||||
logger.error(f"the returncode is {ffmpeg.returncode}")
|
||||
if ffmpeg.returncode and ffmpeg.returncode != 0:
|
||||
logger.error(
|
||||
f"Failed to generate clip, ffmpeg logs: {ffmpeg.stderr.read()}"
|
||||
|
||||
@ -143,7 +143,7 @@ export default function ReviewDetailDialog({
|
||||
<Description className="sr-only">Review item details</Description>
|
||||
<div
|
||||
className={cn(
|
||||
"absolute",
|
||||
"absolute flex gap-2",
|
||||
isDesktop && "right-1 top-8",
|
||||
isMobile && "right-0 top-3",
|
||||
)}
|
||||
@ -161,6 +161,19 @@ export default function ReviewDetailDialog({
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Share this review item</TooltipContent>
|
||||
</Tooltip>
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<a
|
||||
download
|
||||
href={`${baseUrl}api/${review.camera}/start/${review.start_time}/end/${review.end_time || Date.now() / 1000}/clip.mp4`}
|
||||
>
|
||||
<Button size="sm">
|
||||
<FaDownload className="size-4 text-secondary-foreground" />
|
||||
</Button>
|
||||
</a>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Share this review item</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</Header>
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user