Moved main URL to constant
This commit is contained in:
parent
3fb6fc5c1e
commit
49079e4d7d
1 changed files with 3 additions and 2 deletions
|
@ -14,6 +14,7 @@ Menu.setApplicationMenu(menu);
|
|||
var mainWindow = null;
|
||||
var audioController = null;
|
||||
var icon = null;
|
||||
const INDEX_PAGE = 'file://' + __dirname + '/index.html';
|
||||
|
||||
// Make sure the application closes
|
||||
app.on('window-all-closed', function () {
|
||||
|
@ -33,7 +34,7 @@ app.on('ready', function () {
|
|||
height: 600,
|
||||
frame: false
|
||||
});
|
||||
mainWindow.loadUrl('file://' + __dirname + '/index.html');
|
||||
mainWindow.loadUrl(INDEX_PAGE);
|
||||
mainWindow.toggleDevTools();
|
||||
mainWindow.on('closed', function() {
|
||||
delete mainWindow;
|
||||
|
@ -56,8 +57,8 @@ ipc.on('hide', function () {
|
|||
});
|
||||
|
||||
ipc.on('show', function () {
|
||||
mainWindow.loadUrl('file://' + __dirname + '/index.html');
|
||||
mainWindow.show();
|
||||
mainWindow.loadUrl(INDEX_PAGE);
|
||||
});
|
||||
|
||||
ipc.on('close', function () {
|
||||
|
|
Reference in a new issue