Commit f923ad92 authored by thatanimeweirdo's avatar thatanimeweirdo

Merge branch 'dialog-close-when-download' into 'master'

added dialog box for confirmation for closing app when chart is downloading

See merge request spinshare/client!43
parents 62b87280 e8018892
......@@ -115,6 +115,23 @@
}
});
window.onbeforeunload = (e) => {
if (this.$data.downloadQueue.length != 0) {
e.returnValue = false;
const options = {
type: 'question',
buttons: ['No', 'Yes'],
message: 'Do you really want to quit?',
detail: 'Quitting while a chart is downloading may cause errors.',
};
dialog.showMessageBox(null, options, (response) => {
if (response == 1) {
remote.getCurrentWindow().destroy();
}
});
}
};
ipcRenderer.on("download-complete", (event, downloadItem) => {
let srxdControl = new SRXD();
let userSettings = new UserSettings();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment