import { h } from 'preact'; import Card from '../components/Card'; import Button from '../components/Button'; import Heading from '../components/Heading'; import Switch from '../components/Switch'; import { route } from 'preact-router'; import { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'preact/hooks'; import { useApiHost, useConfig } from './api'; export default function CameraMasks({ camera, url }) { const { data: config } = useConfig(); const apiHost = useApiHost(); const imageRef = useRef(null); const [imageScale, setImageScale] = useState(1); const [snap, setSnap] = useState(true); if (!(camera in config.cameras)) { return
config.yml file restart your Frigate instance to
save your changes.
}
header="Warning"
/>
{yamlPrefix}
{Object.keys(points).map((mainkey) => {
if (isMulti) {
return (
{` ${mainkey}:\n mask:\n`}
{onAdd && showButtons ? (
) : null}
{points[mainkey].map((item, subkey) => (
))}
);
} else {
return (
);
}
})}