mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
Compare commits
No commits in common. "da891cfa66e4d1f6de540dd4684f850ead417e6b" and "e21565a209bc0a085fa70c2c7728cb6445587105" have entirely different histories.
da891cfa66
...
e21565a209
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"restart": {
|
"restart": {
|
||||||
"title": "Are you sure you want to restart Frigate?",
|
"title": "Are you sure you want to restart Frigate?",
|
||||||
"description": "This will briefly stop Frigate while it restarts.",
|
|
||||||
"button": "Restart",
|
"button": "Restart",
|
||||||
"restarting": {
|
"restarting": {
|
||||||
"title": "Frigate is Restarting",
|
"title": "Frigate is Restarting",
|
||||||
|
|||||||
@ -42,20 +42,12 @@ import {
|
|||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from "@/components/ui/tooltip";
|
} from "@/components/ui/tooltip";
|
||||||
import { isDesktop, isMobile } from "react-device-detect";
|
import { isDesktop, isMobile } from "react-device-detect";
|
||||||
import {
|
import { Drawer, DrawerContent, DrawerTrigger } from "../ui/drawer";
|
||||||
Drawer,
|
|
||||||
DrawerContent,
|
|
||||||
DrawerDescription,
|
|
||||||
DrawerTitle,
|
|
||||||
DrawerTrigger,
|
|
||||||
} from "../ui/drawer";
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogClose,
|
DialogClose,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
DialogDescription,
|
|
||||||
DialogPortal,
|
DialogPortal,
|
||||||
DialogTitle,
|
|
||||||
DialogTrigger,
|
DialogTrigger,
|
||||||
} from "../ui/dialog";
|
} from "../ui/dialog";
|
||||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||||
@ -202,16 +194,6 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
: "max-h-[75dvh] overflow-hidden p-2"
|
: "max-h-[75dvh] overflow-hidden p-2"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{!isDesktop && (
|
|
||||||
<>
|
|
||||||
<DrawerTitle className="sr-only">
|
|
||||||
{t("menu.settings")}
|
|
||||||
</DrawerTitle>
|
|
||||||
<DrawerDescription className="sr-only">
|
|
||||||
{t("menu.settings")}
|
|
||||||
</DrawerDescription>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<div className="scrollbar-container w-full flex-col overflow-y-auto overflow-x-hidden">
|
<div className="scrollbar-container w-full flex-col overflow-y-auto overflow-x-hidden">
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<div className="mb-2">
|
<div className="mb-2">
|
||||||
@ -373,16 +355,6 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
: "scrollbar-container max-h-[75dvh] w-[92%] overflow-y-scroll rounded-lg md:rounded-2xl"
|
: "scrollbar-container max-h-[75dvh] w-[92%] overflow-y-scroll rounded-lg md:rounded-2xl"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{!isDesktop && (
|
|
||||||
<>
|
|
||||||
<DialogTitle className="sr-only">
|
|
||||||
{t("menu.languages")}
|
|
||||||
</DialogTitle>
|
|
||||||
<DialogDescription className="sr-only">
|
|
||||||
{t("menu.languages")}
|
|
||||||
</DialogDescription>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<span tabIndex={0} className="sr-only" />
|
<span tabIndex={0} className="sr-only" />
|
||||||
{languages.map(({ code, label }) => (
|
{languages.map(({ code, label }) => (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
@ -423,16 +395,6 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
|
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{!isDesktop && (
|
|
||||||
<>
|
|
||||||
<DialogTitle className="sr-only">
|
|
||||||
{t("menu.darkMode.label")}
|
|
||||||
</DialogTitle>
|
|
||||||
<DialogDescription className="sr-only">
|
|
||||||
{t("menu.darkMode.label")}
|
|
||||||
</DialogDescription>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<span tabIndex={0} className="sr-only" />
|
<span tabIndex={0} className="sr-only" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
className={
|
className={
|
||||||
@ -510,16 +472,6 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
|
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{!isDesktop && (
|
|
||||||
<>
|
|
||||||
<DialogTitle className="sr-only">
|
|
||||||
{t("menu.theme.label")}
|
|
||||||
</DialogTitle>
|
|
||||||
<DialogDescription className="sr-only">
|
|
||||||
{t("menu.theme.label")}
|
|
||||||
</DialogDescription>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<span tabIndex={0} className="sr-only" />
|
<span tabIndex={0} className="sr-only" />
|
||||||
{colorSchemes.map((scheme) => (
|
{colorSchemes.map((scheme) => (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import {
|
|||||||
AlertDialogAction,
|
AlertDialogAction,
|
||||||
AlertDialogCancel,
|
AlertDialogCancel,
|
||||||
AlertDialogContent,
|
AlertDialogContent,
|
||||||
AlertDialogDescription,
|
|
||||||
AlertDialogFooter,
|
AlertDialogFooter,
|
||||||
AlertDialogHeader,
|
AlertDialogHeader,
|
||||||
AlertDialogTitle,
|
AlertDialogTitle,
|
||||||
@ -38,12 +37,6 @@ export default function RestartDialog({
|
|||||||
const [restartingSheetOpen, setRestartingSheetOpen] = useState(false);
|
const [restartingSheetOpen, setRestartingSheetOpen] = useState(false);
|
||||||
const [countdown, setCountdown] = useState(60);
|
const [countdown, setCountdown] = useState(60);
|
||||||
|
|
||||||
const clearBodyPointerEvents = () => {
|
|
||||||
if (typeof document !== "undefined") {
|
|
||||||
document.body.style.pointerEvents = "";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setRestartDialogOpen(isOpen);
|
setRestartDialogOpen(isOpen);
|
||||||
}, [isOpen]);
|
}, [isOpen]);
|
||||||
@ -81,25 +74,14 @@ export default function RestartDialog({
|
|||||||
<>
|
<>
|
||||||
<AlertDialog
|
<AlertDialog
|
||||||
open={restartDialogOpen}
|
open={restartDialogOpen}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={() => {
|
||||||
if (!open) {
|
setRestartDialogOpen(false);
|
||||||
setRestartDialogOpen(false);
|
onClose();
|
||||||
onClose();
|
|
||||||
clearBodyPointerEvents();
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<AlertDialogContent
|
<AlertDialogContent>
|
||||||
onCloseAutoFocus={(event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
clearBodyPointerEvents();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<AlertDialogHeader>
|
<AlertDialogHeader>
|
||||||
<AlertDialogTitle>{t("restart.title")}</AlertDialogTitle>
|
<AlertDialogTitle>{t("restart.title")}</AlertDialogTitle>
|
||||||
<AlertDialogDescription className="sr-only">
|
|
||||||
{t("restart.description")}
|
|
||||||
</AlertDialogDescription>
|
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
<AlertDialogFooter>
|
<AlertDialogFooter>
|
||||||
<AlertDialogCancel>
|
<AlertDialogCancel>
|
||||||
|
|||||||
@ -26,5 +26,6 @@ export const supportedLanguageKeys = [
|
|||||||
"lt",
|
"lt",
|
||||||
"uk",
|
"uk",
|
||||||
"cs",
|
"cs",
|
||||||
|
"sk",
|
||||||
"hu",
|
"hu",
|
||||||
];
|
];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user