71 Commits

Author SHA1 Message Date
sam detweiler
247115d2e4
fix electron start loadurl on windows when address="0.0.0.0" (#3268)
> - Does the pull request solve a **related** issue?
Fixes #2550 

> - What does the pull request accomplish? Use a list if needed.

changes the loadUrl to use localhost, as electron and MM are on this
same system
the mm 'server' is still listening on all adapters, including localhost
2023-11-15 19:44:08 +01:00
Karsten Hassel
7127979c6f
electron: add missing fullscreen option (#3192)
follow up for https://github.com/MichMich/MagicMirror/pull/3187

@bugsounet can you please confirm that this now works for you?
2023-09-14 08:01:50 +02:00
Karsten Hassel
fa7c7fc8cf
respect width/height (no fullscreen) if set in electronOptions... (#3187)
... in `config.js`.

Solves #3174 

With getting width/heigt from
`electron.screen.getPrimaryDisplay().workAreaSize` introduced with
https://github.com/MichMich/MagicMirror/pull/3161 the solution was to
remove the `setFullscreen` line.

So per default the fullscreen resolution is used but when someone now
uses `electronOptions.width`/`electronOptions.height` in `config.js`
these parameters are used and so "no fullscreen" is possible.
2023-09-13 22:59:36 +02:00
Karsten Hassel
156db32c76
fix electron width/heigth when using xrandr under bullseye (#3161)
This PR uses `electron.screen.getPrimaryDisplay().workAreaSize` under
electron to get the screen size.

If this fails the current defaults (800x600) are used.

This solves some problems with xrandr under bullseye where the sreen
comes up with 800x600 instead of fullscreen, e.g. described
[here](https://khassel.gitlab.io/magicmirror/pi-modules/).

Tested this on my pi setup.

By the way, the Issue #1919 is back on my side (not related to this PR)
...
2023-08-12 22:57:42 +02:00
sam detweiler
1bd146f52e
fix clientOnly not starting up after async startup added in 2.23 (#3154)
Fixes #3151 

app.whenReady() was removed when async changes made, needed for
clientonly in electron.js
2023-07-16 23:04:58 +02:00
Karsten Hassel
979f4ec664
fix electron not running under windows (after async changes) (#3091)
fixes #3083 

tested under windows 11 and linux.
2023-04-12 08:25:07 +02:00
Kristjan ESPERANTO
5f38c53260
Revise require imports (#3071)
- order (external first)
- remove superfluous file extensions
- new line after imports
- deconstruct (only one time (in `check_config.js`))
- fix path (only one time (in `global-setup.js`))
2023-03-22 23:53:10 +01:00
Veeck
fe0b915a5d
Convert app-start/-stop callbacks to async/await (#3035)
supersedes https://github.com/MichMich/MagicMirror/pull/3027 and just
touches the start/stop calls.

---------

Co-authored-by: veeck <michael@veeck.de>
2023-02-22 18:58:00 +01:00
Karsten Hassel
42d42ef452
Prevent electron flashing white screen on startup (#3001)
see #1919

thanks @dfanica for providing the solution in [this
comment](https://github.com/MichMich/MagicMirror/issues/1919#issuecomment-1369898385)

tested this on a pi4 with bullseye 32-bit and 64-bit
2023-01-26 22:16:50 +01:00
Thomas Hirschberger
b9b7d2c95d
Add option to remove "x-frame-options" and "content-security-policy" response headers (#2963)
Many users like me do have the problem that they want to embed other
sites to their mirror by "iframe".
As some developers set the "x-frame-options" and
"content-security-policy" for security reasons these sites can not be
embedded.
Electron provides the "webview" element additionally to "iframe" which
allows to embed these sites although. The main difference is that a new
process is started which handles the "webview" element.
BUT: As the "webview" process needs to be started and is isolated
"webview" is slower and the elements can not be accessed from the
embedding website.

As an alternative i implemented a small callback function in electron.js
which removes the response headers that forbid the embedding.

The removing can be controlled with the new config options:
* ignoreXOriginHeader
* ignoreContentSecurityPolicy
2022-11-07 07:42:27 +01:00
Rohith Dharavath
288a008e72
Update electron.js
corrected spelling mistake
2022-04-21 01:53:22 +05:30
Karsten Hassel
88f7570caf add comments in electron.js 2022-03-29 21:24:17 +02:00
Karsten Hassel
00a7c6b5be added new env var ELECTRON_DISABLE_GPU which disable gpu under electron if set (fixes #2831). 2022-03-29 20:41:36 +02:00
Sam Detweiler
28d866c001 enable useHTTP for full electron version 2021-12-26 17:43:27 +01:00
Seongnoh Sean Yi
17637fb1f6
Merge branch 'develop' into develop 2021-08-31 10:50:05 +02:00
Karsten Hassel
fbc886b21c run prettier ... 2021-08-30 19:55:26 +02:00
Karsten Hassel
8879fb55de disable black cursor on start 2021-08-30 19:47:26 +02:00
eouia
dbdff38d2e Add custom switches for electron mainWindow 2021-08-30 11:32:24 +02:00
rejas
2619f92d09 More var -> let/const conversions 2021-07-14 10:41:29 +02:00
karsten13
f945d50c0d run prettier 2021-07-04 19:21:17 +02:00
Karsten Hassel
ad13de3588 update electron to v13 2021-07-04 17:46:22 +02:00
Karsten Hassel
cfc0bcd5ad workaround for dev_console test using getWindowCount 2021-06-18 21:39:55 +02:00
rejas
6ff85ebe54 Enable contextIsolation in electron
Fixes warning when starting MM
2021-02-27 13:19:16 +01:00
Felix Wiedenbach
b18d98f5ea exposed logger as node module 2021-02-18 19:14:53 +01:00
Felix Wiedenbach
4efe04774c clean up electron 2021-01-05 18:48:55 +01:00
rejas
43bcf4ab98 Run eslint over files, see what gets fixed automatically and clean up 2020-07-27 14:25:43 +02:00
Veeck
13073bc98d Lint stuff 2020-06-02 15:03:59 +02:00
rejas
f2d03a511e User logger in node files 2020-06-02 15:03:59 +02:00
Veeck
abb5dc5739 Run prettier over ALL files once
No other changes done in this commit
2020-05-11 22:22:32 +02:00
Andre
31b3f778fc no single quotes 2020-04-03 12:37:33 +02:00
Andre
351e0f3a0b add https support 2020-03-28 12:37:50 +01:00
rejas
a91f2de26a Remove jshint dependency, use eslint for config verification 2020-03-15 20:38:52 +01:00
Michael Teeuw
8ef8388c32 Set default DISPLAY in package.json. 2020-02-01 15:02:47 +01:00
Michael Teeuw
21dbaa1a03 Move DISPLAY default to electron script. 2020-02-01 13:59:13 +01:00
Seongnoh Sean Yi
3796076360
change Squotes to Dquotes 2019-05-13 23:24:59 +02:00
Seongnoh Sean Yi
94fc4cb8a2
allow html5 autoplay policy
From Chrome 66, autoplay policy is changed. This 1 line can help to play html5 audio and video without user-gesture-allowance in MagicMirror
2019-05-13 21:19:50 +02:00
shbatm
f646360af6 Gracefully shutdown node_helpers (Fixes #1056)
Updated documentation


Corrected Typo in Documentation


Style correction
2017-10-13 16:43:11 -05:00
Bas van Wetten
318c8c68b0 Change suggestion for e2e testing
- Changed global-setup.js to allow for easier test creation
- Changed each e2e test suite to work with new global-setup.js
- All tests (except for dev_console.js) now work with Travis CI
2017-07-23 23:06:27 +02:00
Unknown
a7297d2685 Fix for issue #950
Changed 'server.js' to allow an empty ipwhitelist to allow any and all hosts instead of none as mentioned in the documentation
2017-07-18 14:07:18 +02:00
Unknown
66f93ee541 Added clientonly script
Added clientonly script to have server and client run at different locations
2017-07-02 12:10:16 +02:00
Unknown
98bcfbef7e Removed unused import
Removed unused import from js/electron.js
2017-06-18 19:17:41 +02:00
Veeck
96c338859b More lazy sunday cleanups of missing semicolons, unused vars and other small thins 2017-06-11 11:53:55 +02:00
Rodrigo Ramírez Norambuena
b41bda569d Change method for check if pass dev parameter 2017-04-18 23:34:14 -03:00
Rodrigo Ramez Norambuena
6552157894 Remove white flash on boot up
When the electron app is started appear a white flash before show the
MagicMirror system.

This patch remove the white flash on boot up.
2017-01-04 13:06:24 -03:00
Rodrigo Ramírez Norambuena
19d906c5e4 fix tabs, remove extra spaces and lines. 2016-12-29 22:23:08 -03:00
Andreas 'count' Kotes
6a184b069b make electronOptions configurable, remove kioskmode from documentation 2016-12-13 13:59:24 +01:00
Olexandr Savchuk
c8d5a5319e Clean up duplicate code in Electron options 2016-12-02 21:09:16 +01:00
Olexandr Savchuk
a08fa721cf Added zoom factor config value and Electron option 2016-12-02 21:05:36 +01:00
Michael Teeuw
e2ed0f5e55 Cleanup 2016-08-09 10:33:34 +02:00
Michael Teeuw
d000e3c8a9 Force fullscreen when kioskmode is active 2016-08-09 10:22:29 +02:00