Tweaks and fixes (#11541)

* Update config version to be stored inside of the config

* Don't remove items from list when navigating back

* Use video api instead of webps for live current hour filmstrip

* Check that the config file is writable

* Show camera name when camera is offline

* Show camera name when offline

* Cleanup
This commit is contained in:
Nicolas Mowen
2024-05-26 15:49:12 -06:00
committed by GitHub
parent 63d81bef45
commit c2eac10925
10 changed files with 151 additions and 117 deletions

View File

@@ -46,7 +46,7 @@ export default function LivePlayer({
}: LivePlayerProps) {
// camera activity
const { activeMotion, activeTracking, objects } =
const { activeMotion, activeTracking, objects, offline } =
useCameraActivity(cameraConfig);
const cameraActive = useMemo(
@@ -224,9 +224,16 @@ export default function LivePlayer({
/>
</div>
<div className="absolute right-2 top-2 size-4">
{activeMotion && (
<MdCircle className="size-2 animate-pulse text-danger shadow-danger drop-shadow-md" />
<div className="absolute right-2 top-2">
{!offline && activeMotion && (
<MdCircle className="mr-2 size-2 animate-pulse text-danger shadow-danger drop-shadow-md" />
)}
{offline && (
<Chip
className={`z-0 flex items-start justify-between space-x-1 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 text-xs capitalize`}
>
{cameraConfig.name.replaceAll("_", " ")}
</Chip>
)}
</div>
</div>