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:
parent
6045d1218a
commit
12fcac59a2
8 changed files with 226 additions and 170 deletions
|
@ -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()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue