mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-25 03:33:14 +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 electron = require('electron'); // eslint-disable-line
|
||||||
const isDev = require('electron-is-dev');
|
const isDev = require('electron-is-dev');
|
||||||
|
const path = require('path');
|
||||||
|
const url = require('url');
|
||||||
|
|
||||||
const menu = require('./menu');
|
const menu = require('./menu');
|
||||||
|
|
||||||
@ -18,7 +20,11 @@ function createWindow() {
|
|||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
darkTheme: true,
|
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', () => {
|
mainWindow.on('closed', () => {
|
||||||
// Dereference the window object, usually you would store windows
|
// Dereference the window object, usually you would store windows
|
||||||
|
Loading…
Reference in New Issue
Block a user