Merge pull request #61 from huffman/console

Hide menu
This commit is contained in:
Stephen Birarda 2015-12-22 13:07:37 -07:00
commit 532c1e3a8c
2 changed files with 11 additions and 2 deletions

View file

@ -18,8 +18,8 @@
},
"main": "src/main.js",
"scripts": {
"start": "electron . --local-debug-builds",
"local-release": "electron . --local-release-builds",
"start": "electron . --local-debug-builds --debug",
"local-release": "electron . --local-release-builds --debug",
"package-darwin": "electron-packager . High\\ Fidelity --overwrite --platform=darwin --arch=x64 --version=0.36.0 --icon=resources/console.icns",
"package-win": "electron-packager . High\\ Fidelity --overwrite --platform=win32 --arch=x64 --version=0.36.0 --icon=resources/console.ico",
"package-linux": "electron-packager . High\\ Fidelity --overwrite --platform=linux --arch=x64 --version=0.36.0"

View file

@ -42,6 +42,8 @@ var interfacePath = null;
var dsPath = null;
var acPath = null;
var debug = argv.debug;
if (argv.localDebugBuilds || argv.localReleaseBuilds) {
interfacePath = pathFinder.discoveredPath("Interface", argv.localReleaseBuilds);
dsPath = pathFinder.discoveredPath("domain-server", argv.localReleaseBuilds);
@ -88,6 +90,13 @@ app.on('ready', function() {
resizable: false
});
// In debug mode, keep the menu bar, but auto-hide it so the UI still looks the same.
if (debug) {
mainWindow.setAutoHideMenuBar(true);
} else {
mainWindow.setMenu(null);
}
// and load the index.html of the app.
mainWindow.loadURL('file://' + __dirname + '/index.html');