mirror of
				https://github.com/MichMich/MagicMirror.git
				synced 2025-10-31 10:48:10 +00:00 
			
		
		
		
	Add option to enable kios mode
This commit is contained in:
		| @@ -75,6 +75,7 @@ The following properties can be configured: | ||||
| | **Option** | **Description** | | ||||
| | --- | --- | | ||||
| | `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. | | ||||
| | `kioskmode` | This allows MagicMirror² to run in Kiosk Mode. It protects from other programs popping on top of your screen. The default value is `false`| | ||||
| | `language` | The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc., but the default value is `en`. | | ||||
| | `timeFormat` | The form of time notation that will be used. Possible values are `12` or `24`. The default is `24`. | | ||||
| | `units` | The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. The default is `metric`. | | ||||
| @@ -126,4 +127,3 @@ Please keep the following in mind: | ||||
| - **New Features**: please please discuss in a GitHub issue before you start to alter a big part of the code. Without discussion upfront, the pull request will not be accepted / merged. | ||||
|  | ||||
| Thanks for your help in making MagicMirror² better! | ||||
|  | ||||
|   | ||||
| @@ -9,6 +9,7 @@ | ||||
|  | ||||
| var defaults = { | ||||
| 	port: 8080, | ||||
| 	kioskmode: false, | ||||
|  | ||||
| 	language: "en", | ||||
| 	timeFormat: 24, | ||||
|   | ||||
| @@ -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'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user