diff --git a/web/public/locales/en/views/motionSearch.json b/web/public/locales/en/views/motionSearch.json index 6e22c32035..2298bc0580 100644 --- a/web/public/locales/en/views/motionSearch.json +++ b/web/public/locales/en/views/motionSearch.json @@ -24,7 +24,9 @@ "points_one": "{{count}} point", "points_other": "{{count}} points", "undo": "Undo last point", - "reset": "Reset polygon" + "reset": "Reset polygon", + "drawMode": "Draw", + "moveMode": "Move" }, "motionHeatmapLabel": "Motion Heatmap", "dialog": { diff --git a/web/src/views/motion-search/MotionSearchDialog.tsx b/web/src/views/motion-search/MotionSearchDialog.tsx index a2c0d06ec6..2fd3f57105 100644 --- a/web/src/views/motion-search/MotionSearchDialog.tsx +++ b/web/src/views/motion-search/MotionSearchDialog.tsx @@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next"; import { isDesktop, isIOS, isMobile } from "react-device-detect"; import { FaArrowRight, FaCalendarAlt, FaCheckCircle } from "react-icons/fa"; import { MdOutlineRestartAlt, MdUndo } from "react-icons/md"; +import { LuHand, LuPencil } from "react-icons/lu"; import { FrigateConfig } from "@/types/frigateConfig"; import { TimeRange } from "@/types/timeline"; @@ -114,6 +115,7 @@ export default function MotionSearchDialog({ const { t } = useTranslation(["views/motionSearch", "common"]); const apiHost = useApiHost(); const [imageLoaded, setImageLoaded] = useState(false); + const [panMode, setPanMode] = useState(false); const cameraConfig = useMemo(() => { if (!selectedCamera) return undefined; @@ -166,6 +168,7 @@ export default function MotionSearchDialog({ useEffect(() => { setImageLoaded(false); + setPanMode(false); }, [selectedCamera]); const Overlay = isDesktop ? Dialog : Drawer; @@ -240,7 +243,13 @@ export default function MotionSearchDialog({ )} - +
) : ( @@ -312,11 +322,41 @@ export default function MotionSearchDialog({ {polygonClosed && }
+ {!isDesktop && ( + + + + + + {panMode + ? t("polygonControls.moveMode") + : t("polygonControls.drawMode")} + + + )}