mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-25 05:28:29 +03:00
Cleanup cursor pointer for classification cards
This commit is contained in:
parent
86f3244b6a
commit
eefa0977e3
@ -40,6 +40,7 @@ type ClassificationCardProps = {
|
|||||||
data: ClassificationItemData;
|
data: ClassificationItemData;
|
||||||
threshold?: ClassificationThreshold;
|
threshold?: ClassificationThreshold;
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
|
clickable: boolean;
|
||||||
i18nLibrary: string;
|
i18nLibrary: string;
|
||||||
showArea?: boolean;
|
showArea?: boolean;
|
||||||
count?: number;
|
count?: number;
|
||||||
@ -56,6 +57,7 @@ export const ClassificationCard = forwardRef<
|
|||||||
data,
|
data,
|
||||||
threshold,
|
threshold,
|
||||||
selected,
|
selected,
|
||||||
|
clickable,
|
||||||
i18nLibrary,
|
i18nLibrary,
|
||||||
showArea = true,
|
showArea = true,
|
||||||
count,
|
count,
|
||||||
@ -101,11 +103,12 @@ export const ClassificationCard = forwardRef<
|
|||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex size-full cursor-pointer flex-col overflow-hidden rounded-lg outline outline-[3px]",
|
"relative flex size-full flex-col overflow-hidden rounded-lg outline outline-[3px]",
|
||||||
className,
|
className,
|
||||||
selected
|
selected
|
||||||
? "shadow-selected outline-selected"
|
? "shadow-selected outline-selected"
|
||||||
: "outline-transparent duration-500",
|
: "outline-transparent duration-500",
|
||||||
|
clickable && "cursor-pointer",
|
||||||
)}
|
)}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
const isMeta = e.metaKey || e.ctrlKey;
|
const isMeta = e.metaKey || e.ctrlKey;
|
||||||
@ -289,6 +292,7 @@ export function GroupedClassificationCard({
|
|||||||
data={bestItem}
|
data={bestItem}
|
||||||
threshold={threshold}
|
threshold={threshold}
|
||||||
selected={selectedItems.includes(bestItem.filename)}
|
selected={selectedItems.includes(bestItem.filename)}
|
||||||
|
clickable={true}
|
||||||
i18nLibrary={i18nLibrary}
|
i18nLibrary={i18nLibrary}
|
||||||
count={group.length}
|
count={group.length}
|
||||||
onClick={(_, meta) => {
|
onClick={(_, meta) => {
|
||||||
@ -413,6 +417,7 @@ export function GroupedClassificationCard({
|
|||||||
data={data}
|
data={data}
|
||||||
threshold={threshold}
|
threshold={threshold}
|
||||||
selected={false}
|
selected={false}
|
||||||
|
clickable={false}
|
||||||
i18nLibrary={i18nLibrary}
|
i18nLibrary={i18nLibrary}
|
||||||
onClick={() => {}}
|
onClick={() => {}}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -804,6 +804,7 @@ function DatasetGrid({
|
|||||||
name: "",
|
name: "",
|
||||||
}}
|
}}
|
||||||
showArea={false}
|
showArea={false}
|
||||||
|
clickable={selectedImages.length > 0}
|
||||||
selected={selectedImages.includes(image)}
|
selected={selectedImages.includes(image)}
|
||||||
i18nLibrary="views/classificationModel"
|
i18nLibrary="views/classificationModel"
|
||||||
onClick={(data, _) => onClickImages([data.filename], true)}
|
onClick={(data, _) => onClickImages([data.filename], true)}
|
||||||
@ -962,6 +963,7 @@ function StateTrainGrid({
|
|||||||
data={data}
|
data={data}
|
||||||
threshold={threshold}
|
threshold={threshold}
|
||||||
selected={selectedImages.includes(data.filename)}
|
selected={selectedImages.includes(data.filename)}
|
||||||
|
clickable={selectedImages.length > 0}
|
||||||
i18nLibrary="views/classificationModel"
|
i18nLibrary="views/classificationModel"
|
||||||
showArea={false}
|
showArea={false}
|
||||||
onClick={(data, meta) => onClickImages([data.filename], meta)}
|
onClick={(data, meta) => onClickImages([data.filename], meta)}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user