diff --git a/web/public/locales/en/views/faceLibrary.json b/web/public/locales/en/views/faceLibrary.json index 354049156..593715261 100644 --- a/web/public/locales/en/views/faceLibrary.json +++ b/web/public/locales/en/views/faceLibrary.json @@ -53,7 +53,8 @@ "renameFace": "Rename Face", "deleteFace": "Delete Face", "uploadImage": "Upload Image", - "reprocessFace": "Reprocess Face" + "reprocessFace": "Reprocess Face", + "trainFaces": "Train Faces" }, "imageEntry": { "validation": { @@ -77,6 +78,7 @@ "deletedName_other": "{{count}} faces have been successfully deleted.", "renamedFace": "Successfully renamed face to {{name}}", "trainedFace": "Successfully trained face.", + "batchTrainedFaces": "Successfully trained {{count}} faces.", "updatedFaceScore": "Successfully updated face score to {{name}} ({{score}})." }, "error": { @@ -86,7 +88,11 @@ "deleteNameFailed": "Failed to delete name: {{errorMessage}}", "renameFaceFailed": "Failed to rename face: {{errorMessage}}", "trainFailed": "Failed to train: {{errorMessage}}", + "batchTrainFailed": "Failed to train {{count}} faces.", "updateFaceScoreFailed": "Failed to update face score: {{errorMessage}}" + }, + "warning": { + "partialBatchTrained": "Trained {{success}} of {{total}} faces successfully." } } } diff --git a/web/src/pages/FaceLibrary.tsx b/web/src/pages/FaceLibrary.tsx index cbcb7c7de..411ecb672 100644 --- a/web/src/pages/FaceLibrary.tsx +++ b/web/src/pages/FaceLibrary.tsx @@ -72,10 +72,6 @@ import { ClassificationItemData, ClassifiedEvent, } from "@/types/classification"; -import SearchDetailDialog, { - SearchTab, -} from "@/components/overlay/detail/SearchDetailDialog"; -import { SearchResult } from "@/types/search"; export default function FaceLibrary() { const { t } = useTranslation(["views/faceLibrary"]); @@ -193,12 +189,6 @@ export default function FaceLibrary() { ids: string[]; } | null>(null); - // detail dialog - const [selectedEvent, setSelectedEvent] = useState( - undefined, - ); - const [dialogTab, setDialogTab] = useState("tracking_details"); - const onDelete = useCallback( (name: string, ids: string[], isName: boolean = false) => { axios @@ -537,10 +527,6 @@ export default function FaceLibrary() { selectedFaces={selectedFaces} onClickFaces={onClickFaces} onRefresh={refreshFaces} - onClickEvent={(event) => { - setSelectedEvent(event); - setDialogTab("tracking_details"); - }} /> ) : ( )) )} - - setSelectedEvent(search as unknown as Event)} - setInputFocused={() => {}} - /> ); } @@ -776,7 +751,6 @@ type TrainingGridProps = { ) => FaceLibraryData | undefined), opts?: boolean | { revalidate?: boolean }, ) => Promise; - onClickEvent: (event: Event) => void; }; function TrainingGrid({ config, @@ -786,7 +760,6 @@ function TrainingGrid({ selectedFaces, onClickFaces, onRefresh, - onClickEvent, }: TrainingGridProps) { const { t } = useTranslation(["views/faceLibrary"]); @@ -866,7 +839,6 @@ function TrainingGrid({ selectedFaces={selectedFaces} onClickFaces={onClickFaces} onRefresh={onRefresh} - onClickEvent={onClickEvent} /> ); @@ -891,7 +863,6 @@ type FaceAttemptGroupProps = { ) => FaceLibraryData | undefined), opts?: boolean | { revalidate?: boolean }, ) => Promise; - onClickEvent: (event: Event) => void; }; function FaceAttemptGroup({ config, @@ -901,7 +872,6 @@ function FaceAttemptGroup({ selectedFaces, onClickFaces, onRefresh, - onClickEvent, }: FaceAttemptGroupProps) { const { t } = useTranslation(["views/faceLibrary", "views/explore"]); @@ -919,10 +889,6 @@ function FaceAttemptGroup({ const handleClickEvent = useCallback( (meta: boolean) => { if (!meta) { - // Open detail view when clicking without meta key - if (event) { - onClickEvent(event); - } return; } else { const anySelected = @@ -947,7 +913,7 @@ function FaceAttemptGroup({ } } }, - [group, selectedFaces, onClickFaces, event, onClickEvent], + [group, selectedFaces, onClickFaces], ); // api calls