mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
remove workarounds in restart dialog
This commit is contained in:
parent
f843d3e549
commit
deffd7d2c2
@ -38,12 +38,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]);
|
||||||
@ -85,16 +79,10 @@ export default function RestartDialog({
|
|||||||
if (!open) {
|
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">
|
<AlertDialogDescription className="sr-only">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user