mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
rename reset to "remove all", move top of screen and fix messages when auto-restarting
This commit is contained in:
@@ -364,6 +364,7 @@ const Customizations = () => {
|
|||||||
toast.error((error as Error).message);
|
toast.error((error as Error).message);
|
||||||
} finally {
|
} finally {
|
||||||
setConfirmReset(false);
|
setConfirmReset(false);
|
||||||
|
setRestarting(true);
|
||||||
}
|
}
|
||||||
}, [sendResetCustomizations, LL]);
|
}, [sendResetCustomizations, LL]);
|
||||||
|
|
||||||
@@ -519,6 +520,14 @@ const Customizations = () => {
|
|||||||
{LL.RENAME()}
|
{LL.RENAME()}
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
|
<Button
|
||||||
|
startIcon={<SettingsBackupRestoreIcon />}
|
||||||
|
variant="outlined"
|
||||||
|
color="error"
|
||||||
|
onClick={() => setConfirmReset(true)}
|
||||||
|
>
|
||||||
|
{LL.REMOVE_ALL()}
|
||||||
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -687,7 +696,7 @@ const Customizations = () => {
|
|||||||
open={confirmReset}
|
open={confirmReset}
|
||||||
onClose={() => setConfirmReset(false)}
|
onClose={() => setConfirmReset(false)}
|
||||||
>
|
>
|
||||||
<DialogTitle>{LL.RESET(1)}</DialogTitle>
|
<DialogTitle>{LL.REMOVE_ALL()}</DialogTitle>
|
||||||
<DialogContent dividers>{LL.CUSTOMIZATIONS_RESET()}</DialogContent>
|
<DialogContent dividers>{LL.CUSTOMIZATIONS_RESET()}</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button
|
<Button
|
||||||
@@ -704,7 +713,7 @@ const Customizations = () => {
|
|||||||
onClick={resetCustomization}
|
onClick={resetCustomization}
|
||||||
color="error"
|
color="error"
|
||||||
>
|
>
|
||||||
{LL.RESET(0)}
|
{LL.REMOVE_ALL()}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@@ -753,18 +762,6 @@ const Customizations = () => {
|
|||||||
</ButtonRow>
|
</ButtonRow>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
{!rename && (
|
|
||||||
<ButtonRow mt={1}>
|
|
||||||
<Button
|
|
||||||
startIcon={<SettingsBackupRestoreIcon />}
|
|
||||||
variant="outlined"
|
|
||||||
color="error"
|
|
||||||
onClick={() => setConfirmReset(true)}
|
|
||||||
>
|
|
||||||
{LL.RESET(0)}
|
|
||||||
</Button>
|
|
||||||
</ButtonRow>
|
|
||||||
)}
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
{renderResetDialog()}
|
{renderResetDialog()}
|
||||||
|
|||||||
Reference in New Issue
Block a user