mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
Warn user in WebUI of unsaved changes #911
This commit is contained in:
@@ -18,7 +18,8 @@ import {
|
||||
BlockFormControlLabel,
|
||||
ValidatedTextField,
|
||||
ButtonRow,
|
||||
MessageBox
|
||||
MessageBox,
|
||||
BlockNavigation
|
||||
} from '../components';
|
||||
import { numberValue, extractErrorMessage, updateValueDirty, useRest } from '../utils';
|
||||
|
||||
@@ -46,6 +47,7 @@ const SettingsApplication: FC = () => {
|
||||
origData,
|
||||
dirtyFlags,
|
||||
setDirtyFlags,
|
||||
blocker,
|
||||
errorMessage,
|
||||
restartNeeded
|
||||
} = useRest<Settings>({
|
||||
@@ -662,6 +664,7 @@ const SettingsApplication: FC = () => {
|
||||
|
||||
return (
|
||||
<SectionContent title={LL.APPLICATION_SETTINGS()} titleGutter>
|
||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||
{restarting ? <RestartMonitor /> : content()}
|
||||
</SectionContent>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user