mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-12 16:16:42 +03:00
add wizard to camera settings view
This commit is contained in:
parent
c80ecc7fd0
commit
16d7d068ad
@ -39,6 +39,7 @@ import {
|
|||||||
useReviewDescriptionState,
|
useReviewDescriptionState,
|
||||||
} from "@/api/ws";
|
} from "@/api/ws";
|
||||||
import CameraEditForm from "@/components/settings/CameraEditForm";
|
import CameraEditForm from "@/components/settings/CameraEditForm";
|
||||||
|
import CameraWizardDialog from "@/components/settings/CameraWizardDialog";
|
||||||
import { LuPlus } from "react-icons/lu";
|
import { LuPlus } from "react-icons/lu";
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
@ -87,6 +88,7 @@ export default function CameraSettingsView({
|
|||||||
const [editCameraName, setEditCameraName] = useState<string | undefined>(
|
const [editCameraName, setEditCameraName] = useState<string | undefined>(
|
||||||
undefined,
|
undefined,
|
||||||
); // Track camera being edited
|
); // Track camera being edited
|
||||||
|
const [showWizard, setShowWizard] = useState(false);
|
||||||
|
|
||||||
const { addMessage, removeMessage } = useContext(StatusBarMessagesContext)!;
|
const { addMessage, removeMessage } = useContext(StatusBarMessagesContext)!;
|
||||||
|
|
||||||
@ -322,7 +324,7 @@ export default function CameraSettingsView({
|
|||||||
<div className="mb-4 flex flex-col gap-4">
|
<div className="mb-4 flex flex-col gap-4">
|
||||||
<Button
|
<Button
|
||||||
variant="select"
|
variant="select"
|
||||||
onClick={() => setViewMode("add")}
|
onClick={() => setShowWizard(true)}
|
||||||
className="flex max-w-48 items-center gap-2"
|
className="flex max-w-48 items-center gap-2"
|
||||||
>
|
>
|
||||||
<LuPlus className="h-4 w-4" />
|
<LuPlus className="h-4 w-4" />
|
||||||
@ -835,6 +837,11 @@ export default function CameraSettingsView({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<CameraWizardDialog
|
||||||
|
open={showWizard}
|
||||||
|
onClose={() => setShowWizard(false)}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user