Cleanup dialogs

This commit is contained in:
Nicolas Mowen 2025-04-10 14:11:32 -06:00
parent e1c2364877
commit 8d7d0ca96a
2 changed files with 12 additions and 1 deletions

View File

@ -2,6 +2,9 @@ import {
Drawer, Drawer,
DrawerClose, DrawerClose,
DrawerContent, DrawerContent,
DrawerDescription,
DrawerHeader,
DrawerTitle,
DrawerTrigger, DrawerTrigger,
} from "@/components/ui/drawer"; } from "@/components/ui/drawer";
import { import {
@ -74,6 +77,12 @@ export default function FaceSelectionDialog({
isMobile && "mx-1 gap-2 rounded-t-2xl px-4", isMobile && "mx-1 gap-2 rounded-t-2xl px-4",
)} )}
> >
{isMobile && (
<DrawerHeader className="sr-only">
<DrawerTitle>Log Details</DrawerTitle>
<DrawerDescription>Log details</DrawerDescription>
</DrawerHeader>
)}
<DropdownMenuLabel>{t("trainFaceAs")}</DropdownMenuLabel> <DropdownMenuLabel>{t("trainFaceAs")}</DropdownMenuLabel>
<div <div
className={cn( className={cn(

View File

@ -8,6 +8,8 @@ import {
DialogHeader, DialogHeader,
DialogTitle, DialogTitle,
} from "@/components/ui/dialog"; } from "@/components/ui/dialog";
import { cn } from "@/lib/utils";
import { isMobile } from "react-device-detect";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
type TextEntryDialogProps = { type TextEntryDialogProps = {
@ -43,7 +45,7 @@ export default function TextEntryDialog({
allowEmpty={allowEmpty} allowEmpty={allowEmpty}
onSave={onSave} onSave={onSave}
> >
<DialogFooter className="pt-4"> <DialogFooter className={cn("pt-4", isMobile && "gap-2")}>
<Button type="button" onClick={() => setOpen(false)}> <Button type="button" onClick={() => setOpen(false)}>
{t("button.cancel")} {t("button.cancel")}
</Button> </Button>