diff --git a/web/src/AppBar.jsx b/web/src/AppBar.jsx index 8a43e97ed..3af7b2d1a 100644 --- a/web/src/AppBar.jsx +++ b/web/src/AppBar.jsx @@ -14,6 +14,7 @@ import { useRestart } from './api/mqtt'; export default function AppBar() { const [showMoreMenu, setShowMoreMenu] = useState(false); const [showDialog, setShowDialog] = useState(false); + const [showDialogWait, setShowDialogWait] = useState(false); const { setDarkMode } = useDarkMode(); const { send: sendRestart } = useRestart(); @@ -37,6 +38,7 @@ export default function AppBar() { const handleClickRestartDialog = useCallback(() => { setShowDialog(false); + setShowDialogWait(true); sendRestart(); }, [setShowDialog]); @@ -72,6 +74,12 @@ export default function AppBar() { { text: 'Cancel', onClick: handleDismissRestartDialog }, ]} /> + ) : null}, + {showDialogWait ? ( + ) : null} );