diff --git a/web/src/components/card/ClassificationCard.tsx b/web/src/components/card/ClassificationCard.tsx index ef45b844f..2d0d1bdb9 100644 --- a/web/src/components/card/ClassificationCard.tsx +++ b/web/src/components/card/ClassificationCard.tsx @@ -20,16 +20,18 @@ import { Dialog, DialogContent, DialogDescription, + DialogHeader, DialogTitle, DialogTrigger, } from "../ui/dialog"; import { - Drawer, - DrawerTrigger, - DrawerContent, - DrawerTitle, - DrawerDescription, -} from "../ui/drawer"; + MobilePage, + MobilePageContent, + MobilePageDescription, + MobilePageHeader, + MobilePageTitle, + MobilePageTrigger, +} from "../mobile/MobilePage"; type ClassificationCardProps = { imgClassName?: string; @@ -247,11 +249,14 @@ export function GroupedClassificationCard({ return null; } - const Overlay = isDesktop ? Dialog : Drawer; - const Trigger = isDesktop ? DialogTrigger : DrawerTrigger; - const Content = isDesktop ? DialogContent : DrawerContent; - const ContentTitle = isDesktop ? DialogTitle : DrawerTitle; - const ContentDescription = isDesktop ? DialogDescription : DrawerDescription; + const Overlay = isDesktop ? Dialog : MobilePage; + const Trigger = isDesktop ? DialogTrigger : MobilePageTrigger; + const Header = isDesktop ? DialogHeader : MobilePageHeader; + const Content = isDesktop ? DialogContent : MobilePageContent; + const ContentTitle = isDesktop ? DialogTitle : MobilePageTitle; + const ContentDescription = isDesktop + ? DialogDescription + : MobilePageDescription; return ( <> @@ -282,8 +287,7 @@ export function GroupedClassificationCard({ className={cn( "", isDesktop && "w-auto max-w-[85%]", - !isDesktop && - "max-h-[75dvh] overflow-hidden rounded-t-2xl px-4 pb-4", + isMobile && "flex flex-col", )} onOpenAutoFocus={(e) => e.preventDefault()} > @@ -314,38 +318,42 @@ export function GroupedClassificationCard({ )} )} - - {event?.sub_label ? event.sub_label : t("details.unknown")} - {event?.sub_label && ( -
+
+ {`${Math.round((event.data.sub_label_score || 0) * 100)}%`}
- )} - - - {time && ( - - )} - + > + {event?.sub_label ? event.sub_label : t("details.unknown")} + {event?.sub_label && ( +
{`${Math.round((event.data.sub_label_score || 0) * 100)}%`}
+ )} + + + {time && ( + + )} + +
+
{group.map((data: ClassificationItemData) => ( diff --git a/web/src/pages/FaceLibrary.tsx b/web/src/pages/FaceLibrary.tsx index dcbff4e04..efb38dd6f 100644 --- a/web/src/pages/FaceLibrary.tsx +++ b/web/src/pages/FaceLibrary.tsx @@ -695,7 +695,7 @@ function TrainingGrid({
diff --git a/web/src/views/classification/ModelTrainingView.tsx b/web/src/views/classification/ModelTrainingView.tsx index 0b313db68..c560e6207 100644 --- a/web/src/views/classification/ModelTrainingView.tsx +++ b/web/src/views/classification/ModelTrainingView.tsx @@ -791,7 +791,7 @@ function StateTrainGrid({
@@ -927,7 +927,7 @@ function ObjectTrainGrid({
{Object.entries(groups).map(([key, group]) => { const event = events?.find((ev) => ev.id == key);