error handling, launcher ui, read-only mode, rm plot/smooth
This commit is contained in:
parent
cee4cb81b7
commit
4f31985930
59 changed files with 1299 additions and 781 deletions
|
|
@ -20,17 +20,22 @@ module.exports = function(options={}) {
|
|||
useContentSize: true,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: !!options.node
|
||||
nodeIntegration: !!options.node,
|
||||
|
||||
},
|
||||
show: false,
|
||||
})
|
||||
|
||||
window.once('ready-to-show', ()=>{
|
||||
if (options.fullscreen) {
|
||||
window.setFullScreen(true)
|
||||
}
|
||||
window.show()
|
||||
|
||||
})
|
||||
window.webContents.once('page-title-updated', ()=>{
|
||||
if (options.fullscreen) {
|
||||
window.webContents.sendInputEvent({keyCode: 'F11', type: 'keyDown'})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
window.webContents.on('will-prevent-unload', (event)=>{
|
||||
var choice = dialog.showMessageBoxSync(window, {
|
||||
|
|
@ -79,10 +84,6 @@ module.exports = function(options={}) {
|
|||
window.reload()
|
||||
})
|
||||
|
||||
if (options.fullscreen) shortcut.register(window,'F11',function(){
|
||||
window.setFullScreen(!window.isFullScreen())
|
||||
})
|
||||
|
||||
shortcut.register(window,'F12',function(){
|
||||
window.toggleDevTools()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue