This commit is contained in:
Nick Mowen 2023-12-15 13:15:09 -07:00
parent 2241c85a85
commit d9c0798ab5

View File

@ -95,6 +95,11 @@ function Camera({ camera }: { camera: CameraConfig }) {
: "text-gray-400" : "text-gray-400"
: "text-red-500" : "text-red-500"
} }
onClick={() =>
camera.record.enabled_in_config
? sendRecord(recordValue == "ON" ? "OFF" : "ON")
: {}
}
> >
<TbMovie /> <TbMovie />
</Button> </Button>
@ -103,6 +108,7 @@ function Camera({ camera }: { camera: CameraConfig }) {
className={`${ className={`${
snapshotValue == "ON" ? "text-primary" : "text-gray-400" snapshotValue == "ON" ? "text-primary" : "text-gray-400"
}`} }`}
onClick={() => sendSnapshot(detectValue == "ON" ? "OFF" : "ON")}
> >
<AiOutlinePicture /> <AiOutlinePicture />
</Button> </Button>
@ -112,6 +118,7 @@ function Camera({ camera }: { camera: CameraConfig }) {
className={`${ className={`${
audioValue == "ON" ? "text-primary" : "text-gray-400" audioValue == "ON" ? "text-primary" : "text-gray-400"
}`} }`}
onClick={() => sendAudio(detectValue == "ON" ? "OFF" : "ON")}
> >
<LuEar /> <LuEar />
</Button> </Button>