From eefa0977e3180b7590fb9ec667ff8cf1fd2a13fb Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 18 Dec 2025 07:27:24 -0700 Subject: [PATCH] Cleanup cursor pointer for classification cards --- web/src/components/card/ClassificationCard.tsx | 7 ++++++- web/src/views/classification/ModelTrainingView.tsx | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/web/src/components/card/ClassificationCard.tsx b/web/src/components/card/ClassificationCard.tsx index 360bb11bf..bf91d89c2 100644 --- a/web/src/components/card/ClassificationCard.tsx +++ b/web/src/components/card/ClassificationCard.tsx @@ -40,6 +40,7 @@ type ClassificationCardProps = { data: ClassificationItemData; threshold?: ClassificationThreshold; selected: boolean; + clickable: boolean; i18nLibrary: string; showArea?: boolean; count?: number; @@ -56,6 +57,7 @@ export const ClassificationCard = forwardRef< data, threshold, selected, + clickable, i18nLibrary, showArea = true, count, @@ -101,11 +103,12 @@ export const ClassificationCard = forwardRef<
{ const isMeta = e.metaKey || e.ctrlKey; @@ -289,6 +292,7 @@ export function GroupedClassificationCard({ data={bestItem} threshold={threshold} selected={selectedItems.includes(bestItem.filename)} + clickable={true} i18nLibrary={i18nLibrary} count={group.length} onClick={(_, meta) => { @@ -413,6 +417,7 @@ export function GroupedClassificationCard({ data={data} threshold={threshold} selected={false} + clickable={false} i18nLibrary={i18nLibrary} onClick={() => {}} > diff --git a/web/src/views/classification/ModelTrainingView.tsx b/web/src/views/classification/ModelTrainingView.tsx index 3d106ffbc..31e6f6d53 100644 --- a/web/src/views/classification/ModelTrainingView.tsx +++ b/web/src/views/classification/ModelTrainingView.tsx @@ -804,6 +804,7 @@ function DatasetGrid({ name: "", }} showArea={false} + clickable={selectedImages.length > 0} selected={selectedImages.includes(image)} i18nLibrary="views/classificationModel" onClick={(data, _) => onClickImages([data.filename], true)} @@ -962,6 +963,7 @@ function StateTrainGrid({ data={data} threshold={threshold} selected={selectedImages.includes(data.filename)} + clickable={selectedImages.length > 0} i18nLibrary="views/classificationModel" showArea={false} onClick={(data, meta) => onClickImages([data.filename], meta)}