mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-10 17:17:42 +03:00
Add batch face assignment to face library training view
Co-authored-by: Teagan42 <2989925+Teagan42@users.noreply.github.com>
This commit is contained in:
parent
99207e66c3
commit
8d0b4b8322
@ -193,6 +193,12 @@ export default function FaceLibrary() {
|
|||||||
ids: string[];
|
ids: string[];
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
|
|
||||||
|
// detail dialog
|
||||||
|
const [selectedEvent, setSelectedEvent] = useState<Event | undefined>(
|
||||||
|
undefined,
|
||||||
|
);
|
||||||
|
const [dialogTab, setDialogTab] = useState<SearchTab>("tracking_details");
|
||||||
|
|
||||||
const onDelete = useCallback(
|
const onDelete = useCallback(
|
||||||
(name: string, ids: string[], isName: boolean = false) => {
|
(name: string, ids: string[], isName: boolean = false) => {
|
||||||
axios
|
axios
|
||||||
@ -451,6 +457,10 @@ export default function FaceLibrary() {
|
|||||||
selectedFaces={selectedFaces}
|
selectedFaces={selectedFaces}
|
||||||
onClickFaces={onClickFaces}
|
onClickFaces={onClickFaces}
|
||||||
onRefresh={refreshFaces}
|
onRefresh={refreshFaces}
|
||||||
|
onClickEvent={(event) => {
|
||||||
|
setSelectedEvent(event);
|
||||||
|
setDialogTab("tracking_details");
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<FaceGrid
|
<FaceGrid
|
||||||
@ -463,6 +473,17 @@ export default function FaceLibrary() {
|
|||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<SearchDetailDialog
|
||||||
|
search={
|
||||||
|
selectedEvent ? (selectedEvent as unknown as SearchResult) : undefined
|
||||||
|
}
|
||||||
|
page={dialogTab}
|
||||||
|
setSimilarity={undefined}
|
||||||
|
setSearchPage={setDialogTab}
|
||||||
|
setSearch={(search) => setSelectedEvent(search as unknown as Event)}
|
||||||
|
setInputFocused={() => {}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -675,6 +696,7 @@ type TrainingGridProps = {
|
|||||||
) => FaceLibraryData | undefined),
|
) => FaceLibraryData | undefined),
|
||||||
opts?: boolean | { revalidate?: boolean },
|
opts?: boolean | { revalidate?: boolean },
|
||||||
) => Promise<FaceLibraryData | undefined>;
|
) => Promise<FaceLibraryData | undefined>;
|
||||||
|
onClickEvent: (event: Event) => void;
|
||||||
};
|
};
|
||||||
function TrainingGrid({
|
function TrainingGrid({
|
||||||
config,
|
config,
|
||||||
@ -684,6 +706,7 @@ function TrainingGrid({
|
|||||||
selectedFaces,
|
selectedFaces,
|
||||||
onClickFaces,
|
onClickFaces,
|
||||||
onRefresh,
|
onRefresh,
|
||||||
|
onClickEvent,
|
||||||
}: TrainingGridProps) {
|
}: TrainingGridProps) {
|
||||||
const { t } = useTranslation(["views/faceLibrary"]);
|
const { t } = useTranslation(["views/faceLibrary"]);
|
||||||
|
|
||||||
@ -763,6 +786,7 @@ function TrainingGrid({
|
|||||||
selectedFaces={selectedFaces}
|
selectedFaces={selectedFaces}
|
||||||
onClickFaces={onClickFaces}
|
onClickFaces={onClickFaces}
|
||||||
onRefresh={onRefresh}
|
onRefresh={onRefresh}
|
||||||
|
onClickEvent={onClickEvent}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user