diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2019-12-19 15:43:48 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2019-12-19 15:43:48 -0500 |
| commit | 53efe7126574b472ad2f4fcfa448b64a6e3e365f (patch) | |
| tree | cb19701017e4dd2857df4becc067a81e4981a8b8 | |
| parent | 32941f0a56e4c788a3c2f350d28ad33ab7438cbb (diff) | |
#875 allow command line option to change language profile for inputs (better than nothing)
| -rw-r--r-- | docs/guides/desktop.rst | 5 | ||||
| -rw-r--r-- | electron_js/main.js | 8 | ||||
| -rw-r--r-- | package.json | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/docs/guides/desktop.rst b/docs/guides/desktop.rst index 0afcdacf..21fd7df0 100644 --- a/docs/guides/desktop.rst +++ b/docs/guides/desktop.rst @@ -19,6 +19,11 @@ The following command line parameters are supported: --fs - starts zmNinja in full screen mode + --lang - specifies a language profile that will be used to display input + dates etc. Just switching a "language" in zmNinja does not affect browser + default language. I currently don't know how to wire this to zmNinja's language + as this is electron stuff so you'll have to pass it as command line. + Multiple instances ------------------ diff --git a/electron_js/main.js b/electron_js/main.js index 4b2a2c1e..50d86d89 100644 --- a/electron_js/main.js +++ b/electron_js/main.js @@ -22,6 +22,10 @@ if (argv.path) { console.log ("switching storage to: "+app.getPath("userData")); } +if (argv.lang) { + console.log ('SET LANGUAGE TO '+argv.lang) + app.commandLine.appendSwitch('lang', argv.lang); +} // @@ -30,6 +34,7 @@ if (argv.path) { let win; app.commandLine.appendSwitch ('ignore-certificate-errors', 'true'); + const gotTheLock = app.requestSingleInstanceLock() if (!gotTheLock) { @@ -128,6 +133,9 @@ function createWindow() { }); mainWindowState.manage(win); + + + // fs will be arg 1 if its not run in electron debug mode if (argv.fs) { diff --git a/package.json b/package.json index 71a43996..09bb7baa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zmninjapro", "description": "Home security mobile app for ZoneMinder", - "version": "1.3.085", + "version":"1.3.085", "displayName": "zmNinja", "author": "Pliable Pixels", "license": "custom see LICENSE.md", @@ -192,4 +192,4 @@ ] } } -}
\ No newline at end of file +} |
