tidy up rename buttons

This commit is contained in:
proddy
2024-10-27 10:47:23 +01:00
parent d440e6dc9a
commit 4fdf1d810e

View File

@@ -464,14 +464,7 @@ const Customizations = () => {
)} )}
{selectedDevice !== -1 && {selectedDevice !== -1 &&
(rename ? ( (rename ? (
<ButtonRow> <>
<Button
startIcon={<SaveIcon />}
variant="contained"
onClick={() => renameDevice()}
>
{LL.UPDATE()}
</Button>
<Button <Button
startIcon={<CancelIcon />} startIcon={<CancelIcon />}
variant="outlined" variant="outlined"
@@ -480,7 +473,14 @@ const Customizations = () => {
> >
{LL.CANCEL()} {LL.CANCEL()}
</Button> </Button>
</ButtonRow> <Button
startIcon={<SaveIcon />}
variant="outlined"
onClick={() => renameDevice()}
>
{LL.RENAME()}
</Button>
</>
) : ( ) : (
<Button <Button
startIcon={<EditIcon />} startIcon={<EditIcon />}
@@ -716,16 +716,18 @@ const Customizations = () => {
</ButtonRow> </ButtonRow>
)} )}
</Box> </Box>
<ButtonRow mt={1}> {!rename && (
<Button <ButtonRow mt={1}>
startIcon={<SettingsBackupRestoreIcon />} <Button
variant="outlined" startIcon={<SettingsBackupRestoreIcon />}
color="error" variant="outlined"
onClick={() => setConfirmReset(true)} color="error"
> onClick={() => setConfirmReset(true)}
{LL.RESET(0)} >
</Button> {LL.RESET(0)}
</ButtonRow> </Button>
</ButtonRow>
)}
</Box> </Box>
)} )}
{renderResetDialog()} {renderResetDialog()}