+ main menu support
+ about info
This commit is contained in:
10
main.js
10
main.js
@@ -1,5 +1,5 @@
|
||||
// Modules to control application life and create native browser window
|
||||
const {app, ipcMain, BrowserWindow} = require('electron');
|
||||
const {app, Menu, ipcMain, BrowserWindow} = require('electron');
|
||||
const singleInstance = require('single-instance');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
@@ -9,7 +9,7 @@ var locker = new singleInstance('Ether1DesktopWallet');
|
||||
locker.lock().then(function() {
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
let mainWindow
|
||||
mainWindow = null;
|
||||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
@@ -35,7 +35,9 @@ locker.lock().then(function() {
|
||||
// in an array if your app supports multi windows, this is the time
|
||||
// when you should delete the corresponding element.
|
||||
mainWindow = null
|
||||
})
|
||||
});
|
||||
|
||||
require('./modules/menu.js');
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
@@ -59,7 +61,7 @@ locker.lock().then(function() {
|
||||
if (mainWindow === null) {
|
||||
createWindow()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// In this file you can include the rest of your app's specific main process
|
||||
// code. You can also put them in separate files and require them here.
|
||||
|
||||
Reference in New Issue
Block a user