mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
make electronOptions configurable, remove kioskmode from documentation
This commit is contained in:
committed by
Andreas Kotes
parent
78aa2b491c
commit
6a184b069b
@@ -10,6 +10,7 @@
|
||||
var defaults = {
|
||||
port: 8080,
|
||||
kioskmode: false,
|
||||
electronOptions: {},
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
||||
language: "en",
|
||||
|
@@ -19,7 +19,7 @@ let mainWindow;
|
||||
|
||||
function createWindow() {
|
||||
|
||||
var electronOptions = {
|
||||
var electronOptionsDefaults = {
|
||||
width: 800,
|
||||
height: 600,
|
||||
x: 0,
|
||||
@@ -31,13 +31,17 @@ function createWindow() {
|
||||
}
|
||||
}
|
||||
|
||||
// DEPRECATED: "kioskmode" backwards compatibility, to be removed
|
||||
// settings these options directly instead provides cleaner interface
|
||||
if (config.kioskmode) {
|
||||
electronOptions.kiosk = true;
|
||||
electronOptionsDefaults.kiosk = true;
|
||||
} else {
|
||||
electronOptions.fullscreen = true;
|
||||
electronOptions.autoHideMenuBar = true;
|
||||
electronOptionsDefaults.fullscreen = true;
|
||||
electronOptionsDefaults.autoHideMenuBar = true;
|
||||
}
|
||||
|
||||
var electronOptions = Object.assign({}, electronOptionsDefaults, config.electronOptions);
|
||||
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow(electronOptions);
|
||||
|
||||
|
Reference in New Issue
Block a user