From a289ed1f908d905c8f0492c04281bd55e5710427 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 20 Aug 2025 06:45:46 -0600 Subject: [PATCH] Enable mobile view for classification and optimize for mobile layout --- web/src/components/menu/GeneralSettings.tsx | 14 ++++++++++++++ .../overlay/dialog/TrainFilterDialog.tsx | 2 +- .../views/classification/ModelSelectionView.tsx | 4 +++- web/src/views/classification/ModelTrainingView.tsx | 10 ++++++++-- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/web/src/components/menu/GeneralSettings.tsx b/web/src/components/menu/GeneralSettings.tsx index c4ccdff84..96eee7675 100644 --- a/web/src/components/menu/GeneralSettings.tsx +++ b/web/src/components/menu/GeneralSettings.tsx @@ -65,6 +65,7 @@ import { useTranslation } from "react-i18next"; import { supportedLanguageKeys } from "@/lib/const"; import { useDocDomain } from "@/hooks/use-doc-domain"; +import { MdCategory } from "react-icons/md"; type GeneralSettingsProps = { className?: string; @@ -315,6 +316,19 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) { )} + {isAdmin && isMobile && config?.face_recognition.enabled && ( + <> + + + + {t("menu.classification")} + + + + )} {t("menu.appearance")} diff --git a/web/src/components/overlay/dialog/TrainFilterDialog.tsx b/web/src/components/overlay/dialog/TrainFilterDialog.tsx index 56037ec0a..f4ccf41e1 100644 --- a/web/src/components/overlay/dialog/TrainFilterDialog.tsx +++ b/web/src/components/overlay/dialog/TrainFilterDialog.tsx @@ -60,7 +60,7 @@ export default function TrainFilterDialog({ moreFiltersSelected ? "text-white" : "text-secondary-foreground", )} /> - {t("more")} + {isDesktop && t("more")} ); const content = ( diff --git a/web/src/views/classification/ModelSelectionView.tsx b/web/src/views/classification/ModelSelectionView.tsx index aa2f94c6a..2dd7e0375 100644 --- a/web/src/views/classification/ModelSelectionView.tsx +++ b/web/src/views/classification/ModelSelectionView.tsx @@ -79,7 +79,9 @@ function ModelCard({ config, onClick }: ModelCardProps) { )} onClick={() => onClick()} > -
+
{Object.entries(coverImages).map(([key, image]) => ( )} - {t("button.trainModel")} + {isDesktop && t("button.trainModel")}
)} @@ -725,7 +725,12 @@ function TrainGrid({ ); return ( -
+
{trainData?.map((data) => (
{ e.stopPropagation();