add warning to logout

This commit is contained in:
PhilReact 2024-12-17 21:28:29 +02:00
parent 7d2fc5a7b0
commit c5afade0cf
2 changed files with 8 additions and 3 deletions

View File

@ -1068,6 +1068,11 @@ function App() {
message: message:
"Your settings have changed. If you logout you will lose your changes. Click on the save button in the header to keep your changed settings.", "Your settings have changed. If you logout you will lose your changes. Click on the save button in the header to keep your changed settings.",
}); });
} else {
await showUnsavedChanges({
message:
"Are you sure you would like to logout?",
});
} }
window window
.sendMessage("logout", {}) .sendMessage("logout", {})
@ -2933,10 +2938,10 @@ await showInfo({
</DialogContentText> </DialogContentText>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button variant="contained" onClick={onCancelUnsavedChanges}> <Button size="small" variant="contained" onClick={onCancelUnsavedChanges}>
Cancel Cancel
</Button> </Button>
<Button variant="contained" onClick={onOkUnsavedChanges} autoFocus> <Button size="small" variant="contained" onClick={onOkUnsavedChanges} autoFocus>
Continue to Logout Continue to Logout
</Button> </Button>
</DialogActions> </DialogActions>

View File

@ -199,7 +199,7 @@ export const AdminSpaceInner = ({
{` by ${groupSecretKeyPublishDetails?.name}`} {` by ${groupSecretKeyPublishDetails?.name}`}
</Typography> </Typography>
)} )}
<Button disabled={isFetchingGroupSecretKey} onClick={()=> setIsForceShowCreationKeyPopup(true) variant="contained"> <Button disabled={isFetchingGroupSecretKey} onClick={()=> setIsForceShowCreationKeyPopup(true)} variant="contained">
Publish group secret key Publish group secret key
</Button> </Button>
<Spacer height="20px" /> <Spacer height="20px" />