mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Small UI bugfix (#17035)
* test for more HA elements * check if mobile and iOS instead of mobilesafari * simplify * fix for logs view
This commit is contained in:
		
							parent
							
								
									cf3c0b2eb5
								
							
						
					
					
						commit
						95b5854449
					
				@ -31,6 +31,9 @@ import {
 | 
				
			|||||||
  TooltipTrigger,
 | 
					  TooltipTrigger,
 | 
				
			||||||
} from "@/components/ui/tooltip";
 | 
					} from "@/components/ui/tooltip";
 | 
				
			||||||
import { debounce } from "lodash";
 | 
					import { debounce } from "lodash";
 | 
				
			||||||
 | 
					import { isIOS, isMobile } from "react-device-detect";
 | 
				
			||||||
 | 
					import { isPWA } from "@/utils/isPWA";
 | 
				
			||||||
 | 
					import { isInIframe } from "@/utils/isIFrame";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function Logs() {
 | 
					function Logs() {
 | 
				
			||||||
  const [logService, setLogService] = useState<LogType>("frigate");
 | 
					  const [logService, setLogService] = useState<LogType>("frigate");
 | 
				
			||||||
@ -54,7 +57,8 @@ function Logs() {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
      if (element instanceof HTMLElement) {
 | 
					      if (element instanceof HTMLElement) {
 | 
				
			||||||
        scrollIntoView(element, {
 | 
					        scrollIntoView(element, {
 | 
				
			||||||
          behavior: "smooth",
 | 
					          behavior:
 | 
				
			||||||
 | 
					            isMobile && isIOS && !isPWA && isInIframe ? "auto" : "smooth",
 | 
				
			||||||
          inline: "start",
 | 
					          inline: "start",
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,7 @@ import { Drawer, DrawerContent, DrawerTrigger } from "@/components/ui/drawer";
 | 
				
			|||||||
import { Button } from "@/components/ui/button";
 | 
					import { Button } from "@/components/ui/button";
 | 
				
			||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
 | 
					import { useCallback, useEffect, useMemo, useRef, useState } from "react";
 | 
				
			||||||
import useOptimisticState from "@/hooks/use-optimistic-state";
 | 
					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 { FaVideo } from "react-icons/fa";
 | 
				
			||||||
import { CameraConfig, FrigateConfig } from "@/types/frigateConfig";
 | 
					import { CameraConfig, FrigateConfig } from "@/types/frigateConfig";
 | 
				
			||||||
import useSWR from "swr";
 | 
					import useSWR from "swr";
 | 
				
			||||||
@ -152,7 +152,8 @@ export default function Settings() {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
      if (element instanceof HTMLElement) {
 | 
					      if (element instanceof HTMLElement) {
 | 
				
			||||||
        scrollIntoView(element, {
 | 
					        scrollIntoView(element, {
 | 
				
			||||||
          behavior: isMobileSafari && !isPWA && isInIframe ? "auto" : "smooth",
 | 
					          behavior:
 | 
				
			||||||
 | 
					            isMobile && isIOS && !isPWA && isInIframe ? "auto" : "smooth",
 | 
				
			||||||
          inline: "start",
 | 
					          inline: "start",
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user