Added zoom factor config value and Electron option

This commit is contained in:
Olexandr Savchuk 2016-12-02 21:05:36 +01:00
parent c949548150
commit a08fa721cf
2 changed files with 4 additions and 3 deletions

View File

@ -11,10 +11,11 @@ var defaults = {
port: 8080, port: 8080,
kioskmode: false, kioskmode: false,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
language: "en", language: "en",
timeFormat: 24, timeFormat: 24,
units: "metric", units: "metric",
zoom: 1,
modules: [ modules: [
{ {

View File

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