refactor: clean up the default app, add CSP (#13437)

* refactor: clean up the default app, add CSP

* chore: appease the linter

* refactor: make js2asar more generic, dont assume default_app as target
This commit is contained in:
Samuel Attard 2018-07-17 10:26:58 +10:00 committed by GitHub
parent 6045d1218a
commit 12fcac59a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 226 additions and 170 deletions

View file

@ -18,13 +18,17 @@ exports.load = (appUrl) => {
webPreferences: {
nodeIntegrationInWorker: true
},
useContentSize: true
useContentSize: true,
show: false
}
if (process.platform === 'linux') {
options.icon = path.join(__dirname, 'icon.png')
}
mainWindow = new BrowserWindow(options)
mainWindow.on('ready-to-show', () => mainWindow.show())
mainWindow.loadURL(appUrl)
mainWindow.focus()
})