mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
ensure birdseye is actually enabled in config
This commit is contained in:
parent
c7ce957c2d
commit
57326324cd
@ -146,6 +146,8 @@ function NewGroupDialog({ open, setOpen, currentGroups }: NewGroupDialogProps) {
|
||||
const { data: config, mutate: updateConfig } =
|
||||
useSWR<FrigateConfig>("config");
|
||||
|
||||
const birdseyeConfig = useMemo(() => config?.birdseye, [config]);
|
||||
|
||||
// add fields
|
||||
|
||||
const [editState, setEditState] = useState<"none" | "add" | "edit">("none");
|
||||
@ -298,26 +300,27 @@ function NewGroupDialog({ open, setOpen, currentGroups }: NewGroupDialogProps) {
|
||||
</div>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
{[...Object.keys(config?.cameras ?? {}), "birdseye"].map(
|
||||
(camera) => (
|
||||
<FilterCheckBox
|
||||
key={camera}
|
||||
isChecked={cameras.includes(camera)}
|
||||
label={camera.replaceAll("_", " ")}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setCameras([...cameras, camera]);
|
||||
} else {
|
||||
const index = cameras.indexOf(camera);
|
||||
setCameras([
|
||||
...cameras.slice(0, index),
|
||||
...cameras.slice(index + 1),
|
||||
]);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
{[
|
||||
...Object.keys(config?.cameras ?? {}),
|
||||
...(birdseyeConfig?.enabled ? ["birdseye"] : []),
|
||||
].map((camera) => (
|
||||
<FilterCheckBox
|
||||
key={camera}
|
||||
isChecked={cameras.includes(camera)}
|
||||
label={camera.replaceAll("_", " ")}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setCameras([...cameras, camera]);
|
||||
} else {
|
||||
const index = cameras.indexOf(camera);
|
||||
setCameras([
|
||||
...cameras.slice(0, index),
|
||||
...cameras.slice(index + 1),
|
||||
]);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
{error && <div className="text-danger">{error}</div>}
|
||||
|
||||
@ -130,7 +130,7 @@ export default function LiveDashboardView({
|
||||
<div
|
||||
className={`my-4 grid ${layout == "grid" ? "grid-cols-2 xl:grid-cols-3 3xl:grid-cols-4" : ""} gap-2 md:gap-4 *:rounded-2xl *:bg-black`}
|
||||
>
|
||||
{includeBirdseye && birdseyeConfig && (
|
||||
{includeBirdseye && birdseyeConfig?.enabled && (
|
||||
<BirdseyeLivePlayer
|
||||
birdseyeConfig={birdseyeConfig}
|
||||
liveMode={birdseyeConfig.restream ? "mse" : "jsmpeg"}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user