Hide menu-bar on Raspberry Pi and some comments

This commit is contained in:
Paul-Vincent Roll 2016-03-28 01:59:05 +02:00
parent 331c12269c
commit df153ee1a1
2 changed files with 9 additions and 5 deletions

View File

@ -15,7 +15,7 @@ let mainWindow;
function createWindow () { function createWindow () {
// Create the browser window. // Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600, fullscreen: true, "node-integration": false}); mainWindow = new BrowserWindow({width: 800, height: 600, fullscreen: true, "auto-hide-menu-bar": true, "node-integration": false});
// and load the index.html of the app. // and load the index.html of the app.
mainWindow.loadURL('file://' + __dirname + '../../index.html'); mainWindow.loadURL('file://' + __dirname + '../../index.html');
@ -32,19 +32,23 @@ function createWindow () {
}); });
} }
//Start helper scripts //Walk module folder and get file names
var module_loader = walk.walk(__dirname + '/../modules', { followLinks: false }); var module_loader = walk.walk(__dirname + '/../modules', { followLinks: false });
//for each file in modules
module_loader.on('file', function(root, stat, next) { module_loader.on('file', function(root, stat, next) {
//if file is called node_helper.js load it
if (stat.name == "node_helper.js"){ if (stat.name == "node_helper.js"){
require(root + '/' + stat.name); require(root + '/' + stat.name);
//Log module name
var module = (root + '/' + stat.name).split("/")
console.log("Started helper script for module " + module[module.length-2] + ".");
} }
next(); next();
}); });
module_loader.on('end', function() { module_loader.on('end', function() {
console.log("Helpers startet"); console.log("All helpers started.");
}); });
// This method will be called when Electron has finished // This method will be called when Electron has finished

View File

@ -16,7 +16,7 @@
"mirror UI" "mirror UI"
], ],
"author": "MichMich and others", "author": "MichMich and others",
"license": "?", "license": "MIT",
"bugs": { "bugs": {
"url": "https://github.com/MichMich/MagicMirror/issues" "url": "https://github.com/MichMich/MagicMirror/issues"
}, },