From b88bf2f08d6ecce7a1829790aad586d8089bbb56 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 10 Nov 2025 15:24:11 -0600 Subject: [PATCH] use drawer for stream selection on mobile in step 3 --- .../settings/wizard/Step3StreamConfig.tsx | 245 ++++++++++++------ 1 file changed, 166 insertions(+), 79 deletions(-) diff --git a/web/src/components/settings/wizard/Step3StreamConfig.tsx b/web/src/components/settings/wizard/Step3StreamConfig.tsx index 1ade7a037..f99ba90c0 100644 --- a/web/src/components/settings/wizard/Step3StreamConfig.tsx +++ b/web/src/components/settings/wizard/Step3StreamConfig.tsx @@ -25,11 +25,17 @@ import { PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; -import { LuInfo, LuExternalLink } from "react-icons/lu"; +import { Drawer, DrawerContent, DrawerTrigger } from "@/components/ui/drawer"; +import { isMobile } from "react-device-detect"; +import { + LuInfo, + LuExternalLink, + LuCheck, + LuChevronsUpDown, +} from "react-icons/lu"; import { Link } from "react-router-dom"; import { useDocDomain } from "@/hooks/use-doc-domain"; import { cn } from "@/lib/utils"; -import { Check, ChevronsUpDown } from "lucide-react"; import { Command, CommandEmpty, @@ -384,84 +390,165 @@ export default function Step3StreamConfig({
{isProbeMode && probeCandidates.length > 0 ? ( - { - setOpenCombobox(isOpen ? stream.id : null); - }} - > - -
- -
-
- { + setOpenCombobox(isOpen ? stream.id : null); + }} > - - - - - {t("cameraWizard.step3.noStreamFound")} - - - {probeCandidates - .filter((c) => { - const used = getUsedUrlsExcludingStream( - stream.id, - ); - return !used.has(c); - }) - .map((candidate) => ( - { - updateStream(stream.id, { - url: candidate, - testResult: - candidateTests[candidate] || - undefined, - userTested: - !!candidateTests[candidate], - }); - setOpenCombobox(null); - }} - > - - {candidate} - - ))} - - - - -
+ +
+ +
+
+ + + + + + {t("cameraWizard.step3.noStreamFound")} + + + {probeCandidates + .filter((c) => { + const used = getUsedUrlsExcludingStream( + stream.id, + ); + return !used.has(c); + }) + .map((candidate) => ( + { + updateStream(stream.id, { + url: candidate, + testResult: + candidateTests[candidate] || + undefined, + userTested: + !!candidateTests[candidate], + }); + setOpenCombobox(null); + }} + > + + {candidate} + + ))} + + + + + + ) : ( + + setOpenCombobox(isOpen ? stream.id : null) + } + > + +
+ +
+
+ +
+ + + + + {t("cameraWizard.step3.noStreamFound")} + + + {probeCandidates + .filter((c) => { + const used = getUsedUrlsExcludingStream( + stream.id, + ); + return !used.has(c); + }) + .map((candidate) => ( + { + updateStream(stream.id, { + url: candidate, + testResult: + candidateTests[candidate] || + undefined, + userTested: + !!candidateTests[candidate], + }); + setOpenCombobox(null); + }} + > + + {candidate} + + ))} + + + +
+
+
+ ) ) : (