fixed white screen on startup

This commit is contained in:
antelle 2017-12-03 01:04:16 +01:00
parent 9ee1080240
commit f82312b9d0
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ let htmlPath = process.argv.filter(arg => arg.startsWith('--htmlpath=')).map(arg
if (!htmlPath) {
htmlPath = 'file://' + path.join(__dirname, 'index.html');
}
const showDevToolsOnStart = process.argv.some(arg => arg.startsWith('--devtools'));
app.setPath('userData', path.join(tempUserDataPath, tempUserDataPathRand));
@ -141,6 +142,9 @@ function createMainWindow() {
});
setMenu();
mainWindow.loadURL(htmlPath);
if (showDevToolsOnStart) {
mainWindow.openDevTools();
}
mainWindow.webContents.on('dom-ready', () => {
setTimeout(() => {
mainWindow.show();

View File

@ -2,6 +2,7 @@ Release notes
-------------
##### v1.6.0 (2017-12-03)
`-` fixed white screen on startup
`+` `--devtools` command line argument
##### v1.6.0 (2017-12-02)
`+` desktop apps integrity protection