rename reset to "remove all", move top of screen and fix messages when auto-restarting

This commit is contained in:
proddy
2025-11-10 21:22:24 +01:00
parent e74dc1fd78
commit 1f6462be38

View File

@@ -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()}