Restore close and shutdown confirmation dialog

pull/7430/head
sai-chand04 2 years ago committed by GitHub
parent 43b8cceb69
commit 1b5a56b5f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -163,9 +163,15 @@ const closeTab: JupyterFrontEndPlugin<void> = {
commands.addCommand(id, {
label: trans.__('Close and Shut Down Notebook'),
execute: async () => {
// Shut the kernel down, without confirmation
await commands.execute('notebook:shutdown-kernel', { activate: false });
window.close();
const confirm = window.confirm(
trans.__('Are you sure you want to close and shut down the notebook?')
);
if (confirm) {
await commands.execute('notebook:shutdown-kernel', {
activate: false,
});
window.close();
}
},
});
menu.fileMenu.closeAndCleaners.add({

Loading…
Cancel
Save