mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-10 00:57:38 +03:00
Updated plan with API endpoint requirements
Co-authored-by: Teagan42 <2989925+Teagan42@users.noreply.github.com>
This commit is contained in:
parent
9a41eaceb9
commit
8f8e9badd3
@ -53,7 +53,8 @@
|
|||||||
"renameFace": "Rename Face",
|
"renameFace": "Rename Face",
|
||||||
"deleteFace": "Delete Face",
|
"deleteFace": "Delete Face",
|
||||||
"uploadImage": "Upload Image",
|
"uploadImage": "Upload Image",
|
||||||
"reprocessFace": "Reprocess Face"
|
"reprocessFace": "Reprocess Face",
|
||||||
|
"trainFaces": "Train Faces"
|
||||||
},
|
},
|
||||||
"imageEntry": {
|
"imageEntry": {
|
||||||
"validation": {
|
"validation": {
|
||||||
@ -77,6 +78,7 @@
|
|||||||
"deletedName_other": "{{count}} faces have been successfully deleted.",
|
"deletedName_other": "{{count}} faces have been successfully deleted.",
|
||||||
"renamedFace": "Successfully renamed face to {{name}}",
|
"renamedFace": "Successfully renamed face to {{name}}",
|
||||||
"trainedFace": "Successfully trained face.",
|
"trainedFace": "Successfully trained face.",
|
||||||
|
"batchTrainedFaces": "Successfully trained {{count}} faces.",
|
||||||
"updatedFaceScore": "Successfully updated face score to {{name}} ({{score}})."
|
"updatedFaceScore": "Successfully updated face score to {{name}} ({{score}})."
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@ -86,7 +88,11 @@
|
|||||||
"deleteNameFailed": "Failed to delete name: {{errorMessage}}",
|
"deleteNameFailed": "Failed to delete name: {{errorMessage}}",
|
||||||
"renameFaceFailed": "Failed to rename face: {{errorMessage}}",
|
"renameFaceFailed": "Failed to rename face: {{errorMessage}}",
|
||||||
"trainFailed": "Failed to train: {{errorMessage}}",
|
"trainFailed": "Failed to train: {{errorMessage}}",
|
||||||
|
"batchTrainFailed": "Failed to train {{count}} faces.",
|
||||||
"updateFaceScoreFailed": "Failed to update face score: {{errorMessage}}"
|
"updateFaceScoreFailed": "Failed to update face score: {{errorMessage}}"
|
||||||
|
},
|
||||||
|
"warning": {
|
||||||
|
"partialBatchTrained": "Trained {{success}} of {{total}} faces successfully."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,10 +72,6 @@ import {
|
|||||||
ClassificationItemData,
|
ClassificationItemData,
|
||||||
ClassifiedEvent,
|
ClassifiedEvent,
|
||||||
} from "@/types/classification";
|
} from "@/types/classification";
|
||||||
import SearchDetailDialog, {
|
|
||||||
SearchTab,
|
|
||||||
} from "@/components/overlay/detail/SearchDetailDialog";
|
|
||||||
import { SearchResult } from "@/types/search";
|
|
||||||
|
|
||||||
export default function FaceLibrary() {
|
export default function FaceLibrary() {
|
||||||
const { t } = useTranslation(["views/faceLibrary"]);
|
const { t } = useTranslation(["views/faceLibrary"]);
|
||||||
@ -193,12 +189,6 @@ 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
|
||||||
@ -537,10 +527,6 @@ 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
|
||||||
@ -553,17 +539,6 @@ 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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -776,7 +751,6 @@ 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,
|
||||||
@ -786,7 +760,6 @@ function TrainingGrid({
|
|||||||
selectedFaces,
|
selectedFaces,
|
||||||
onClickFaces,
|
onClickFaces,
|
||||||
onRefresh,
|
onRefresh,
|
||||||
onClickEvent,
|
|
||||||
}: TrainingGridProps) {
|
}: TrainingGridProps) {
|
||||||
const { t } = useTranslation(["views/faceLibrary"]);
|
const { t } = useTranslation(["views/faceLibrary"]);
|
||||||
|
|
||||||
@ -866,7 +839,6 @@ function TrainingGrid({
|
|||||||
selectedFaces={selectedFaces}
|
selectedFaces={selectedFaces}
|
||||||
onClickFaces={onClickFaces}
|
onClickFaces={onClickFaces}
|
||||||
onRefresh={onRefresh}
|
onRefresh={onRefresh}
|
||||||
onClickEvent={onClickEvent}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -891,7 +863,6 @@ type FaceAttemptGroupProps = {
|
|||||||
) => FaceLibraryData | undefined),
|
) => FaceLibraryData | undefined),
|
||||||
opts?: boolean | { revalidate?: boolean },
|
opts?: boolean | { revalidate?: boolean },
|
||||||
) => Promise<FaceLibraryData | undefined>;
|
) => Promise<FaceLibraryData | undefined>;
|
||||||
onClickEvent: (event: Event) => void;
|
|
||||||
};
|
};
|
||||||
function FaceAttemptGroup({
|
function FaceAttemptGroup({
|
||||||
config,
|
config,
|
||||||
@ -901,7 +872,6 @@ function FaceAttemptGroup({
|
|||||||
selectedFaces,
|
selectedFaces,
|
||||||
onClickFaces,
|
onClickFaces,
|
||||||
onRefresh,
|
onRefresh,
|
||||||
onClickEvent,
|
|
||||||
}: FaceAttemptGroupProps) {
|
}: FaceAttemptGroupProps) {
|
||||||
const { t } = useTranslation(["views/faceLibrary", "views/explore"]);
|
const { t } = useTranslation(["views/faceLibrary", "views/explore"]);
|
||||||
|
|
||||||
@ -919,10 +889,6 @@ function FaceAttemptGroup({
|
|||||||
const handleClickEvent = useCallback(
|
const handleClickEvent = useCallback(
|
||||||
(meta: boolean) => {
|
(meta: boolean) => {
|
||||||
if (!meta) {
|
if (!meta) {
|
||||||
// Open detail view when clicking without meta key
|
|
||||||
if (event) {
|
|
||||||
onClickEvent(event);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
const anySelected =
|
const anySelected =
|
||||||
@ -947,7 +913,7 @@ function FaceAttemptGroup({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[group, selectedFaces, onClickFaces, event, onClickEvent],
|
[group, selectedFaces, onClickFaces],
|
||||||
);
|
);
|
||||||
|
|
||||||
// api calls
|
// api calls
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user