Merge branch 'blakeblackshear:dev' into dev

This commit is contained in:
GuoQing Liu 2025-03-10 09:39:25 +08:00 committed by GitHub
commit 507ce019ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -31,6 +31,9 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";
import { debounce } from "lodash";
import { isIOS, isMobile } from "react-device-detect";
import { isPWA } from "@/utils/isPWA";
import { isInIframe } from "@/utils/isIFrame";
function Logs() {
const [logService, setLogService] = useState<LogType>("frigate");
@ -54,7 +57,8 @@ function Logs() {
);
if (element instanceof HTMLElement) {
scrollIntoView(element, {
behavior: "smooth",
behavior:
isMobile && isIOS && !isPWA && isInIframe ? "auto" : "smooth",
inline: "start",
});
}

View File

@ -20,7 +20,7 @@ import { Drawer, DrawerContent, DrawerTrigger } from "@/components/ui/drawer";
import { Button } from "@/components/ui/button";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import useOptimisticState from "@/hooks/use-optimistic-state";
import { isMobile, isMobileSafari } from "react-device-detect";
import { isIOS, isMobile } from "react-device-detect";
import { FaVideo } from "react-icons/fa";
import { CameraConfig, FrigateConfig } from "@/types/frigateConfig";
import useSWR from "swr";
@ -153,7 +153,8 @@ export default function Settings() {
);
if (element instanceof HTMLElement) {
scrollIntoView(element, {
behavior: isMobileSafari && !isPWA && isInIframe ? "auto" : "smooth",
behavior:
isMobile && isIOS && !isPWA && isInIframe ? "auto" : "smooth",
inline: "start",
});
}