mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 02:12:30 +01:00
Fix loading of index.html
#40 https://electron.atom.io/docs/tutorial/quick-start/
This commit is contained in:
parent
c2d6bc237f
commit
8fccd53a18
@ -1,5 +1,7 @@
|
||||
const electron = require('electron'); // eslint-disable-line
|
||||
const isDev = require('electron-is-dev');
|
||||
const path = require('path');
|
||||
const url = require('url');
|
||||
|
||||
const menu = require('./menu');
|
||||
|
||||
@ -18,7 +20,11 @@ function createWindow() {
|
||||
mainWindow = new BrowserWindow({
|
||||
darkTheme: true,
|
||||
});
|
||||
mainWindow.loadURL(`file://${__dirname}/index.html`);
|
||||
mainWindow.loadURL(url.format({
|
||||
pathname: path.join(__dirname, 'index.html'),
|
||||
protocol: 'file:',
|
||||
slashes: true,
|
||||
}));
|
||||
|
||||
mainWindow.on('closed', () => {
|
||||
// Dereference the window object, usually you would store windows
|
||||
|
Loading…
Reference in New Issue
Block a user