This commit is contained in:
Nicolas Mowen 2025-10-20 17:03:32 -06:00
parent 72896f4631
commit cbf78e2070

View File

@ -757,7 +757,6 @@ function TrainGrid({
selectedImages={selectedImages} selectedImages={selectedImages}
onClickImages={onClickImages} onClickImages={onClickImages}
onRefresh={onRefresh} onRefresh={onRefresh}
onDelete={onDelete}
/> />
); );
} }
@ -780,10 +779,7 @@ function StateTrainGrid({
selectedImages, selectedImages,
onClickImages, onClickImages,
onRefresh, onRefresh,
onDelete,
}: StateTrainGridProps) { }: StateTrainGridProps) {
const { t } = useTranslation(["views/classificationModel"]);
const threshold = useMemo(() => { const threshold = useMemo(() => {
return { return {
recognition: model.threshold, recognition: model.threshold,
@ -817,7 +813,7 @@ function StateTrainGrid({
image={data.filename} image={data.filename}
onRefresh={onRefresh} onRefresh={onRefresh}
> >
<TbCategoryPlus className="size-7 cursor-pointer p-1 text-white hover:rounded-full hover:bg-primary-foreground" /> <TbCategoryPlus className="size-7 cursor-pointer p-1 text-gray-200 hover:rounded-full hover:bg-primary-foreground" />
</ClassificationSelectionDialog> </ClassificationSelectionDialog>
</ClassificationCard> </ClassificationCard>
))} ))}
@ -833,7 +829,6 @@ type ObjectTrainGridProps = {
selectedImages: string[]; selectedImages: string[];
onClickImages: (images: string[], ctrl: boolean) => void; onClickImages: (images: string[], ctrl: boolean) => void;
onRefresh: () => void; onRefresh: () => void;
onDelete: (ids: string[]) => void;
}; };
function ObjectTrainGrid({ function ObjectTrainGrid({
model, model,
@ -843,10 +838,7 @@ function ObjectTrainGrid({
selectedImages, selectedImages,
onClickImages, onClickImages,
onRefresh, onRefresh,
onDelete,
}: ObjectTrainGridProps) { }: ObjectTrainGridProps) {
const { t } = useTranslation(["views/classificationModel"]);
// item data // item data
const groups = useMemo(() => { const groups = useMemo(() => {
@ -966,22 +958,8 @@ function ObjectTrainGrid({
image={data.filename} image={data.filename}
onRefresh={onRefresh} onRefresh={onRefresh}
> >
<TbCategoryPlus className="size-5 cursor-pointer text-primary-variant hover:text-primary" /> <TbCategoryPlus className="size-7 cursor-pointer p-1 text-gray-200 hover:rounded-full hover:bg-primary-foreground" />
</ClassificationSelectionDialog> </ClassificationSelectionDialog>
<Tooltip>
<TooltipTrigger>
<LuTrash2
className="size-5 cursor-pointer text-primary-variant hover:text-primary"
onClick={(e) => {
e.stopPropagation();
onDelete([data.filename]);
}}
/>
</TooltipTrigger>
<TooltipContent>
{t("button.deleteClassificationAttempts")}
</TooltipContent>
</Tooltip>
</> </>
)} )}
</GroupedClassificationCard> </GroupedClassificationCard>