Inline buttons and cancelId values
This commit is contained in:
parent
3ac9858726
commit
72e559458f
1 changed files with 2 additions and 5 deletions
|
@ -8,17 +8,14 @@ window.onload = function () {
|
||||||
|
|
||||||
window.confirm = function (message, title) {
|
window.confirm = function (message, title) {
|
||||||
const {dialog} = require('electron').remote
|
const {dialog} = require('electron').remote
|
||||||
let buttons, cancelId
|
|
||||||
if (title == null) {
|
if (title == null) {
|
||||||
title = ''
|
title = ''
|
||||||
}
|
}
|
||||||
buttons = ['OK', 'Cancel']
|
|
||||||
cancelId = 1
|
|
||||||
return !dialog.showMessageBox({
|
return !dialog.showMessageBox({
|
||||||
message: message,
|
message: message,
|
||||||
title: title,
|
title: title,
|
||||||
buttons: buttons,
|
buttons: ['OK', 'Cancel'],
|
||||||
cancelId: cancelId
|
cancelId: 1
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue