mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 12:15:25 +03:00
Only show the red dot when camera is recording
This commit is contained in:
parent
a004890a7e
commit
f74092a10e
@ -15,6 +15,7 @@ import { MdCircle, MdLeakAdd, MdSelectAll } from "react-icons/md";
|
||||
import { BsSoundwave } from "react-icons/bs";
|
||||
import Chip from "../Chip";
|
||||
import useCameraActivity from "@/hooks/use-camera-activity";
|
||||
import { useRecordingsState } from "@/api/ws";
|
||||
|
||||
const emptyObject = Object.freeze({});
|
||||
|
||||
@ -52,6 +53,8 @@ export default function LivePlayer({
|
||||
}
|
||||
}, [activeMotion, activeTracking, liveReady]);
|
||||
|
||||
const { payload: recording } = useRecordingsState(cameraConfig.name);
|
||||
|
||||
// debug view settings
|
||||
|
||||
const [showSettings, setShowSettings] = useState(false);
|
||||
@ -216,9 +219,7 @@ export default function LivePlayer({
|
||||
</div>
|
||||
)}
|
||||
<Chip className="absolute right-2 top-2 bg-gray-500 bg-gradient-to-br">
|
||||
{cameraConfig.record.enabled && (
|
||||
<MdCircle className="w-2 h-2 text-danger" />
|
||||
)}
|
||||
{recording == "ON" && <MdCircle className="w-2 h-2 text-danger" />}
|
||||
<div className="ml-1 capitalize text-white text-xs">
|
||||
{cameraConfig.name.replaceAll("_", " ")}
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user