mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-03 06:40:22 +00:00
* Add cutoff for object classification * Add selector for classifiction model type * Improve model selection view * Clean up design of classification card * Tweaks * Adjust button colors * Improvements to gradients and making face library consistent * Add basic classification model wizard * Use relative coordinates * Properly get resolution * Clean up exports * Cleanup * Cleanup * Update to use pre-defined component for image shadow * Refactor image grouping * Clean up mobile * Clean up decision logic * Remove max check on classification objects * Increase default number of faces shown * Cleanup * Improve mobile layout * Clenaup * Update vocabulary * Fix layout * Fix page * Cleanup * Choose last item for unknown objects * Move explore button * Cleanup grid * Cleanup classification * Cleanup grid * Cleanup * Set transparency * Set unknown * Don't filter all configs * Check length
67 lines
1.6 KiB
TypeScript
67 lines
1.6 KiB
TypeScript
import { useTranslation } from "react-i18next";
|
|
import StepIndicator from "../indicators/StepIndicator";
|
|
import {
|
|
Dialog,
|
|
DialogContent,
|
|
DialogDescription,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
} from "../ui/dialog";
|
|
import { useState } from "react";
|
|
|
|
const STEPS = [
|
|
"classificationWizard.steps.nameAndDefine",
|
|
"classificationWizard.steps.stateArea",
|
|
"classificationWizard.steps.chooseExamples",
|
|
"classificationWizard.steps.train",
|
|
];
|
|
|
|
type ClassificationModelWizardDialogProps = {
|
|
open: boolean;
|
|
onClose: () => void;
|
|
};
|
|
export default function ClassificationModelWizardDialog({
|
|
open,
|
|
onClose,
|
|
}: ClassificationModelWizardDialogProps) {
|
|
const { t } = useTranslation(["views/classificationModel"]);
|
|
|
|
// step management
|
|
const [currentStep, _] = useState(0);
|
|
|
|
return (
|
|
<Dialog
|
|
open={open}
|
|
onOpenChange={(open) => {
|
|
if (!open) {
|
|
onClose;
|
|
}
|
|
}}
|
|
>
|
|
<DialogContent
|
|
className="max-h-[90dvh] max-w-4xl overflow-y-auto"
|
|
onInteractOutside={(e) => {
|
|
e.preventDefault();
|
|
}}
|
|
>
|
|
<StepIndicator
|
|
steps={STEPS}
|
|
currentStep={currentStep}
|
|
variant="dots"
|
|
className="mb-4 justify-start"
|
|
/>
|
|
<DialogHeader>
|
|
<DialogTitle>{t("wizard.title")}</DialogTitle>
|
|
{currentStep === 0 && (
|
|
<DialogDescription>{t("wizard.description")}</DialogDescription>
|
|
)}
|
|
</DialogHeader>
|
|
|
|
<div className="pb-4">
|
|
<div className="size-full"></div>
|
|
</div>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|