mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
fix electron app bug
This commit is contained in:
18
main.js
18
main.js
@@ -8,9 +8,9 @@ require('crash-reporter').start()
|
|||||||
// be closed automatically when the javascript object is GCed.
|
// be closed automatically when the javascript object is GCed.
|
||||||
var mainWindow = null
|
var mainWindow = null
|
||||||
|
|
||||||
app.on('window-all-closed', function () {
|
// app.on('window-all-closed', function () {
|
||||||
if (process.platform !== 'darwin') app.quit()
|
// if (process.platform !== 'darwin') app.quit()
|
||||||
})
|
// })
|
||||||
|
|
||||||
var clipboard = require('clipboard')
|
var clipboard = require('clipboard')
|
||||||
|
|
||||||
@@ -27,19 +27,7 @@ app.on('ready', function () {
|
|||||||
mainWindow.show()
|
mainWindow.show()
|
||||||
})
|
})
|
||||||
|
|
||||||
mainWindow = new BrowserWindow({
|
|
||||||
width: 800,
|
|
||||||
height: 600,
|
|
||||||
'web-preferences': {
|
|
||||||
'overlay-scrollbars': true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
mainWindow.loadUrl('file://' + __dirname + '/electron_build/index.html')
|
|
||||||
|
|
||||||
makeNewMainWindow()
|
makeNewMainWindow()
|
||||||
// mainWindow.openDevTools()
|
|
||||||
|
|
||||||
|
|
||||||
var globalShortcut = require('global-shortcut')
|
var globalShortcut = require('global-shortcut')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user