mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Link live recordings (#10799)
* Add button to link to recordings from camera live view * Change name and show text on both * Use history button next to back button * Match designs better
This commit is contained in:
parent
d1082ec305
commit
759ad427d5
@ -42,7 +42,9 @@ export default function CameraFeatureToggle({
|
||||
variants[variant][isActive ? "active" : "inactive"]
|
||||
}`}
|
||||
>
|
||||
<Icon className="size-5 md:m-[6px]" />
|
||||
<Icon
|
||||
className={`size-5 md:m-[6px] ${isActive ? "text-white" : "text-secondary-foreground"}`}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
@ -329,6 +329,7 @@ export default function Events() {
|
||||
return <ActivityIndicator />;
|
||||
}
|
||||
|
||||
if (recording) {
|
||||
if (selectedReviewData) {
|
||||
return (
|
||||
<RecordingView
|
||||
@ -343,6 +344,7 @@ export default function Events() {
|
||||
updateFilter={onUpdateFilter}
|
||||
/>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
return (
|
||||
<EventView
|
||||
|
@ -251,6 +251,7 @@ export function RecordingView({
|
||||
<Button
|
||||
className="flex items-center gap-2 rounded-lg"
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
onClick={() => navigate(-1)}
|
||||
>
|
||||
<IoMdArrowRoundBack className="size-5" size="small" />
|
||||
|
@ -22,6 +22,7 @@ import { useResizeObserver } from "@/hooks/resize-observer";
|
||||
import useKeyboardListener from "@/hooks/use-keyboard-listener";
|
||||
import { CameraConfig } from "@/types/frigateConfig";
|
||||
import { CameraPtzInfo } from "@/types/ptz";
|
||||
import { RecordingStartingPoint } from "@/types/record";
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
@ -50,10 +51,11 @@ import {
|
||||
} from "react-icons/fa";
|
||||
import { GiSpeaker, GiSpeakerOff } from "react-icons/gi";
|
||||
import { HiViewfinderCircle } from "react-icons/hi2";
|
||||
import { IoMdArrowBack } from "react-icons/io";
|
||||
import { IoMdArrowRoundBack } from "react-icons/io";
|
||||
import {
|
||||
LuEar,
|
||||
LuEarOff,
|
||||
LuHistory,
|
||||
LuPictureInPicture,
|
||||
LuVideo,
|
||||
LuVideoOff,
|
||||
@ -218,14 +220,37 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
|
||||
}
|
||||
>
|
||||
{!fullscreen ? (
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
className={`rounded-lg ${isMobile ? "ml-2" : "ml-0"}`}
|
||||
size={isMobile ? "icon" : "sm"}
|
||||
className={`flex items-center gap-2.5 rounded-lg`}
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
onClick={() => navigate(-1)}
|
||||
>
|
||||
<IoMdArrowBack className="size-5 lg:mr-[10px]" />
|
||||
<IoMdArrowRoundBack className="size-5" />
|
||||
{isDesktop && "Back"}
|
||||
</Button>
|
||||
<Button
|
||||
className="flex items-center gap-2.5 rounded-lg"
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
onClick={() => {
|
||||
navigate("events", {
|
||||
state: {
|
||||
severity: "alert",
|
||||
recording: {
|
||||
camera: camera.name,
|
||||
startTime: Date.now() / 1000 - 30,
|
||||
severity: "alert",
|
||||
} as RecordingStartingPoint,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
<LuHistory className="size-5" />
|
||||
{isDesktop && "History"}
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div />
|
||||
)}
|
||||
|
@ -27,8 +27,8 @@
|
||||
--secondary: hsl(0, 0%, 96%);
|
||||
--secondary: 0 0% 96%;
|
||||
|
||||
--secondary-foreground: hsl(0, 0%, 45%);
|
||||
--secondary-foreground: 0 0% 45%;
|
||||
--secondary-foreground: hsl(0, 0%, 32%);
|
||||
--secondary-foreground: 0 0% 32%;
|
||||
|
||||
--secondary-highlight: hsl(0, 0%, 94%);
|
||||
--secondary-highlight: 0 0% 94%;
|
||||
|
Loading…
Reference in New Issue
Block a user