Add option to enable kios mode

This commit is contained in:
Michael Teeuw
2016-07-27 12:50:59 +02:00
parent ae37fa2bc5
commit 921557161d
3 changed files with 15 additions and 10 deletions

View File

@@ -9,11 +9,12 @@
var defaults = {
port: 8080,
kioskmode: false,
language: "en",
timeFormat: 24,
units: "metric",
modules: [
{
module: "helloworld",

View File

@@ -17,7 +17,11 @@ let mainWindow;
function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600, fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false}});
if (config.kioskmode) {
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, kiosk:true, darkTheme: true, webPreferences: {nodeIntegration: false}});
} else {
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false}});
}
// and load the index.html of the app.
//mainWindow.loadURL('file://' + __dirname + '../../index.html');