Compare commits

...

1429 Commits

Author SHA1 Message Date
Michael Teeuw
3545f80920 Merge pull request #1338 from MichMich/develop
Release 2.4.0
2018-07-01 20:50:46 +02:00
Michael Teeuw
0b2d1564ef Prepare to release 2.4.0 2018-07-01 20:43:04 +02:00
Michael Teeuw
fdacf824b3 Merge pull request #1337 from ShameerAshraf/develop
Fixed Wind Chill and Heat Index for Kelvin
2018-06-30 21:03:19 +02:00
Shameer Ashraf
5c01a44644 Updated changelog 2018-06-29 13:27:55 -04:00
Shameer Ashraf
4eb49d872b Updated changelog 2018-06-29 13:24:28 -04:00
Shameer Ashraf
34e5f29419 Fixed Wind Chill in Kelvin 2018-06-29 01:00:20 -04:00
Shameer Ashraf
f4910f0a8e Fixed Heat Index for Kelvin 2018-06-29 00:23:04 -04:00
Michael Teeuw
c8c14611dc Merge pull request #1334 from mdrayer/quick-fix-readme-raspberry-pi
Correct the "Raspberry Pi" link in the ToC.
2018-06-27 20:22:30 +02:00
Michael Drayer
491201991e Correct the "Raspberry Pi" link in the ToC. 2018-06-27 14:18:25 -04:00
Michael Teeuw
401f3574fd Update CHANGELOG.md 2018-06-27 10:29:49 +02:00
Michael Teeuw
173a86172c Add update translations. 2018-06-27 10:29:08 +02:00
Michael Teeuw
9ecbff024a Update CHANGELOG.md 2018-06-27 10:26:30 +02:00
Michael Teeuw
1b5be34be4 Merge pull request #1333 from ubertao/fixlocale
Fix locale id zh_cn -> zh-cn, zh_tw -> zh-tw, pt_br -> pt-br
2018-06-27 10:25:34 +02:00
Michael Teeuw
ceb3a997b6 Merge pull request #1330 from pintman/patch-1
minor typo in position fixed.
2018-06-27 10:23:15 +02:00
Ubertao
b1ead7fec8 Fix locale id zh_cn -> zh-cn, zh_tw -> zh-tw, pt_br -> pt-br 2018-06-27 14:09:02 +08:00
Michael Teeuw
d534dbb006 Merge pull request #1331 from flyingchipmunk/dev_newsfeed_logging
Add option to newsfeed for logging errors
2018-06-27 02:39:14 +02:00
Matthew Veno
e56377117b Add option to newsfeed for logging errors
- 'logFeedWarnings' added to newsfeed config, defaulted to false
- Only log parse feed errors when logFeedWarnings is true
- Updated README and CHANGELOG
- Fixes #1329
2018-06-26 20:01:28 -04:00
Marco Bakera
63483dc6c3 minor typo in position fixed. 2018-06-24 14:29:55 +02:00
Michael Teeuw
dd793650c3 Merge pull request #1314 from Ybbet/develop
Customize classes for table.
2018-06-12 09:19:16 +02:00
Teddy Payet
afd829307d Tabs and spaces from the original files
With a diff, here the orginal tabulations.
2018-06-11 23:09:00 +02:00
Teddy Payet
09abdc0f12 ESLint format
Resolve format ith eslint
2018-06-11 19:59:21 +02:00
Teddy Payet
ed4d17f578 README updated
Update of README for the new option.
2018-06-11 16:41:08 +02:00
Teddy Payet
aeeeb5a37b Add changelog 2018-06-11 14:04:06 +02:00
Teddy
dcb2e51587 Update .gitignore 2018-06-11 14:00:16 +02:00
Teddy Payet
cbc2eaf908 Customize classes for table
MagicMirror offers helper classes in the main.css. Therefore, we give
the possibility to indicate the class that we want.
2018-06-11 12:54:27 +02:00
Michael Teeuw
8808031e7c Merge pull request #1309 from sdetweil/fix_suspend
invoke callback for suspend notification, even if no dom content
2018-06-08 13:21:40 +02:00
Sam Detweiler
23ac7213d3 remove trailing spaces from reformatted else 2018-06-08 06:11:36 -05:00
Michael Teeuw
add7b44d0b Style change. 2018-06-07 16:31:49 +02:00
Michael Teeuw
1e4b7599a7 Merge branch 'develop' into fix_suspend 2018-06-07 16:29:16 +02:00
Sam Detweiler
54443b038a Revert "fix changelog"
This reverts commit c3f03e3f95.
2018-06-07 08:09:39 -05:00
Sam Detweiler
c3f03e3f95 fix changelog 2018-06-07 08:04:49 -05:00
Sam Detweiler
18135624f6 update changelog 2018-06-07 08:02:16 -05:00
Sam Detweiler
11238d6b71 fix tabs 2018-06-07 07:59:07 -05:00
Sam Detweiler
848f94b1e0 invoke callback for suspend notification, even if no dom content 2018-06-07 07:50:42 -05:00
Michael Teeuw
d47cfe9504 Merge pull request #1304 from kjb085/kb/calendar-regex
Add regex filtering to calendar module
2018-06-05 21:02:56 +02:00
Kenn Breece
70dccff293 Add regex filtering to calendar module 2018-06-03 21:12:31 -04:00
Michael Teeuw
e40873710b Merge pull request #1302 from idoodler/develop
Ability to fetch compliments from a remote server
2018-06-03 19:46:01 +02:00
idoodler
b140ef3b7a Ability to fetch compliments from a remote server 2018-06-03 15:47:56 +02:00
Michael Teeuw
3b7b74aa67 Merge pull request #1297 from OiYouYeahYou/linting-fix
Add and lint clientonly/index.js
2018-05-29 11:56:18 +02:00
Jason
de8e5b2d69 Merge branch 'develop' into linting-fix 2018-05-26 19:44:06 +01:00
Jason
afea33b0e3 Changelog 2018-05-26 19:42:58 +01:00
Jason
b44fbc1e4f add and lint clientonly 2018-05-26 19:36:46 +01:00
Michael Teeuw
c4dee3dd8d Merge pull request #1293 from derRAV3N/patch-1
Add note to README.md
2018-05-22 15:27:03 +02:00
derRAV3N
091e024032 Add note to README.md
Add note to README.md to not add calendars that have entries before 1st January 1970.
2018-05-22 15:14:05 +02:00
Michael Teeuw
0e030f7f48 Add information about the Electron update. 2018-05-21 14:06:50 +02:00
Michael Teeuw
3049ba0b24 Merge pull request #1290 from edward-shen/develop
newsfeed now remembers user configuration settings for descriptions after fullscreen view. Fixes #1282.
2018-05-16 07:27:38 +02:00
Edward Shen
55a161fafe Fixes #1282.
Added a runtime var isShowingDescription that gets reset to user config.
this.config.showDescription no longer mutates during runtime.
Changelog has been updated to include this fix.
2018-05-15 20:37:45 -04:00
Michael Teeuw
349af24c81 Merge pull request #1287 from ringzer/patch-1
Update README.md
2018-05-12 12:33:25 +02:00
ringzer
788f1c4b3e Update README.md
Included /home/pi/MagicMirror/ path when copying config.js.sample and running npm run config:check
2018-05-11 16:47:03 +01:00
Michael Teeuw
889af461c6 Upgrade to Electron 2.0.0. 2018-05-11 16:23:43 +02:00
Michael Teeuw
df86e59089 Merge pull request #1284 from jrlambs/develop
New calendar display format
2018-05-11 15:36:36 +02:00
=
c6bf69cce4 fix linting errors. add line to changelog 2018-05-10 19:54:01 -04:00
=
e492012004 fix missing s on timeFormat 2018-05-09 22:36:53 -04:00
=
94c46f9881 New calendar display format with date headers for days and times listed next to events for that date
IE:

Sunday, May 1st
  2:00 pm       Soccer
  4:00 pm       Basketball
2018-05-09 22:32:15 -04:00
Michael Teeuw
1eaa9d32ea Merge pull request #1283 from jannekalliola/develop
Changed weatherforecast to use dt_txt field
2018-05-09 09:35:49 +02:00
Janne Kalliola
0e2e8d2e2a Changed weatherforecast to use dt_txt field 2018-05-08 18:45:38 +03:00
Michael Teeuw
cfb39c6364 Merge pull request #1279 from parnic/develop
Fixed coloredSymbolOnly
2018-05-05 18:38:54 +02:00
Parnic
173499f496 Fixed coloredSymbolOnly 2018-05-05 08:31:58 -05:00
Michael Teeuw
1081049074 Merge pull request #1264 from parnic/develop
Fixed heat index
2018-05-01 09:55:42 +02:00
Michael Teeuw
961dc85514 Merge pull request #1275 from john3300/colored-symbol-only
Added option to calendar module that colors only the symbol
2018-05-01 09:55:13 +02:00
Michael Teeuw
6434acd492 Merge branch 'develop' into colored-symbol-only 2018-05-01 09:55:05 +02:00
Michael Teeuw
ccb27c89d8 Merge pull request #1262 from ndom91/patch-1
Updated newsfeed.js - improved fullscreen iframe
2018-05-01 09:53:56 +02:00
Brian Johnson
8053256203 Added option to calendar module that colors only the symbol instead of the whole line 2018-04-27 11:06:45 -05:00
Parnic
4abd7301fd Updated changelog 2018-04-17 19:45:12 -05:00
Parnic
d6fe5ab417 Fixed heat index
Celsius and Fahrenheit were flipped. The index was computed in Fahrenheit but used as if it were Celsius.
2018-04-17 19:43:09 -05:00
Nico Domino
a739fbdf1d Update CHANGELOG.md 2018-04-17 00:39:05 +02:00
Nico Domino
c90a1ab6dc Updated newsfeed.js - improved fullscreen iframe
Had much better performance using 100vw (viewport width) than 100% (why - idk), but with 100% about 5% of my screen (1080x1920) to the right of the scroll bar was left black/blank, with 100vw I legitimately takes up the whole screen/viewport width. 

With the 10000 height the articles would always load about half way scrolled down. So I reduced the height and style.height to 3000. At my resolution at least, which I assume is fairly common, I had much better results. Unfortunately 3000 also isn't perfect - this still requires some tweaking. The article loads perfectly at the top of the iframe at 2500, but 2500 is much too small for most articles. 3000 seemed a good compromise, I could scroll far enoguh to read most articles on Reuters, and also load far enoguh up to read the beginning of the article.

And finally I added a "scroll back up" button notification. This seems to work flawlessly.
2018-04-17 00:25:58 +02:00
Michael Teeuw
05ef68e079 Merge pull request #1258 from jannekalliola/develop
Support for hiding on-going events
2018-04-08 18:14:39 +02:00
Michael Teeuw
dee4a7f3c7 Merge pull request #1257 from parnic/develop
Fixed to work in Midori browser
2018-04-08 18:11:00 +02:00
Janne Kalliola
75753df0d8 Added description of on-going event hiding changes to the changelog 2018-04-08 15:07:20 +03:00
Janne Kalliola
30c5d78647 Support for hiding on-going events 2018-04-08 14:57:28 +03:00
Chris Pickett
6bb4db3842 Midori 0.4.3 support 2018-04-07 20:01:53 -05:00
Chris Pickett
cc0907fcd7 Updated changelog 2018-04-07 20:00:51 -05:00
Michael Teeuw
20b018bcc7 Merge pull request #1250 from bastilimbach/master
Remove yarn-or-npm as it breaks production builds
2018-04-06 14:40:26 +02:00
Michael Teeuw
aafe2fa8d0 Update CHANGELOG.md 2018-04-06 14:39:41 +02:00
Michael Teeuw
ee7bd73b3f Merge branch 'develop' into master 2018-04-06 14:39:04 +02:00
Michael Teeuw
b67f3bd629 Move change to 2.4.0 changelog. 2018-04-06 14:37:26 +02:00
Michael Teeuw
38b81e79f8 Merge pull request #1255 from wonjerry/develop
Error in default/currentWeather
2018-04-06 14:35:19 +02:00
wonjerry
b73c549131 Error in MagicMirror/modules/default/currentWeather/currentWeather.js line 296, 300
Notice that self.config.animationSpeed can not be found because the notificationReceived function does not have "self" variable.
2018-04-06 21:25:10 +09:00
Michael Teeuw
d21d9f0141 Use Electron 2 Beta. 2018-04-06 13:21:53 +02:00
Michael Teeuw
7bb85032a1 Merge pull request #1252 from BerndKohl/feelslike-localisation
enabling translation for "feelsLike" in current weather
2018-04-06 13:11:51 +02:00
Michael Teeuw
d90446ad28 Update CHANGELOG.md 2018-04-06 13:10:41 +02:00
Michael Teeuw
8b5e2f5528 Add dutch 'Feels' temperature. 2018-04-06 13:04:55 +02:00
Michael Teeuw
1bcc3ab7f1 Add default translation. 2018-04-06 13:04:04 +02:00
Michael Teeuw
3359c3cd45 Update currentweather.js 2018-04-06 13:03:06 +02:00
Michael Teeuw
af812f3c90 Fix translation file. 2018-04-06 13:02:27 +02:00
Michael Teeuw
1e6201093b restore windChillInF variable. 2018-04-06 13:01:23 +02:00
BerndKohl
959ea69427 enabling translation for "feelsLike" in current weather
enabled translation
fixed typos in comments
added German translation
2018-04-06 12:28:47 +02:00
Sebastian Limbach
cea744a914 Remove yarn-or-npm 2018-04-03 19:38:00 +02:00
Michael Teeuw
e8baf48764 Update CHANGELOG.md 2018-04-02 14:18:28 +02:00
Michael Teeuw
41242a2ae1 Merge pull request #1248 from E3V3A/patch-5
null check for notification removal
2018-04-02 14:17:25 +02:00
Michael Teeuw
f1dee488a7 Fix indent. 2018-04-02 14:11:21 +02:00
Michael Teeuw
3b4ff1818e Update CHANGELOG.md 2018-04-02 14:03:16 +02:00
E:V:A
497145b1b5 null check for notification removal
Make sure there is something to remove, before we attempt to remove the notifications. 
- This fixes #1240
2018-04-02 14:07:25 +03:00
Michael Teeuw
10eb41d319 FIx wind chill in Fahrenheit. 2018-04-02 12:58:19 +02:00
Michael Teeuw
4daf2e4a3d Merge pull request #1246 from secuflag/develop
Update italian translation
2018-04-01 19:44:24 +02:00
secuflag
f3266a5111 Update italian translation 2018-04-01 19:38:03 +02:00
Michael Teeuw
27cac4e8b8 Merge v2.3.1 2018-04-01 19:17:08 +02:00
Michael Teeuw
60b9a5b9da Merge pull request #1245 from MichMich/electron-downgrade
v2.3.1
2018-04-01 19:12:25 +02:00
Michael Teeuw
eaaa62a7f3 Downgrade Electron. 2018-04-01 19:05:38 +02:00
Michael Teeuw
6ce732ec3d Preparation for v2.4.0. 2018-04-01 14:23:28 +02:00
Michael Teeuw
fb0cc61e09 Merge pull request #1241 from MichMich/develop
Release 2.3.0
2018-04-01 14:16:36 +02:00
Michael Teeuw
be29b5daf8 Prepare for release 2.3.0 2018-04-01 14:08:38 +02:00
Michael Teeuw
f010adabd0 Merge pull request #1232 from Kiina/develop
Update electron to 1.7.13
2018-03-28 12:27:05 +02:00
Dominic Dey-Marckmann
c93b263b1f Update electron to 1.7.13 2018-03-27 21:09:08 +02:00
Michael Teeuw
15f34d6b54 Update CHANGELOG.md 2018-03-25 14:56:20 +02:00
Michael Teeuw
d0eeb55999 Merge pull request #1186 from BonySimon/patch-1
Fix exception on translation of objects
2018-03-25 14:55:52 +02:00
Michael Teeuw
08c0d39b23 Update translator.js 2018-03-25 14:55:42 +02:00
Michael Teeuw
d0ecde3277 Merge pull request #1176 from relm923/forecast_max_days
Forecast - Max Days
2018-03-25 14:53:30 +02:00
Michael Teeuw
45ec57afd7 Merge branch 'develop' into forecast_max_days 2018-03-25 14:52:42 +02:00
Michael Teeuw
b0cd053083 Merge pull request #1202 from iampranavsethi/currentweather-module-updates
Currentweather module updates
2018-03-25 14:52:05 +02:00
Michael Teeuw
698a11be58 Merge branch 'develop' into currentweather-module-updates 2018-03-25 14:51:47 +02:00
Michael Teeuw
efb08fb1e1 Update CHANGELOG.md 2018-03-25 14:51:18 +02:00
Michael Teeuw
f89bc8422e Merge pull request #1224 from bacongobbler/clearer-install-question
capitalize "y/n" for clearer intent
2018-03-25 14:47:35 +02:00
Michael Teeuw
4bf4889a08 Merge pull request #1225 from moham96/patch-1
use shallow clone
2018-03-25 14:47:09 +02:00
Michael Teeuw
01ab8ba38e Merge pull request #1227 from E3V3A/patch-4
removed known issues as they are closed
2018-03-25 14:46:44 +02:00
E:V:A
ae6d15e812 removed known issues as they are closed 2018-03-25 12:07:29 +03:00
MOHAMMAD RASIM
1abfbe1d34 use shallow clone
not need to download the whole repo history
2018-03-24 16:11:57 +03:00
Matthew Fisher
d3095297c2 capitalize "y/n" for clearer intent
If you press enter, `choice` is an empty string and will default to "no". The convention is to capitalize the default answer so users know what happens when they auto-accept prompts.
2018-03-23 16:29:37 -07:00
Michael Teeuw
79d40d5644 Merge pull request #1199 from ThomasMirlacher/develop
Add dc:date to parsing in newsfeed module, which allows parsing of mo…
2018-03-21 12:17:23 +01:00
Thomas Mirlacher
008e305a84 use doublequotes. 2018-03-21 11:58:09 +01:00
Michael Teeuw
0379611edd Merge pull request #1218 from kjb085/kb/calendar-adv-filter
Add advanced filtering to excludedEvents
2018-03-21 11:34:41 +01:00
Kenn Breece
96d883c1c7 Merge branch 'develop' into kb/calendar-adv-filter 2018-03-20 15:38:16 -04:00
Kenn Breece
be0f262e37 Add advanced filtering to excludedEvents 2018-03-18 23:54:23 -04:00
Michael Teeuw
1676adf071 Merge pull request #1209 from E3V3A/patch-3
update node stable to 9.x
2018-03-14 10:26:25 +01:00
E:V:A
a5d5630067 update node stable to 9.x 2018-03-14 11:24:41 +02:00
Pranav Sethi
275956caba Fixed typos in README.md for currentweather. 2018-03-12 22:22:45 -04:00
Michael Teeuw
bf8ed87fc9 Merge pull request #1197 from ptz0n/patch-1
Update README.md
2018-03-12 18:34:21 +01:00
Michael Teeuw
fb3afac097 Merge pull request #1200 from djgalloway/wip-apt-y
Assume yes when installing deps on Raspberry Pi via apt-get
2018-03-12 18:33:36 +01:00
Michael Teeuw
eda8b037a9 Merge pull request #1205 from Tajnymag/develop
Added yarn support
2018-03-12 18:32:31 +01:00
Marek Lukáš
8ef14f7a54 Added changes from [9974e35] to CHANGELOG 2018-03-12 15:33:30 +01:00
Marek Lukáš
9974e35656 Added yarn support 2018-03-12 15:28:43 +01:00
Pranav Sethi
15bc5431b6 Fixed Trailling Spaces 2018-03-12 05:25:33 -04:00
Pranav Sethi
f767531d89 Fixed Trailling Spaces 2018-03-12 05:25:01 -04:00
Pranav Sethi
7285ada9dd Added feels like and kmph wind for currentweather module 2018-03-12 05:06:16 -04:00
Pranav Sethi
b9b9773df9 Merge branch 'develop' into currentweather-module-updates 2018-03-12 03:56:44 -04:00
David Galloway
c29a83b259 Assume yes when installing deps on Raspberry Pi via apt-get
Signed-off-by: David Galloway <dgallowa@redhat.com>
2018-03-11 13:17:33 -04:00
Thomas Mirlacher
fa45e66da6 Add dc:date to parsing in newsfeed module, which allows parsing of more rss feeds. 2018-03-10 00:30:45 +01:00
Erik Eng
7cbcdddac9 Merge branch 'develop' into patch-1 2018-03-07 09:18:07 +01:00
Erik Eng
a2f17900da Update README.md
Correct manual installation step.
2018-03-07 09:13:33 +01:00
Michael Teeuw
fb7e97b8ad Merge pull request #1190 from E3V3A/patch-1
made the module "this" instances into a table
2018-03-06 09:36:04 +01:00
Michael Teeuw
0c92a8a8e9 Merge pull request #1191 from E3V3A/patch-2
fix md header
2018-03-06 09:35:34 +01:00
Michael Teeuw
dcc59380e5 Merge pull request #1194 from bastilimbach/develop
Remove old docker config and link to docker repository
2018-03-06 09:33:50 +01:00
Sebastian Limbach
f9bf25f96d Add changes 2018-03-04 14:07:44 +01:00
Sebastian Limbach
cbcbea8b08 Remove old docker config 2018-03-04 13:59:45 +01:00
Pranav Sethi
62eb4f20da Fixed Trailling Spaces to Pass checks 2018-03-03 05:08:12 -05:00
Pranav Sethi
43d5311e5e Fixed Trailling Spaces 2018-03-03 05:00:26 -05:00
Pranav Sethi
a6f08a09d5 Added Feels Like and Windspeed in KMPH 2018-03-03 04:52:22 -05:00
Pranav Sethi
d93f5d7785 Added Feels Like and Windspeed in KMPH 2018-03-03 04:21:24 -05:00
E:V:A
c7170e6dc2 fix md header 2018-03-01 11:53:10 +02:00
E:V:A
bcf3ca7339 made the module "this" instances into a table 2018-03-01 09:44:57 +02:00
Steelskin3
0388f5787a Fix exception on translation of objects
Sometimes, the content of translations[module.name][key] is not a string but an entire object. It cause a crash on template.replace(...) of createStringFromTemplate(...). It is currently the case of MMM-Voice-Control and the previous commit have broked this module (10 month ago... I am surprised to be the first founded it)
2018-02-23 11:51:59 +01:00
Michael Teeuw
6514df9d96 Merge pull request #1184 from patoberli/patch-1
Update README.md
2018-02-20 11:29:27 +01:00
Michael Teeuw
8f5b9869dc Merge branch 'develop' into patch-1 2018-02-20 11:28:58 +01:00
patoberli
580c5fe23f Update README.md
Added a hint to use the full and not lite version of Raspbian, as the GUI is missing and thus ndm (electron) can't start after the installation.
2018-02-17 21:54:31 +01:00
Michael Teeuw
b0af5b26ba Merge pull request #1183 from fewieden/feature/translations-update
translations update
2018-02-17 10:30:30 +01:00
Michael Teeuw
9e898932f6 Merge pull request #1182 from fewieden/feature/automated-tests
Automated tests
2018-02-17 10:29:23 +01:00
fewieden
1f873b93f6 changelog, linting 2018-02-17 10:17:59 +01:00
fewieden
f414707f11 update translations for updatenotifications 2018-02-17 10:14:37 +01:00
fewieden
505825056c use translation template for updatenotifications 2018-02-17 10:10:57 +01:00
fewieden
38f7716738 linting 2018-02-17 09:20:34 +01:00
fewieden
a69d08b554 changelog 2018-02-17 09:18:12 +01:00
fewieden
3ccdb64833 deprecated unit tests 2018-02-16 22:09:15 +01:00
fewieden
78d8bff599 clone array, clone nested object, add safe checks for objects (memory address) 2018-02-16 19:58:28 +01:00
fewieden
a756fed70b fixed and reenabled lockstring test 2018-02-16 08:43:27 +01:00
fewieden
3e2a1e3548 linting 2018-02-16 00:08:11 +01:00
fewieden
96b2f2b3a4 clone object unit test 2018-02-16 00:01:02 +01:00
fewieden
d81d7d4f68 compare version unit test 2018-02-15 23:53:57 +01:00
fewieden
20244c4fb5 translations integration test 2018-02-15 23:22:52 +01:00
Michael Teeuw
b50d31ffe2 Merge pull request #1178 from E3V3A/develop
Added ToC
2018-02-13 09:24:36 +01:00
fewieden
d709a44960 strip comments unit test 2018-02-13 07:17:46 +01:00
E:V:A
4e4d07ced6 Added ToC
ToDo: Fix ToC links to headers
2018-02-11 18:24:31 +02:00
fewieden
d775bc9d7e loadCoreTranslationsFallback unit test 2018-02-11 09:08:09 +01:00
fewieden
85528761eb only load core callback if there is one available 2018-02-11 09:07:41 +01:00
fewieden
ad3eac9ddb loadcoretransations unit test 2018-02-11 08:58:02 +01:00
Reagan Elm
613f9fccd2 Update changelog 2018-02-10 20:56:10 -05:00
Reagan Elm
3d1741c904 Respect maxNumberOfDays regardless of endpoint 2018-02-10 20:53:38 -05:00
fewieden
26be14ba67 load unit test 2018-02-10 20:33:22 +01:00
fewieden
daa0755920 add missing parameter in documentation 2018-02-10 12:38:55 +01:00
fewieden
305d60e09b translator unit tests 2018-02-10 12:32:43 +01:00
fewieden
d0029efd02 utils unit tests 2018-02-10 12:30:33 +01:00
fewieden
fb4d42bf5b moved test 2018-02-10 12:28:30 +01:00
Michael Teeuw
20eec53b14 Add Manifesto. 2018-02-07 13:04:10 +01:00
Michael Teeuw
8343db44db Merge pull request #1173 from vvzvlad/vvzvlad_local
add variable morning afternoon times
2018-02-07 12:32:42 +01:00
vvzvlad
649652e373 Merge branch 'develop' into vvzvlad_local 2018-02-07 14:10:43 +03:00
vvzvlad
e37ed7c32d add variable morning afternoon times 2018-02-07 14:06:26 +03:00
vvzvlad
f9a525068b add variable morning afternoon times 2018-02-05 18:15:02 +03:00
Michael Teeuw
aa11e6d62e Merge pull request #1166 from henrysun18/develop
Show remote compliments on boot
2018-02-01 08:20:22 +01:00
henrysun18
6802d152da Show remote compliments at boot instead of after one updateInterval 2018-01-31 23:19:47 -05:00
Michael Teeuw
3b40f393d8 Merge pull request #1163 from pinsdorf/patch-1
corrected link to 3rd party modules wiki page
2018-01-30 13:49:37 +01:00
pinsdorf
020443ae8a corrected link to 3rd party modules wiki page
The link to the 3rd Party Modules still directs to the old wiki page, where use has to follow another link to the right page. Updated the link in README.md to navigate to the right wiki page instantly.
2018-01-30 10:59:18 +01:00
Michael Teeuw
1d0baccffc Merge pull request #1161 from thobach/master
Allow to scroll in full page article view of default newsfeed module
2018-01-30 09:47:33 +01:00
Thomas Bachmann
5426f0f329 Updated documentation for scroll mode in newsfeed module 2018-01-29 21:41:43 +01:00
Thomas Bachmann
790249dd1a Merge branch 'MichMich/develop' 2018-01-29 21:37:25 +01:00
Thomas Bachmann
446a201d25 Allow to scroll articles with gesture events 2018-01-29 21:26:34 +01:00
Thomas Bachmann
b6538d5e18 Merge remote-tracking branch 'MichMich/master' 2018-01-29 18:54:32 +01:00
Michael Teeuw
edd6043059 Fail PRs that are sent to the master branch. 2018-01-26 12:12:44 +01:00
Michael Teeuw
fe4ffeb7f1 Text cleanup. 2018-01-25 20:45:25 +01:00
Michael Teeuw
27b3875bfb Changed missing Changlog text. 2018-01-25 20:38:42 +01:00
Michael Teeuw
e2dbe8a0a2 Minor fixes. 2018-01-25 20:07:51 +01:00
Michael Teeuw
29fc7910b7 Remove Jest. Update dangerfile.js. 2018-01-25 19:51:23 +01:00
Michael Teeuw
22e2fdc707 Jest implementation to get danger.js to work. 2018-01-25 19:43:09 +01:00
Michael Teeuw
584786eb9f Temp disable danger. 2018-01-25 17:00:51 +01:00
Michael Teeuw
d803d9eaf9 Import 'includes' from lodash. 2018-01-25 16:39:49 +01:00
Michael Teeuw
bad6575d83 Add Danger.js 2018-01-25 16:24:05 +01:00
Michael Teeuw
fbcb7ae836 Update README.md 2018-01-23 19:10:37 +01:00
Michael Teeuw
2c1a1b10c8 Merge pull request #1147 from E3V3A/patch-2
Update README.md
2018-01-23 09:51:15 +01:00
E:V:A
155fb16a8a Update README.md
Updated README by reformatting and restructuring.
- Added, Clarified and corrected grammatics and wrong info 
- Moved/Removed some redundant parts
2018-01-23 10:44:55 +02:00
Michael Teeuw
b1ab2ce96a Merge pull request #1146 from cederstrom/put-article-in-front-of-modules
Put article iframe in front of modules
2018-01-21 11:33:22 +01:00
Andreas Cederström
f299ba6218 Put article ifram in front of modules
Before this change the article was brought up in its ifram in fullscreen and you could still see the other modules in front of it
2018-01-20 23:46:58 +01:00
Michael Teeuw
d167ad1923 Merge pull request #1136 from E3V3A/patch-2
Update README
2018-01-19 09:15:54 +01:00
E:V:A
93626e8154 Fixed bullet points markup for lint 2018-01-19 09:13:59 +02:00
Michael Teeuw
d5040c091a Merge pull request #1143 from shbatm/bug-fix
Fix for #1140 - sendNotification module errors after #1116
2018-01-18 13:35:47 +01:00
shbatm
868daef0f0 Fix for #1140 - sendNotification module errors after #1116 2018-01-17 09:49:17 -06:00
Michael Teeuw
dc8e85e7f2 Merge pull request #1139 from amcolash/patch-1
Change English translation to "In 2 days"
2018-01-16 09:20:57 +01:00
Michael Teeuw
22d32d7ca3 Merge pull request #1141 from ConnorChristie/old-dom-event-fix
Fix to emit DOM_OBJECTS_CREATED event after module DOMs have actually loaded
2018-01-16 09:20:39 +01:00
Connor Christie
2d500f8074 Fix to emit DOM_OBJECTS_CREATED event after module DOMs have actually loaded 2018-01-14 22:03:09 -06:00
Andrew McOlash
452cdc17c6 Change English translation to "In 2 days" 2018-01-14 15:52:15 -06:00
E:V:A
bcbfee0321 Update README
Updated README to warn about long installation time as discussed in #1124.
2018-01-12 10:00:35 +02:00
Michael Teeuw
dab2e7ede3 Merge pull request #1127 from roramirez/set-version-test-7-node
Set only 7 version of node to run tests in Travis CI
2018-01-08 11:26:25 +01:00
Michael Teeuw
d91acb8352 Merge pull request #1126 from d-Rickyy-b/patch-1
Fix typo in newsfeed documentation
2018-01-08 11:23:49 +01:00
Rodrigo Ramírez Norambuena
373dd8058e Set only 7 version of node to run tests in Travis CI 2018-01-07 01:03:00 -03:00
Rico
de6310e52a Fix typo
A little typo which lead to poor formatting
2018-01-07 03:30:01 +01:00
Michael Teeuw
8c297a4a4c Merge pull request #1123 from E3V3A/patch-1
Added general advice
2018-01-06 19:49:44 +01:00
E:V:A
4eb5c817bc fixed typos 2018-01-06 20:19:43 +02:00
E:V:A
07e4b26b9e Added general advice 2018-01-06 19:57:46 +02:00
Michael Teeuw
b63aa62985 Merge pull request #1121 from henrikra/master
Add basic typescript types for module
2018-01-06 14:29:52 +01:00
Henrik Raitasola
ca701c0580 Merge branch 'master' of github.com:henrikra/MagicMirror 2018-01-06 15:26:51 +02:00
Henrik Raitasola
e37043a6a8 Solve conflict 2018-01-06 15:26:38 +02:00
Michael Teeuw
7c26975d14 Merge branch 'develop' into master 2018-01-06 14:16:21 +01:00
Henrik Raitasola
47f8a43637 Add changelog 2018-01-06 15:10:10 +02:00
Henrik Raitasola
1238c0cefe Rename file to be more explicit 2018-01-06 15:06:58 +02:00
Henrik Raitasola
4c35fda045 Add most used module properties 2018-01-06 15:04:54 +02:00
Henrik Raitasola
780124c2f5 Add basic types to get started 2018-01-06 14:51:32 +02:00
Michael Teeuw
38e0af41ce Merge pull request #1116 from ConnorChristie/async-dom
DOM creation notifications in cases of async template rendering
2018-01-04 21:51:13 +01:00
Connor Christie
601e99eec0 Merge branch 'develop' into async-dom 2018-01-02 18:10:07 -06:00
Connor Christie
745a2adee7 Merge branch 'develop' into async-dom 2018-01-02 18:08:55 -06:00
Connor Christie
9e83234df1 Update changelog 2018-01-02 18:06:21 -06:00
Connor Christie
e45eeadf7d Merge remote-tracking branch 'origin/master' into async-dom 2018-01-02 18:04:03 -06:00
Michael Teeuw
9a778cea6b Merge v2.2.2 changes. 2018-01-02 18:46:41 +01:00
Michael Teeuw
20823bfc87 Add missing package-lock.json. 2018-01-02 18:41:33 +01:00
Connor Christie
be3d703692 Fix linter errors 2018-01-01 10:55:39 -06:00
Connor Christie
e2df5739f0 Update module docs 2018-01-01 10:40:52 -06:00
Connor Christie
7bb11d6436 Add documentation regarding updates 2018-01-01 10:38:00 -06:00
Connor Christie
80b84212cc Add notification for module dom creation with async support 2018-01-01 10:23:15 -06:00
Connor Christie
4a1bee769b Add true module dom creation events 2018-01-01 09:42:34 -06:00
Michael Teeuw
de99a7aeaf Merge 2.2.1 changes. 2018-01-01 14:23:38 +01:00
Michael Teeuw
a0a02701b0 Update version number. 2018-01-01 13:42:39 +01:00
Michael Teeuw
1314ae1555 Add info about v2.2.1 2018-01-01 13:40:39 +01:00
Michael Teeuw
67cf0e745c Fix linting errors. 2018-01-01 13:39:05 +01:00
Michael Teeuw
538a2acbf5 Fix linting errors. 2018-01-01 13:38:07 +01:00
Michael Teeuw
8d0e453666 Preparation for v2.3.0 release. 2018-01-01 12:59:28 +01:00
Michael Teeuw
ace04f0b30 Merge pull request #1115 from MichMich/develop
Cleanup.
2018-01-01 12:48:22 +01:00
Michael Teeuw
f8e25d6c4a Cleanup. 2018-01-01 12:47:54 +01:00
Michael Teeuw
b2bc43da4f Merge pull request #1113 from MichMich/develop
Release v2.2.0.
2018-01-01 12:44:24 +01:00
Michael Teeuw
cb12e540d2 Add package lock. 2018-01-01 12:40:37 +01:00
Michael Teeuw
39955af2fa Upgrade packages. 2018-01-01 12:36:53 +01:00
Michael Teeuw
86e1f0615d Prepare for release v2.2.0 2018-01-01 12:33:00 +01:00
Michael Teeuw
dc81ab6dee Merge pull request #1111 from TTigges/weather_decimal_marks
added option of decimal comma for temp values for default weather modules
2017-12-31 12:25:24 +01:00
Michael Teeuw
f8cf6a65ae Merge branch 'develop' into weather_decimal_marks 2017-12-31 12:25:06 +01:00
Michael Teeuw
ba909c696d Merge branch 'develop' into weather_decimal_marks 2017-12-31 12:24:25 +01:00
Torben Tigges
df0515cebf currentweather, weatherforecast, changed option of decimal comma to any decimal symbol 2017-12-31 01:15:59 +01:00
Torben Tigges
46c0e14d67 currentweather, weatherforecast, added option of decimal comma for temperature values to config 2017-12-30 22:03:26 +01:00
Michael Teeuw
97d7733464 Remove trailing spaces. 2017-12-30 21:46:34 +01:00
Michael Teeuw
afda84ef09 Electron reverted. 2017-12-30 21:39:56 +01:00
Michael Teeuw
61d6e74102 Use an old electron version ...
Hopefully Electron will be fixed soon.
2017-12-30 21:33:56 +01:00
Michael Teeuw
8d74258ce2 Merge pull request #1102 from EricWarnke/patch-1
Spelling/grammar fix
2017-12-13 09:22:38 +01:00
Eric Warnke
5dfba0b834 Spelling/gramar fix 2017-12-12 15:54:33 -07:00
Michael Teeuw
056370ec08 Merge pull request #1092 from sebcaps/develop
Fix #1091 : handle empty description
2017-11-26 20:54:13 +01:00
unknown
4e2c254558 Fix #1091 : handle empty description 2017-11-26 11:52:01 +01:00
Michael Teeuw
38c2bdb447 Merge pull request #1090 from rejas/patch-1
Fix typo
2017-11-26 10:42:20 +01:00
Veeck
0cee4717e2 Fix typo 2017-11-26 10:02:31 +01:00
Michael Teeuw
221b04c466 Merge pull request #1089 from MichMich/patch-1
Update CHANGELOG.md
2017-11-25 12:15:54 +01:00
Michael Teeuw
237e9b7191 Merge pull request #1088 from reeno/patch-2
fixed width Font Awesome symbols
2017-11-25 12:15:27 +01:00
Michael Teeuw
9457e44a88 Update CHANGELOG.md 2017-11-25 12:14:54 +01:00
reeno
80a9d40a44 fixed width Font Awesome symbols
See http://fontawesome.io/examples/#fixed-width
2017-11-25 12:08:40 +01:00
Michael Teeuw
0715325a63 Merge pull request #1081 from ChytilTomas/develop
Develop
2017-11-17 09:06:06 +01:00
Michael Teeuw
0a026fef0f Update CHANGELOG.md 2017-11-17 09:05:33 +01:00
Tomáš Chytil
5fbf650d2d Czech translation 2017-11-16 23:06:52 +01:00
Tomáš Chytil
dabdde0c3f Czech translation 2017-11-16 23:01:00 +01:00
Michael Teeuw
b6ca92a7ef Merge pull request #1080 from slametps/develop
some new features (resubmission)
2017-11-15 08:26:25 +01:00
slametps
62f7339170 add some new options
add some new options
2017-11-15 12:21:45 +07:00
slametps
eaec682ea7 per feed reloadInterval support
per feed reloadInterval support
2017-11-15 12:21:22 +07:00
slametps
12110a4442 new options
* truncated description support
* specific reloadInterval for particular feed
2017-11-15 12:21:02 +07:00
slametps
df597f53b2 add no-cache entries in HTTP header
add no-cache entries in HTTP header
2017-11-15 12:19:53 +07:00
slametps
d7d40254d4 updated
updated
2017-11-15 12:19:19 +07:00
Michael Teeuw
e7c4a2cce6 Merge pull request #1072 from morozgrafix/newsfeed_filter
Added ability to set a list of prohibited words that will be filtered…
2017-11-01 11:53:00 +01:00
Sergey Morozov
0eb1c0cea6 Added ability to set a list of prohibited words that will be filtered out of newsfeed
Resolves #1071

`prohibitedWords` config parameter is an array of words. If set and case insensitive greedy match is found anywhere in the title then that newsfeed item will not be displayed. Readme updated with instructions.

Users should be careful on the words selection as careless setting may remove many or all items from the newsfeed. Some obvious mistakes like `space, comma, dot` etc. can be prevented programatically, but I left it out of this PR

Example:

with `prohibitedWords: ['dodgers']`

Original `newsItems`:
```
0:{title: "New York City, Russia, Los Angeles Dodgers: Your Wednesday Briefing", description: "Here’s what you need to know to start your day.", pubdate: "Wed, 01 Nov 2017 09:37:36 GMT", url: "https://www.nytimes.com/2017/11/01/briefing/new-yo…ssia-los-angeles-dodgers.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
1:{title: "A Mangled School Bus, Bodies Everywhere; ‘It Was Surreal’", description: "A truck ramming bicyclists. The driver emerging wi…e attack, it was as confusing as it was gruesome.", pubdate: "Wed, 01 Nov 2017 09:27:41 GMT", url: "https://www.nytimes.com/2017/10/31/nyregion/nyc-sc…r-attack-truck-witnesses.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
2:{title: "Dodgers 3, Astros 1 | Series tied, 3-3: With a Rally and a Romp, Dodgers Top Astros and Force Game 7", description: "Down by a run with just four innings left in Game …nst a dominating Justin Verlander. Game 7 awaits.", pubdate: "Wed, 01 Nov 2017 07:21:07 GMT", url: "https://www.nytimes.com/2017/11/01/sports/dodgers-win-game-6.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
3:{title: "José Andrés Fed Puerto Rico, and May Change How Aid Is Given", description: "The chef’s huge effort is just the latest led by c…ocally based way to feed people after a disaster.", pubdate: "Wed, 01 Nov 2017 06:40:09 GMT", url: "https://www.nytimes.com/2017/10/30/dining/jose-andres-puerto-rico.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
```

Filtered `newsItems`:
```
0:{title: "A Mangled School Bus, Bodies Everywhere; ‘It Was Surreal’", description: "A truck ramming bicyclists. The driver emerging wi…e attack, it was as confusing as it was gruesome.", pubdate: "Wed, 01 Nov 2017 09:27:41 GMT", url: "https://www.nytimes.com/2017/10/31/nyregion/nyc-sc…r-attack-truck-witnesses.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
1:{title: "José Andrés Fed Puerto Rico, and May Change How Aid Is Given", description: "The chef’s huge effort is just the latest led by c…ocally based way to feed people after a disaster.", pubdate: "Wed, 01 Nov 2017 06:40:09 GMT", url: "https://www.nytimes.com/2017/10/30/dining/jose
```
2017-11-01 03:50:34 -07:00
Michael Teeuw
f4d5996a88 Allow use of .njk extension for template files. 2017-10-18 13:49:03 +02:00
Michael Teeuw
c75662e720 Remove trailing spaces. 2017-10-18 12:01:06 +02:00
Michael Teeuw
79a662fb93 Log nunjucks parsing errors for debugging. 2017-10-18 11:55:02 +02:00
Michael Teeuw
8b009b7ee9 Add Catalan translation. 2017-10-18 10:15:47 +02:00
Michael Teeuw
c4face30cc Update CHANGELOG.md 2017-10-18 10:14:54 +02:00
sergibarca
d4dbb5cb51 Translation to Catalan. 2017-10-17 22:24:13 +02:00
Michael Teeuw
1e27187652 Merge pull request #1060 from nhubbard/revert-1053-remove-package-lock.json
Revert "Delete large package-lock.json files"
2017-10-16 14:46:39 +02:00
Michael Teeuw
3ff278291f Merge pull request #1061 from qistoph/difflink
Add Github diff link to update info
2017-10-16 14:43:55 +02:00
Chris van Marle
4e8bf216df Update CHANGELOG 2017-10-16 14:26:15 +02:00
Chris van Marle
e7b9100f1c Add Github link to update info 2017-10-16 14:24:29 +02:00
Michael Teeuw
08aa9790f3 Fix lint issues. 2017-10-16 14:17:12 +02:00
Michael Teeuw
5f13fd2dca Merge pull request #1058 from shbatm/develop_1056
Gracefully Shutdown Module node_helpers on exit/SIGINT (Fixes #1056)
2017-10-16 13:59:40 +02:00
shbatm
f4c6f42c38 Added default implementation of stop() function. 2017-10-15 18:44:11 -05:00
Nicholas Hubbard
6a10d08189 Revert "Delete large package-lock.json files" 2017-10-13 19:59:39 -04: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
Michael Teeuw
95f265ebbf Merge pull request #1057 from Stromwerk/develop
Add Bulgarian translations for MagicMirror² and Alert module
2017-10-13 21:05:16 +02:00
Kalin Koychev
39d0142993 - Add Bulgarian translations for MagicMirror² and Alert module 2017-10-13 21:51:21 +03:00
Michael Teeuw
da16172244 Merge pull request #1055 from qistoph/commentscheck
Check trailing white space in comments too
2017-10-13 20:39:44 +02:00
Michael Teeuw
71aded0fae Merge pull request #1054 from qistoph/gruntfix
Fix some white space grunt errors
2017-10-13 20:39:04 +02:00
Michael Teeuw
e173b3ea41 Merge pull request #1053 from roramirez/remove-package-lock.json
Delete large package-lock.json files
2017-10-13 20:38:18 +02:00
Chris van Marle
6c4f9466b9 Don't ignore comments in trailing whitespace check 2017-10-12 11:06:57 +02:00
Chris van Marle
664196c5ef Fix some trailing whitespace grunt errors 2017-10-12 10:23:40 +02:00
Michael Teeuw
c8d5044e7a Merge pull request #1051 from egin10/patch-1
correcting translation for indonesian language
2017-10-10 17:20:28 +02:00
Michael Teeuw
d8c31fe560 Merge pull request #1049 from egin10/patch-2
Updating and Correcting Translation
2017-10-10 17:19:50 +02:00
Rodrigo Ramírez Norambuena
516db855f5 Delete large package-lock.json files 2017-10-08 23:41:51 -03:00
Ginanjar S.B
9cdcf08ab1 correcting translation for indonesian language 2017-10-09 08:05:11 +07:00
Ginanjar
326fa73b22 Updating and Correcting Translation 2017-10-08 03:03:29 +07:00
Michael Teeuw
79cacefd07 Merge pull request #1047 from jannickfahlbusch/useHTTPSOpenWeatherMap
Weather (Current/Forecast): Use HTTPS instead of HTTP
2017-10-06 21:32:49 +02:00
Jannick Fahlbusch
07e28bfee6 Use HTTPS instead of HTTP
Chrome blocks insecure requests (HTTP) when MagicMirror is loaded
via HTTPS. This commit changes the protocol used for OpenWeatherMap.
2017-10-06 21:31:06 +02:00
Michael Teeuw
980b017fbe Merge pull request #1046 from wbleek/master
moved weekNumber into field and adjusted language handling accordingly [issue #910]
2017-10-03 22:13:21 +02:00
Wolf-Gideon Bleek
4567fd1eb0 Merge branch 'develop' into master 2017-10-03 21:29:10 +02:00
Wolf-Gideon Bleek
8c150c23f3 moved weekNumber into field and adjusted language handling accordingly [issue #910] 2017-10-03 21:25:30 +02:00
Wolf-Gideon Bleek
b4fd570269 moved weekNumber into field and adjusted language handling accordingly [issue #910] 2017-10-03 21:18:25 +02:00
Michael Teeuw
6e051d73c1 Merge pull request #1044 from cederstrom/honor-calendar-maximum-entries
Slice the list of all calendar events to honor config.maximumEntries
2017-10-01 21:51:33 +02:00
Michael Teeuw
e381e1a313 Merge pull request #1042 from roramirez/readme-localhost-bind
Updated readme about default value for `address` configuration
2017-10-01 21:49:47 +02:00
Andreas Cederström
2d03ff63cf Slice the list of all events to honor config.maximumEntries
Scenario:
* Specify more than one calendar in `config.calendars`
* Specify a maximum number of entries in `config.maximumEntries`

Result:
The module will show as many as maximumEntries for EACH calendar

Expected:
The module shall not show more than a total of maximumEntries, regardless of how many calendars I specify

Fixes #1043
2017-10-01 21:47:10 +02:00
Rodrigo Ramírez Norambuena
309de631ed Updated readme about default value for address configuration changed it
in https://github.com/MichMich/MagicMirror/commit/2f05228d
2017-10-01 15:01:34 -03:00
Michael Teeuw
bad7316b80 Allow html tags in text string. 2017-10-01 13:22:29 +02:00
Michael Teeuw
4757c36233 Updated changelog and minor fix example 2017-10-01 13:16:07 +02:00
Michael Teeuw
9ca6180207 Merge branch 'templates' into develop 2017-10-01 13:10:25 +02:00
Michael Teeuw
30179ad977 Setup of new dev release. 2017-10-01 12:39:48 +02:00
Michael Teeuw
b799609749 Merge pull request #1039 from MichMich/develop
Release 2.1.3
2017-10-01 12:36:53 +02:00
Michael Teeuw
efb6994ae7 Changes in preparation of 2.1.3 2017-10-01 12:34:54 +02:00
Michael Teeuw
880a977dd6 Merge pull request #1038 from roramirez/templates-fixes
This fix the follow things:
2017-09-30 13:39:00 +02:00
Michael Teeuw
6eceffb403 Merge pull request #1037 from roramirez/lint-fix
Little lint fix
2017-09-30 13:36:38 +02:00
Rodrigo Ramírez Norambuena
795e33881c This fix the follow things:
* The default screen on missing configuration file and syntax error.
    * Tests
2017-09-29 19:10:03 -03:00
Rodrigo Ramírez Norambuena
d310c3857f Little lint fix 2017-09-29 18:33:17 -03:00
Michael Teeuw
8c53908cc4 Update CHANGELOG.md 2017-09-29 13:37:24 +02:00
Michael Teeuw
589b54984a Add slack badge. 2017-09-29 13:36:44 +02:00
Michael Teeuw
3f30ed5251 Add info about weather forecast. 2017-09-29 13:01:08 +02:00
Michael Teeuw
3f9181905a Fix typo's. 2017-09-29 11:05:59 +02:00
Michael Teeuw
29f3a81666 Fix weather forecast. 2017-09-29 10:04:42 +02:00
Michael Teeuw
5efc43260e Switch to async rendering. 2017-09-28 16:43:38 +02:00
Michael Teeuw
e01794a07f First Nunchucks Implementation. 2017-09-28 16:11:25 +02:00
Michael Teeuw
5fde095a6f Merge pull request #1024 from roramirez/openweathermap-forescast
Hack fix issue #1017
2017-09-28 14:44:13 +02:00
Michael Teeuw
3237af2d85 Add translation: Welsh (Cymraeg) 2017-09-28 14:42:21 +02:00
Michael Teeuw
953b666ebd Update translations.js 2017-09-28 14:41:30 +02:00
Michael Teeuw
417bb4bf37 Merge pull request #1022 from meigwilym/meigwilym-welsh-lang
Welsh (Cymraeg) language file
2017-09-28 14:39:26 +02:00
Michael Teeuw
a55213d88a Merge pull request #1019 from EdgardosReis/develop
Updated pt.json translation
2017-09-28 14:38:55 +02:00
Michael Teeuw
ec84d190f4 Remove newline. 2017-09-28 14:38:39 +02:00
Michael Teeuw
1b0bad72de Remove newline. 2017-09-28 14:38:08 +02:00
Michael Teeuw
931055708d Merge pull request #1033 from roramirez/one-instance-all-module-position-spec
Refactor modules_position_spec use one instance for all it statements
2017-09-26 08:56:06 +02:00
Rodrigo Ramírez Norambuena
15fd570b49 Refactor modules_position_spec use one instance for all it statements 2017-09-25 20:52:27 -03:00
Michael Teeuw
5e51a438a7 Merge pull request #1025 from ryck/feature/indoorHumidity
Feature/indoor humidity
2017-09-20 15:19:53 +02:00
Ricardo Gonzalez
7f768059e6 Update README 2017-09-17 16:33:23 +01:00
Ricardo Gonzalez
ea70175a17 Merge branch 'develop' into feature/indoorHumidity
* develop: (71 commits)
  Update sample address
  set version of express-ipfilter:
  Describe default in comment of sample config
  More secure defaults.
  Fix grunt errors
  Weather forecast settings match current weather
  Fix JavaScript error in weatherforecast
  Update fr.json
  TestSuite: Show the missing strings for translations files.
  Update fr.json with added translations
  Added e2e test for font files
  Fix issue #986
  Fix extra tab file translations/zh_cn.json
  Add Changelog entry for new e2e test for helloworld module
  Small change for re-running Travis CI
  Change Two Conditionals to UpperCase-If
  Fix linting?
  Show Scale of Temperature if config flag is set
  Change to install Roboto fonts by npm
  Update stylelint package
  ...

# Conflicts:
#	CHANGELOG.md
2017-09-17 16:32:37 +01:00
Ricardo Gonzalez
74a736691a Merge remote-tracking branch 'upstream/develop' into develop
* upstream/develop: (71 commits)
  Update sample address
  set version of express-ipfilter:
  Describe default in comment of sample config
  More secure defaults.
  Fix grunt errors
  Weather forecast settings match current weather
  Fix JavaScript error in weatherforecast
  Update fr.json
  TestSuite: Show the missing strings for translations files.
  Update fr.json with added translations
  Added e2e test for font files
  Fix issue #986
  Fix extra tab file translations/zh_cn.json
  Add Changelog entry for new e2e test for helloworld module
  Small change for re-running Travis CI
  Change Two Conditionals to UpperCase-If
  Fix linting?
  Show Scale of Temperature if config flag is set
  Change to install Roboto fonts by npm
  Update stylelint package
  ...
2017-09-17 16:31:27 +01:00
Mei Gwilym
86ff44adfc Welsh (Cymraeg) language file 2017-09-13 22:17:07 +01:00
Rodrigo Ramírez Norambuena
58b763e935 Hack fix issue #1017 2017-09-12 10:31:49 -03:00
EdgardosReis
5c90cc59aa Updated pt.json translation 2017-09-10 21:42:01 +01:00
Michael Teeuw
710ab44073 Merge pull request #1014 from roramirez/tests/unit/weatherforecast
Add roundValue unit test function weatherforecast module:
2017-09-07 10:07:28 +02:00
Michael Teeuw
b28c5e6807 Merge pull request #1015 from roramirez/show-missing-string-test-translations
TestSuite: Show the missing strings for translations files.
2017-09-07 10:07:09 +02:00
Michael Teeuw
e5ead9ed44 Merge pull request #1004 from qistoph/issue950
More secure defaults.
2017-09-06 15:25:04 +02:00
Chris van Marle
d99897cf9d Update sample address
As proposed in review
2017-09-06 15:22:17 +02:00
Michael Teeuw
701a7cae02 Merge pull request #1011 from qistoph/fix_on_991
Fix on 991
2017-09-06 14:40:32 +02:00
Michael Teeuw
068b6a5470 Merge pull request #1012 from roramirez/set-version-express-ipfilter
set version of express-ipfilter:
2017-09-06 14:19:30 +02:00
Rodrigo Ramírez Norambuena
45d597ac49 set version of express-ipfilter:
Prevent problems with ipWhitelist using []

Information in https://forum.magicmirror.builders/topic/4716/issue-with-white-list-ip-s-not-working/14
4adc5dc33e
2017-09-05 23:56:32 -03:00
Chris van Marle
a518d3f33f Describe default in comment of sample config 2017-09-01 14:46:25 +02:00
Chris van Marle
2f05228d91 More secure defaults.
Without config, listen only on looback interface. In sample config
listen on any interface, but use an IP whitelist.

Related to #950
2017-09-01 14:46:25 +02:00
Chris van Marle
335ae0105f Fix grunt errors 2017-09-01 11:17:01 +02:00
Chris van Marle
62ce7a0e37 Weather forecast settings match current weather
This change makes the config of weather forecast more in line with
current weather. It uses the configured units (metric, imperial,
default) to determine the sign.
2017-09-01 10:58:21 +02:00
Chris van Marle
afa0fb8da1 Fix JavaScript error in weatherforecast
Change 5568e0c2ad introduces JavaScript
errors, because it's calling toUpperCase() on a boolean value.
2017-09-01 10:38:25 +02:00
Michael Teeuw
763d835f4e Merge pull request #1006 from gcarret/patch-1
Added translations for french language
2017-08-29 14:17:43 +02:00
Michael Teeuw
0289872dcd Merge pull request #1000 from QNimbus/fix-issue-986
Fix for issue 986 (font file paths)
2017-08-29 14:15:27 +02:00
Michael Teeuw
2810141bd6 Merge pull request #997 from roramirez/extra-tab-translations/zh_cn.json
Fix extra tab file translations/zh_cn.json
2017-08-29 14:14:32 +02:00
Michael Teeuw
93ea22c69d Merge pull request #996 from roramirez/default-hello-world
Default hello world
2017-08-29 14:14:12 +02:00
Michael Teeuw
daf76a311c Merge pull request #991 from DanielWeeber/temperature-scale-show
Temperature scale show
2017-08-29 14:13:43 +02:00
gcarret
b94271a725 Update fr.json 2017-08-29 07:21:10 +02:00
Rodrigo Ramírez Norambuena
1456aeedf2 TestSuite: Show the missing strings for translations files.
In the translations test now when are missing some translations for
determinated language will be show the missing string.

This can help to identified and improved the translations files.

/me listening STP: Silvergun superman
2017-08-28 21:31:01 -03:00
gcarret
4c6589a57e Update fr.json with added translations 2017-08-27 14:30:58 +02:00
Bas van Wetten
5b9a61b7db Added e2e test for font files 2017-08-21 15:33:17 +02:00
Bas van Wetten
96e71695c5 Fix issue #986
Fixed some font file paths
2017-08-21 11:51:57 +02:00
Rodrigo Ramírez Norambuena
2e7dd1bde3 Fix extra tab file translations/zh_cn.json 2017-08-20 22:50:29 -03:00
Rodrigo Ramírez Norambuena
2de543f5f9 Add Changelog entry for new e2e test for helloworld module 2017-08-20 22:49:23 -03:00
Rodrigo Ramírez Norambuena
a6ee20fca4 Merge remote-tracking branch 'roramirez_github/develop' into default-hello-world 2017-08-20 22:49:13 -03:00
DanielWeeber
2d2f159e04 Small change for re-running Travis CI 2017-08-16 12:11:57 +02:00
DanielWeeber
5568e0c2ad Change Two Conditionals to UpperCase-If 2017-08-16 10:00:38 +02:00
DanielWeeber
cb2cc0cb9e Fix linting? 2017-08-15 20:57:18 +02:00
DanielWeeber
5e573ca980 Show Scale of Temperature if config flag is set 2017-08-15 19:54:35 +02:00
Michael Teeuw
dcb4a315a6 Merge pull request #990 from roramirez/deprecation-warning
Added deprecation warning for authentication of the calendar module.
2017-08-13 19:21:17 +02:00
Rodrigo Ramírez Norambuena
4bd36fc29e Merge branch 'develop' into deprecation-warning 2017-08-13 04:28:06 -03:00
Michael Teeuw
1a7971ec82 Merge pull request #987 from roramirez/update-stylelint
Update stylelint package
2017-08-12 16:52:13 +02:00
Michael Teeuw
c1eda034b3 Merge pull request #989 from roramirez/add-log-deprecated-function
Add log deprecated function in test
2017-08-12 13:50:52 +02:00
Michael Teeuw
2294d722c7 Merge pull request #986 from roramirez/roboto-fonts-as-vendor
Change to install Roboto fonts by npm
2017-08-12 13:50:23 +02:00
Michael Teeuw
7d053be6d1 Merge pull request #975 from QNimbus/unittests/calendar
Add unittest for calendar module
2017-08-12 13:50:07 +02:00
Michael Teeuw
7a508661eb Merge branch 'develop' into update-stylelint 2017-08-10 16:29:30 +02:00
Michael Teeuw
c976242ce5 Merge branch 'develop' into unittests/calendar 2017-08-10 16:27:00 +02:00
Michael Teeuw
2b77c372a3 Merge pull request #979 from CatoAntonsen/fix_filepath
Fix this.file path
2017-08-10 16:26:03 +02:00
Michael Teeuw
b61cc67997 Merge pull request #983 from roramirez/test-unit-js-class
Test unit js class
2017-08-10 12:15:31 +02:00
Michael Teeuw
de8db1a86d Merge branch 'develop' into test-unit-js-class 2017-08-10 12:15:23 +02:00
Michael Teeuw
abfdf0e1c2 Merge pull request #982 from roramirez/doc-roundValue
Fix Documentation in  roundValue function
2017-08-10 12:14:58 +02:00
Michael Teeuw
1d662e354b Merge branch 'develop' into doc-roundValue 2017-08-10 12:14:16 +02:00
Michael Teeuw
663e9a9b5e Merge pull request #973 from roramirez/add-code-error-cliente-failstart
Add log when clientonly failed on starting.
2017-08-10 12:12:24 +02:00
Michael Teeuw
8535409962 Merge branch 'develop' into add-code-error-cliente-failstart 2017-08-10 12:12:17 +02:00
Michael Teeuw
cd5623b348 Merge pull request #972 from roramirez/add-warning-color-full-ip
Add warning color when are using full ip whitelist
2017-08-10 12:11:51 +02:00
Michael Teeuw
673e051bd5 Merge pull request #969 from roramirez/showWeek-test-es-language
Show week test es language
2017-08-10 12:11:25 +02:00
Michael Teeuw
66c949057e Merge pull request #968 from roramirez/set-version-test-dependencies
Set version spectron for 3.6.x
2017-08-10 12:11:12 +02:00
Rodrigo Ramírez Norambuena
aed09f0c64 Change to install Roboto fonts by npm 2017-08-07 20:45:42 -04:00
Rodrigo Ramírez Norambuena
c05f306b0d Update stylelint package 2017-08-06 07:59:31 -04:00
Rodrigo Ramírez Norambuena
739fb99ced Resolved conflict unit tests between currentweather and newsfeed. 2017-08-06 07:53:03 -04:00
Rodrigo Ramírez Norambuena
7fc82ccead Update Changelog for unit tests for currentweather module 2017-08-07 20:42:32 -04:00
Rodrigo Ramírez Norambuena
8ae947f59c Merge remote-tracking branch 'origin/round-temp-unit' into doc-roundValue 2017-08-07 20:40:27 -04:00
Rodrigo Ramírez Norambuena
d34b493b7d Fix clock_es_spec running before the clock_spec 2017-08-05 22:30:38 -04:00
Rodrigo Ramírez Norambuena
4df6e0ee7d Merge remote-tracking branch 'upstream/develop' into showWeek-test-es-language 2017-08-05 21:12:39 -04:00
Rodrigo Ramírez Norambuena
aac4ef05e4 Merge remote-tracking branch 'upstream/develop' into test-unit-js-class 2017-08-05 19:50:34 -04:00
Rodrigo Ramírez Norambuena
ea2f53e166 Merge remote-tracking branch 'upstream/develop' into doc-roundValue 2017-08-05 18:20:22 -04:00
Rodrigo Ramírez Norambuena
f144ec67ab Add changelog entry for log in failed of clientonly 2017-08-05 17:48:20 -04:00
Rodrigo Ramírez Norambuena
7e42dcf0b5 Merge branch 'develop' into add-code-error-cliente-failstart 2017-08-05 17:47:36 -04:00
Rodrigo Ramírez Norambuena
87c4dc313a Merge branch 'develop' into set-version-test-dependencies 2017-08-05 17:44:51 -04:00
Rodrigo Ramírez Norambuena
0d29339898 Merge branch 'develop' into add-warning-color-full-ip 2017-08-05 17:44:05 -04:00
Michael Teeuw
6d83f18490 Merge pull request #981 from roramirez/disable-vendor_spec
Disabled tests of vendor_spec:
2017-08-05 21:30:44 +02:00
Rodrigo Ramírez Norambuena
0ba125c2d7 Disabled tests of vendor_spec:
Sometimes these getting failed in Travis.
2017-08-05 02:40:03 -04:00
Rodrigo Ramírez Norambuena
6abd120a5c Add CHANGELOG entry for color in warning if full ip whitelist 2017-08-04 22:39:52 -04:00
Rodrigo Ramírez Norambuena
5cf7e89ce6 Merge remote-tracking branch 'roramirez_github/develop' into add-warning-color-full-ip 2017-08-04 22:38:31 -04:00
Cato Antonsen
353786cb61 Fix this.file path 2017-08-03 21:34:23 +02:00
Michael Teeuw
586beea21e Merge pull request #977 from roramirez/use-before-after-vendors
Use before after vendors
2017-08-02 12:07:40 +02:00
Rodrigo Ramírez Norambuena
b80454a1f4 Added log text DEPRECATED for old method of authentication 2017-07-31 17:18:34 -04:00
Rodrigo Ramírez Norambuena
19f80cf506 Add entry in Changelog for change hooks in vendors_spec 2017-07-31 16:58:33 -04:00
Rodrigo Ramírez Norambuena
d01100bb15 Merge remote-tracking branch 'roramirez_github/develop' into use-before-after-vendors 2017-07-31 16:57:24 -04:00
Bas van Wetten
e0414e4eb9 Add unittest for calendar module
Add unittest for 'getLocalSpecification' function.
2017-07-31 22:36:14 +02:00
Michael Teeuw
1eb10e3c22 Merge pull request #971 from roramirez/set-title-magicmirror-2
Set title on MagicMirror² for index.html
2017-07-31 15:04:54 +02:00
Michael Teeuw
4772fbcd4a Merge pull request #970 from QNimbus/unittest-calendar
Add new unit tests
2017-07-31 15:04:25 +02:00
Michael Teeuw
18b61e35be Merge branch 'develop' into unittest-calendar 2017-07-31 15:04:16 +02:00
Michael Teeuw
bb7faf0fb3 Merge pull request #967 from roramirez/show-test-build-npm-dependencies
Debug npm list in CI
2017-07-31 15:03:25 +02:00
Michael Teeuw
1603742adc Merge branch 'develop' into show-test-build-npm-dependencies 2017-07-31 15:03:20 +02:00
Michael Teeuw
8a830e40bb Merge pull request #966 from roramirez/format-changelog
Fix litles changes of format in the Changelog
2017-07-31 15:02:43 +02:00
Michael Teeuw
d8adcf5a84 Merge branch 'develop' into format-changelog 2017-07-31 15:02:36 +02:00
Michael Teeuw
1d9a404f77 Merge pull request #965 from roramirez/newfeed-unit
Newfeed unit
2017-07-31 15:00:37 +02:00
Michael Teeuw
26dcaf6078 Merge pull request #962 from QNimbus/fix-issue-961
Fix calendar.js bug
2017-07-31 15:00:15 +02:00
Michael Teeuw
a91e4014bf Merge pull request #959 from roramirez/include-node-8
Include node 8 testsuite and CI
2017-07-31 14:59:34 +02:00
Rodrigo Ramírez Norambuena
06af327e5e Added deprecation warning for authentication of the calendar module.
Discussed in Review
9848f80630 (r105531731)
2017-07-30 22:56:27 -04:00
Bas van Wetten
35e3b889c3 Add new unit tests
Add new unit tests for 'shorten' function in calendar module
2017-07-29 16:02:53 +02:00
Bas van Wetten
5ef6ba0258 Small edit of CHANGELOG
Added a period at the end of the CHANGELOG entries
2017-07-29 11:44:43 +02:00
Bas van Wetten
12754ff135 Updated changelog for calendar fix
Updated changelog for calendar fix
2017-07-28 22:19:25 +02:00
Bas van Wetten
d09a1e254f Merge branch 'fix-issue-963' into fix-issue-961 2017-07-28 21:34:58 +02:00
Bas van Wetten
b89ee67daf Merge branch 'fix-issue-961' into fix-issue-963 2017-07-28 21:33:10 +02:00
Bas van Wetten
7bd256c311 Fix calendar.js bug issue #963
Fixed calendar specific configuration settings maximumEntries and maximumNumberOfDays not overriding global setting
2017-07-28 21:07:38 +02:00
Bas van Wetten
4add7cd0b3 Fix calendar.js bug
Fix bug where excludedEvents count towards maximumEntries displayed
2017-07-28 17:47:22 +02:00
Rodrigo Ramírez Norambuena
5ac20cc4cf SuiteTest: Added unit tests for js/class.js 2017-07-25 21:42:51 -04:00
Rodrigo Ramírez Norambuena
9d7b0487d5 Change hooks for vendor_spec:
Use the hooks before and after in the vendor_spec instead of use beforeAll and
afterAll in the e2e test to prevent failure in CI.
2017-07-25 20:24:04 -04:00
Rodrigo Ramírez Norambuena
59aa84f6c8 Add log when clientonly failed on starting. 2017-07-25 17:52:44 -04:00
Rodrigo Ramírez Norambuena
765b03c868 Add warning color when are using full ip whitelist 2017-07-25 11:26:01 -04:00
Rodrigo Ramírez Norambuena
41ce3db8f9 Set title on MagicMirror² for index.html 2017-07-25 11:00:38 -04:00
Rodrigo Ramírez Norambuena
00e3ef757c Merge remote-tracking branch 'roramirez_github/develop' into showWeek-test-es-language 2017-07-25 10:53:50 -04:00
Rodrigo Ramírez Norambuena
84dc0b2959 Set version spectron for 3.6.x 2017-07-25 10:28:45 -04:00
Rodrigo Ramírez Norambuena
2e48099070 Debug npm list in CI
Execute npm list after the tests in Travis
2017-07-25 10:07:32 -04:00
Rodrigo Ramírez Norambuena
77779bbcd9 Fix litles changes of format in the Changelog 2017-07-25 09:50:51 -04:00
Rodrigo Ramírez Norambuena
e08bc01c33 Fix conflict with test function newsfeed 2017-07-25 09:32:32 -04:00
Michael Teeuw
bf24ee369f Merge pull request #957 from QNimbus/develop
Addition to .gitignore to ignore VS Code folder
2017-07-25 14:50:00 +02:00
Michael Teeuw
876f12db89 Merge pull request #955 from roramirez/close-code-tag-README-modules
Close code tag and fix format for Modules Readme
2017-07-25 14:49:42 +02:00
Michael Teeuw
8b84459e13 Merge pull request #953 from roramirez/activate-test-e2e
Activate e2e test in Travis and desactivate failed test in CI:
2017-07-25 14:49:25 +02:00
Rodrigo Ramírez Norambuena
dccfcc9663 Merge pull request #2 from QNimbus/activate-test-e2e
Change suggestion for e2e testing
2017-07-24 22:38:32 -04:00
Bas van Wetten
203e1cc9b9 Implemented requested change PR #2
Moved tests/e2e_new to tests/e2e folder
2017-07-24 22:08:12 +02:00
Bas van Wetten
b612f0cdec PR for issue #956
Changed .gitignore to ignore Visual Studio Code project folder with custom launch configuration. (See issue #956)
2017-07-24 21:56:53 +02:00
Rodrigo Ramírez Norambuena
961301fbec Merge remote-tracking branch 'roramirez_github/develop' into newfeed-unit 2017-07-24 11:36:16 -04:00
Rodrigo Ramírez Norambuena
2a38d99cf1 Merge remote-tracking branch 'roramirez_github/develop' into include-node-8 2017-07-24 11:34:47 -04:00
Rodrigo Ramírez Norambuena
7903328c2d Add Node 8 for testing 2017-07-23 20:49:52 -04:00
Rodrigo Ramírez Norambuena
56d2b4a80c Close code tag and fix format for Modules Readme 2017-07-23 20:31:26 -04:00
Ricardo Gonzalez
2c6ecaab5b Add ability for currentweather module to display indoor humidity via INDOOR_HUMIDITY notification 2017-07-23 23:55:32 +01:00
Ricardo Gonzalez
45d289a65e Merge branch 'develop' of github.com:ryck/MagicMirror into develop
* 'develop' of github.com:ryck/MagicMirror:
  Add template for v2.1.3
  Set dev version.
2017-07-23 23:52:10 +01: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
Michael Teeuw
fbd47a7f3b Merge pull request #951 from QNimbus/fix-issue-950
Fix for issue #950
2017-07-20 10:12:45 +02:00
Rodrigo Ramírez Norambuena
07533f5658 Activate e2e test in Travis and desactivate failed test in CI:
- dev_console
 - vendor_spec
2017-07-20 00:34:20 -04:00
Rodrigo Ramírez Norambuena
66b7e3e1f5 Fix lint newsfeed_spec 2017-07-20 00:27:57 -04:00
Rodrigo Ramírez Norambuena
4fee4d1903 Add Changelog Unit test for capitalizeFirstLetter newfeed module 2017-07-20 00:10:01 -04:00
Rodrigo Ramírez Norambuena
90d70beea2 Merge remote-tracking branch 'roramirez_github/develop' into newfeed-unit 2017-07-20 00:09:05 -04: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
Michael Teeuw
86ae704e86 Merge pull request #924 from QNimbus/client-only-pr
Added clientonly script
2017-07-12 11:08:04 +02:00
Michael Teeuw
2d1e993fe1 Merge branch 'develop' into client-only-pr 2017-07-12 11:07:49 +02:00
Michael Teeuw
04b550e435 Update correct version. 2017-07-12 10:58:28 +02:00
Michael Teeuw
c492ea77f1 Merge pull request #943 from QNimbus/fix-issue-940
Fix issue #940
2017-07-12 10:55:43 +02:00
Michael Teeuw
61d9112ba7 Merge pull request #941 from QNimbus/fix-issue-933
Fix issue #933
2017-07-12 10:55:23 +02:00
Michael Teeuw
d7fe36de71 Merge pull request #934 from eouia/develop
add symbol and color on broadcasted events
2017-07-12 10:54:59 +02:00
Unknown
db0bd3fa2d Fix issue #940
Fix for issue 940 - time was incorrectly displayed in a 12-hour fashion regardless of the 24 hour clock preference in config.js
2017-07-09 11:46:59 +02:00
Unknown
551619e772 Fix issue #933
This is a fix for issue 933 which restores the original alligment of the analog clock; the analog clock still does not properly align to the left of the left sidebar when content of other left sidebar modules is too wide.
2017-07-08 21:31:05 +02:00
eouia
29bae230a4 Update CHANGELOG.md 2017-07-06 16:09:49 +02:00
eouia
83be49156f symbol and color for broadcasted events (calendar)
- Add symbol and color properties of event when `CALENDAR_EVENTS` notification is broadcasted from `defaultcalendar` module.
2017-07-06 16:09:16 +02:00
eouia
561ae102fb add symbol and color on broadcasted events 2017-07-06 11:57:16 +02:00
Unknown
a05e69b855 Removed cookie dependencies
Removed module import and dependency on the 'cookie' library; it's not used anymore
2017-07-02 12:10:16 +02:00
Unknown
8eb772d80b Allow use of env variables
Made some changes that allows the use of environment variables when starting the standalone client.
2017-07-02 12:10:16 +02:00
Unknown
1590693547 New server route to fetch config
Added a new route to the Express server to supply client with config. Removed the original 'cookie' hack
2017-07-02 12:10:16 +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
Michael Teeuw
8893df118e Add template for v2.1.3 2017-07-01 20:36:17 +02:00
Michael Teeuw
2c77cb5ca5 Set dev version. 2017-07-01 20:35:11 +02:00
Michael Teeuw
8a101f9e9a Merge pull request #931 from MichMich/develop
Release 2.1.2
2017-07-01 20:32:59 +02:00
Michael Teeuw
ce98d0184d Update Version Number 2017-07-01 20:07:08 +02:00
Michael Teeuw
402dea3c8b Prepare for release. 2017-07-01 20:03:17 +02:00
Michael Teeuw
223cf4b2b2 Merge pull request #926 from QNimbus/calendar-timeformat-pr
Calender respects timeformat
2017-06-29 09:26:26 +02:00
Michael Teeuw
8fb7e79bb3 Merge branch 'develop' into calendar-timeformat-pr 2017-06-29 09:26:18 +02:00
Michael Teeuw
5a2d386976 Merge pull request #929 from QNimbus/clock-alignment-pr
Issue with date alignment in clock.js
2017-06-29 09:24:55 +02:00
Michael Teeuw
96622533e0 Merge pull request #930 from talpah/translations/ro
Romanian translation
2017-06-29 09:24:21 +02:00
Cosmin
8814ce05a9 Add translations for ro. 2017-06-29 10:05:14 +03:00
Unknown
c15148fc07 Issue with date aligment in clock.js
In reference to issue #927. Made changes to clock.js and clock_styles.css to prevent aligment problem when displaying analog clock and large calendar entries
2017-06-26 20:19:13 +02:00
Unknown
3404ebbbb8 Calender respects timeformat
In reference to issue #776, made changes to calendar.js to respect timeformat config option if it is used
2017-06-26 14:43:40 +02:00
Michael Teeuw
51494cabc8 Merge pull request #921 from QNimbus/pr-01
Removed unused import
2017-06-21 12:43:50 +02:00
Michael Teeuw
1eb326683e Merge pull request #919 from QNimbus/develop
Added Dutch translation
2017-06-21 12:43:24 +02:00
Unknown
98bcfbef7e Removed unused import
Removed unused import from js/electron.js
2017-06-18 19:17:41 +02:00
Unknown
9416980096 Added Dutch translation
Added Dutch translation to Alert module
2017-06-13 20:33:48 +02:00
Michael Teeuw
b34505c086 Merge pull request #918 from fmandal/patch-1
Added week translation
2017-06-13 16:54:06 +02:00
Michael Teeuw
a65edf52ca Merge pull request #916 from paviro/patch-7
Markdown header fixes
2017-06-13 16:53:46 +02:00
Michael Teeuw
d1513f2575 Merge pull request #915 from rejas/cleanups
Cleanups
2017-06-13 16:53:23 +02:00
Fredrik Mandal
12d20c35be Added week translation 2017-06-13 01:52:13 +02:00
Paul-Vincent Roll
9f822c0991 Markdown header fixes 2017-06-11 23:44:43 +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
Veeck
a2464dce73 Udpate dependencies 2017-06-11 11:36:17 +02:00
Veeck
53476b723d Merge branch 'develop' into cleanups 2017-06-11 11:29:19 +02:00
Michael Teeuw
ca92a0af5c Merge pull request #895 from JanLoebel/develop
#891 Added ability to change the custom.css path.
2017-06-03 19:10:45 +02:00
Michael Teeuw
6e6cd90f6d Merge pull request #908 from retroflex/swe-translation-corrections
Corrected Swedish translations for TODAY/TOMORROW/DAYAFTERTOMORROW.
2017-06-03 08:08:28 +02:00
Michael Teeuw
adc84e1f93 Merge pull request #909 from roramirez/test-unit-desactivate-e2e
Run test unit for failed in Travis of e2e
2017-06-03 08:07:47 +02:00
Veeck
20687d915a Remove unused vars and whitelines, cleanups 2017-06-02 19:35:10 +02:00
Rodrigo Ramírez Norambuena
12a34f0b09 Run test unit for failed in Travis of e2e 2017-05-31 13:50:04 -04:00
retroflex
e5e49e4347 Corrected Swedish translations for TODAY/TOMORROW/DAYAFTERTOMORROW. 2017-05-29 22:55:42 +02:00
Michael Teeuw
9f61256e5e Move stylelint to devDep. 2017-05-26 14:43:44 +02:00
Michael Teeuw
ac6e370a78 Merge pull request #900 from rejas/package_updates
Fix npm warning regarding stylelint
2017-05-26 14:42:58 +02:00
Michael Teeuw
a9c2c2178a Merge branch 'develop' into package_updates 2017-05-26 14:42:24 +02:00
Michael Teeuw
c67419bb55 Merge pull request #899 from roramirez/module-stylelint
Remove warnings
2017-05-26 14:41:14 +02:00
Michael Teeuw
631c270fc7 Merge pull request #898 from roramirez/fix-comment
Fix spelling comment js/loader.js
2017-05-26 14:40:59 +02:00
Michael Teeuw
3c82dfc0a5 Merge pull request #897 from roramirez/information-Beaufort-function
Add link for information about Beaufort Wind Scale for ms2Beaufort
2017-05-26 14:40:47 +02:00
Michael Teeuw
063574023b Merge pull request #873 from roramirez/fixme_for_test_week_number
ADD fixme wanted where the day if sunday for test number of week
2017-05-26 14:40:06 +02:00
Veeck
5f539b133b Update dependencies, add stylelint too 2017-05-21 19:16:09 +02:00
Jan Löbel
0bb52a6058 #891 Added ability to change the custom.css path. 2017-05-19 19:54:43 +02:00
Michael Teeuw
0db40bbb32 Merge pull request #893 from xuanyou/xuanyou-patch-compliments-documentation
Xuanyou patch compliments documentation
2017-05-18 12:35:42 +02:00
Michael Teeuw
f66114e203 Merge pull request #892 from markuzSchmidt/patch-1
Correction of Documentation of `resume()`
2017-05-18 12:34:17 +02:00
Michael Teeuw
2fcc064b0f Merge pull request #879 from retroflex/develop 2017-05-18 12:33:58 +02:00
Michael Teeuw
a4c441a1b7 Merge branch 'develop' into develop 2017-05-18 12:33:34 +02:00
xuanyou
cbb6e4d6f3 Update docs: classes config variable default value 2017-05-18 18:25:17 +08:00
xuanyou
34361ccd1c Update documentation for compliments module
Added documentation for the config variable "classes" that allows the user to override the css classes of the compliments module display.

Fixed the erroneous "a default calendar is shown" to "default compliments".
2017-05-18 18:14:43 +08:00
markuzSchmidt
c953936798 Update README.md 2017-05-17 22:00:55 +02:00
Michael Teeuw
6fd2a6ef34 Merge pull request #885 from z0diak/develop
fixing issue with installer (#884)
2017-05-15 20:25:41 +02:00
Rodrigo Ramírez Norambuena
be05f1a71f Remove warnings
npm WARN grunt-stylelint@0.8.0 requires a peer of stylelint@^7.8.0 but
none was installed.

npm WARN stylelint-config-standard@16.0.0 requires a peer of
stylelint@^7.8.0 but none was installed.
2017-05-11 02:44:52 -03:00
Rodrigo Ramírez Norambuena
0de65d9c0f Fix spelling comment js/loader.js 2017-05-11 02:30:25 -03:00
Vladimir Filimonov
a60f4e3bad fixing issue https://github.com/MichMich/MagicMirror/issues/884 2017-05-06 21:42:02 +03:00
Michael Teeuw
ab30ea766b Merge pull request #882 from roramirez/remove_log_socketclient
Remove commented log not used in js/socketclient.js
2017-05-03 17:34:29 +02:00
Michael Teeuw
099a7c46b7 Merge pull request #881 from roramirez/spelling-changelog
Fix spelling Changelog
2017-05-03 17:34:15 +02:00
Michael Teeuw
a7afcd9644 Merge branch 'develop' into spelling-changelog 2017-05-03 17:34:03 +02:00
retroflex
7c80eec755 Merge branch 'develop' into develop 2017-05-02 21:24:36 +02:00
retroflex
07c50c20b6 Spaces -> tabs. 2017-05-02 21:20:35 +02:00
Michael Teeuw
08d841f6c5 Merge pull request #872 from Arkkimaagi/patch-2
Support showing wind direction with an arrow
2017-05-01 14:29:23 +02:00
Michael Teeuw
6b144c5816 Merge branch 'develop' into patch-2 2017-05-01 14:29:14 +02:00
Michael Teeuw
322cec0980 Merge pull request #877 from Arkkimaagi/better-translations
Improve translation flexibility
2017-05-01 14:27:35 +02:00
Michael Teeuw
73a47b2853 Merge pull request #883 from jasonyork/develop
Update currentweather to support indoor temperature
2017-05-01 14:26:05 +02:00
Jason York
0036ec2214 Update currentweather to support indoor temperature 2017-04-30 20:58:25 -05:00
Rodrigo Ramírez Norambuena
98dc69893e Fix spelling Changelog 2017-04-29 23:25:57 -03:00
retroflex
af48af5085 Updated changelog: Added option to set a separate date format for full day events. 2017-04-28 23:56:05 +02:00
retroflex
0b2279a113 Merge remote-tracking branch 'original/develop' into develop 2017-04-28 23:39:57 +02:00
retroflex
ba63a44ec8 Added option to set a separate date format for full day events. 2017-04-28 23:31:07 +02:00
Mikko Tapionlinna
7c20d2f97c Merge branch 'develop' into better-translations 2017-04-28 15:35:28 +03:00
Mikko Tapionlinna
8e7369f0b5 Merge branch 'develop' into patch-2 2017-04-28 15:34:40 +03:00
Mikko Tapionlinna
5f80deb5b7 Added direction as an arrow feature to CHANGELOG.md 2017-04-28 15:33:32 +03:00
Mikko Tapionlinna
826fdbf342 Add flexible word order translations to CHANGELOG.md 2017-04-28 15:31:07 +03:00
Mikko Tapionlinna
7e5186c3c7 Add documentation for new translate features 2017-04-28 15:24:41 +03:00
Mikko Tapionlinna
2bc5253725 Set default value for showWindDirectionAsArrow 2017-04-28 13:59:07 +03:00
Mikko Tapionlinna
f58787bb50 Add documentation for showWindDirectionAsArrow 2017-04-28 13:58:52 +03:00
Michael Teeuw
88a01d39ee Merge pull request #869 from roramirez/check-default-modules-directory
Check default modules directory
2017-04-26 09:36:19 +02:00
Mikko Tapionlinna
ee88897b18 Add better support for translations with backwards compatibility 2017-04-25 23:15:34 +03:00
Rodrigo Ramírez Norambuena
b26f9e316d ADD fixme wanted where the day if sunday for test number of week 2017-04-24 22:49:15 -03:00
Mikko Tapionlinna
0e486b45e1 Support showing wind direction with an arrow
As described in https://github.com/MichMich/MagicMirror/issues/871 this feature lets user use arrow instead of an abbreviation for wind directions. This can be especially helpful on languages like Finnish that do not have all the compass directions English has.
2017-04-24 23:54:32 +03:00
Rodrigo Ramírez Norambuena
f730d2fc27 Add changelog test directories for default modules 2017-04-22 21:23:48 -03:00
Rodrigo Ramírez Norambuena
26303c8617 Merge remote-tracking branch 'roramirez_github/develop' into check-default-modules-directory 2017-04-22 21:22:41 -03:00
Michael Teeuw
a6485b61a4 Merge pull request #867 from fewieden/bugfix-compliment-duplicates
bugfix for duplicated compliments
2017-04-22 18:58:32 +02:00
Michael Teeuw
7db07bca35 Merge branch 'develop' into bugfix-compliment-duplicates 2017-04-22 18:58:26 +02:00
Michael Teeuw
19bbe0fc1f Merge pull request #865 from jeliasson/patch-1
Indent and double-quoute
2017-04-22 18:57:50 +02:00
Michael Teeuw
2b2c2de583 Merge pull request #863 from roramirez/message-port-server
Message port server
2017-04-22 18:57:35 +02:00
Michael Teeuw
b05534472c Merge pull request #862 from roramirez/dev-args
Change method for check if pass dev parameter
2017-04-22 18:57:12 +02:00
Michael Teeuw
30aa8d469c Merge pull request #861 from roramirez/unit-calendar
Unit calendar
2017-04-22 18:56:55 +02:00
fewieden
c4282a3593 null isn't typeof undefined 2017-04-22 12:25:51 +02:00
fewieden
778107aae9 add edge case anytime only 2017-04-22 12:09:52 +02:00
fewieden
581af762f9 bugfix for duplicated compliments 2017-04-22 11:35:42 +02:00
Johan Eliasson
31e63b576b Indent and double-quoute 2017-04-21 23:02:33 +02:00
Michael Teeuw
efb592dce5 Merge pull request #856 from bastilimbach/develop
Outsource Dockerfiles
2017-04-19 21:45:42 +02:00
Michael Teeuw
fa5b936d7b Merge pull request #858 from roramirez/check-week-number
Check week number
2017-04-19 21:45:23 +02:00
Rodrigo Ramírez Norambuena
4904bd53ef Fix grunt double quotes unit calendar_spec 2017-04-19 00:45:55 -03:00
Rodrigo Ramírez Norambuena
320ce372f5 Add changelog unit test capFirst function on calendar module 2017-04-19 00:39:18 -03:00
Rodrigo Ramírez Norambuena
7a803abec8 Merge remote-tracking branch 'roramirez_github/develop' into unit-calendar 2017-04-19 00:38:35 -03:00
Rodrigo Ramírez Norambuena
b41bda569d Change method for check if pass dev parameter 2017-04-18 23:34:14 -03:00
Rodrigo Ramírez Norambuena
fd2919fd1c Remove commented log not used in js/socketclient.js 2017-04-18 23:14:07 -03:00
Rodrigo Ramírez Norambuena
dce8edf742 Merge branch 'develop' into check-week-number 2017-04-18 22:59:07 -03:00
Rodrigo Ramírez Norambuena
298e32aada Fix Grunt error
124:38  error  Strings must use doublequote  quotes
2017-04-18 22:38:29 -03:00
Rodrigo Ramírez Norambuena
2b2136867d Add change double message port in starting server 2017-04-18 22:31:16 -03:00
Rodrigo Ramírez Norambuena
c1830aa37c Fix message port starting server 2017-04-18 22:21:55 -03:00
Michael Teeuw
a3d4049c9c Merge pull request #848 from MichMich/master
Unable to install dependencies!
2017-04-17 10:59:43 +02:00
Sebastian Limbach
058b4bbe6c Add changes to changelog 2017-04-16 22:48:05 +02:00
Michael Teeuw
c4c7b2ed5b Merge pull request #853 from roramirez/gitignore-vim
ignore git file for vim and patch
2017-04-16 22:27:14 +02:00
Michael Teeuw
aee607ea81 Merge pull request #852 from roramirez/sort-dependencies
Sort dependencies in the file package.json
2017-04-16 22:27:02 +02:00
Michael Teeuw
5eea5939c0 Merge pull request #850 from roramirez/defaultModules-set
Default modules set
2017-04-16 22:26:42 +02:00
Sebastian Limbach
ac53d64ffc Change docker hub url 2017-04-16 21:17:52 +02:00
Sebastian Limbach
9ebee8c03e Delete all Docker related files
The Docker images are outsourced to https://github.com/bastilimbach/docker-MagicMirror
2017-04-16 21:17:07 +02:00
Rodrigo Ramírez Norambuena
93965fd98b Add changelog test modules/default/defaultmodules.js 2017-04-13 23:44:37 -03:00
Rodrigo Ramírez Norambuena
59c25ef915 Merge remote-tracking branch 'roramirez_github/develop' into defaultModules-set 2017-04-13 23:43:07 -03:00
Rodrigo Ramírez Norambuena
7e9c4848fb Sort dependencies in the file package.json 2017-04-13 08:40:51 -03:00
Rodrigo Ramírez Norambuena
467b1ad4f1 Add test match week number with clock module with configuration showWeek 2017-04-12 22:29:20 -03:00
Michael Teeuw
f45bd18cc2 Merge pull request #846 from bastilimbach/develop
Add the ability to use the docker image with a raspberry pi
2017-04-12 22:18:33 +02:00
Sebastian Limbach
4f844abc0c Change copy flag to not replace existing modules 2017-04-12 20:21:51 +02:00
Sebastian Limbach
b688dcd4ba Add changes to changelog 2017-04-12 20:20:30 +02:00
Sebastian Limbach
d5e902679b Change linux distribution
I changed the linux distribution from node, which used Debian, to an arm based linux distribution so the application can be used on an arm based system (e.g. Raspberry)
2017-04-12 20:19:24 +02:00
Michael Teeuw
eae21e1371 Merge pull request #837 from roramirez/tests-vendors
Tests vendors
2017-04-11 10:45:47 +02:00
Rodrigo Ramírez Norambuena
947c2e556d Add test e2e showWeek feature in spanish language. 2017-04-09 15:32:15 -03:00
Rodrigo Ramírez Norambuena
d68d4c2c76 Add Changelog vendor_spec 2017-04-07 10:08:42 -03:00
Rodrigo Ramírez Norambuena
1ef451c048 Merge remote-tracking branch 'roramirez_github/develop' into tests-vendors 2017-04-07 10:06:33 -03:00
Michael Teeuw
ec20748594 Merge pull request #836 from roramirez/check-wrong-configuration
Check wrong configuration
2017-04-07 08:42:04 +02:00
Michael Teeuw
764f05b42a Merge pull request #833 from javiersigler/task/improve_dockerfile
Docker - Do not replace configuration
2017-04-07 08:41:13 +02:00
Michael Teeuw
5c41e24b99 Merge pull request #832 from MichMich/MichMich-patch-1
Add missing dependency.
2017-04-07 08:40:12 +02:00
Rodrigo Ramírez Norambuena
9725091233 Merge remote-tracking branch 'roramirez_github/develop' into check-wrong-configuration 2017-04-06 21:32:48 -03:00
Javier Sigler
8f8dfabe0f Merge branch 'develop' of github.com:MichMich/MagicMirror into task/improve_dockerfile 2017-04-06 16:46:41 +02:00
Javier Sigler
b9749bad61 Do not replace configuration 2017-04-06 16:43:53 +02:00
Michael Teeuw
31609a8aba Add missing dependency. 2017-04-06 16:34:16 +02:00
Michael Teeuw
28e8cc2675 Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop 2017-04-06 16:30:38 +02:00
Michael Teeuw
033d3c92ab Add missing dependency 2017-04-06 16:28:48 +02:00
Michael Teeuw
3484fcfd2a Merge pull request #829 from roramirez/instruction_installer-develop
Instruction installer develop
2017-04-06 16:24:42 +02:00
Michael Teeuw
a8e18d7f99 Merge pull request #830 from roramirez/format-tab-config.sample
Fix extra tabs added in config.js.sample
2017-04-06 16:24:29 +02:00
Michael Teeuw
db30b58ee9 Merge pull request #828 from greg-dev/update-ru-week
Add Russian translation for week
2017-04-06 16:24:18 +02:00
Michael Teeuw
3748488200 Merge pull request #824 from roramirez/instruction_installer
Fix instruction README for install by script
2017-04-06 16:22:29 +02:00
Rodrigo Ramírez Norambuena
c53a20a577 Add changelog entry fix instruction_installer 2017-04-05 22:10:05 -03:00
Rodrigo Ramírez Norambuena
dfcb2b610a Merge remote-tracking branch 'roramirez_github/develop' into instruction_installer 2017-04-05 22:01:01 -03:00
Greg Dev
95278a78ff Add Russian translation for week 2017-04-05 23:39:39 +02:00
Michael Teeuw
400d577546 Merge pull request #825 from javiersigler/task/improve_dockerfile
Task/improve dockerfile
2017-04-05 20:14:46 +02:00
Michael Teeuw
60cf6cec5e Merge pull request #822 from roramirez/website-package
Change website in package.json
2017-04-05 20:13:13 +02:00
Michael Teeuw
13901b9028 Merge pull request #821 from roramirez/newsfeed_test_case
Newsfeed test case
2017-04-05 20:12:57 +02:00
Michael Teeuw
23454a918d Merge pull request #820 from roramirez/note-information-configuration-file
Add note about how configurate the file into config.js.sample
2017-04-05 20:12:37 +02:00
Javier Sigler
fa64ecf513 Remove layers and fix npm install of vendor 2017-04-04 18:34:19 +02:00
Javier Sigler
bb8c0f1d9c Merge branch 'develop' of github.com:javiersigler/MagicMirror into task/improve_dockerfile 2017-04-04 18:32:22 +02:00
Javier Sigler
6e33e063da Remove layers and fix npm install of vendor 2017-04-04 18:30:24 +02:00
Rodrigo Ramírez Norambuena
e44893f91e Fix instruction README for install by script
issue close #823
2017-04-04 11:09:49 -03:00
Rodrigo Ramírez Norambuena
f2c3fc20de ignore git file for vim and patch 2017-04-03 15:50:25 -03:00
Rodrigo Ramírez Norambuena
d903fe400f Add entry in Changelog for newsfeed_test_case 2017-04-03 15:21:52 -03:00
Michael Teeuw
22e4e4125a Merge pull request #818 from fewieden/fix-typo
fixed typo + eslint
2017-04-03 20:21:35 +02:00
Michael Teeuw
badddfe3d7 Merge pull request #817 from fewieden/german-translation
added german translation key
2017-04-03 20:20:59 +02:00
Michael Teeuw
e14816dcfa Merge pull request #816 from roramirez/fix-spelling
Fix spelling mistake
2017-04-03 20:20:41 +02:00
Rodrigo Ramírez Norambuena
4b83722a66 Merge remote-tracking branch 'roramirez_github/develop' into newsfeed_test_case 2017-04-03 15:20:24 -03:00
Rodrigo Ramírez Norambuena
c798913fd2 Fix extra tabs added in config.js.sample 2017-04-03 15:18:35 -03:00
Rodrigo Ramírez Norambuena
636dbe5b95 Globing pattern test grunt (#1)
* Fix Matching patterns tests directories Grunt task of eslint

* Fix eslint errors in testsuite.

* Format one line per file in src section in Gruntfile.js
2017-04-03 16:47:22 +02:00
Rodrigo Ramírez Norambuena
ab28d0e09f Add note about how configurate the file into config.js.sample 2017-04-03 11:28:46 -03:00
fewieden
a74efd285c fix typo + eslint 2017-04-03 10:37:23 +02:00
fewieden
3e1eb03517 added german translation key 2017-04-03 10:06:57 +02:00
Michael Teeuw
fb90574d44 Update CHANGELOG.md 2017-04-02 23:10:32 +02:00
Michael Teeuw
c0fb337dfb Merge pull request #815 from greg-dev/update-pl
Add Polish translation for week and day after tomorrow
2017-04-02 23:09:49 +02:00
Michael Teeuw
e7775bb9d9 Merge pull request #814 from amcolash/wrap_events
Option to wrap events in calendar
2017-04-02 23:09:11 +02:00
Greg Dev
64f2a67573 Add Polish translation for week and day after tomorrow 2017-04-02 22:29:54 +02:00
Andrew McOlash
154e33a2c3 Make times align to the top of the cell 2017-04-02 15:10:00 -05:00
Andrew McOlash
63ae2b8095 Add in ability to wrap calendar events to multiple lines 2017-04-02 15:06:58 -05:00
Michael Teeuw
6165a6af6c Merge pull request #812 from doug-kline/patch-1
TL;RL cheat notes for IPv4 ipWhitelist when PI listening on IPv6
2017-04-02 09:07:51 +02:00
Doug Kline
4a70e3cd31 Update config.js.sample 2017-04-01 18:54:28 -04:00
Doug Kline
5ccf053cba TL;RL cheat notes for IPv4 ipWhitelist
Hopefully save a google or support request --  while still using IPv4 addresses on MagicMirror network, need to set full address by using ::ffff: as prefix to IP in config.  e.g.  ::ffff:192.168.5.1 and not 192.168.5.1
2017-04-01 17:23:24 -04:00
Michael Teeuw
5a6f5133af Prepare setup for 2.1.2 2017-04-01 22:05:21 +02:00
Michael Teeuw
1a2b4f8260 Merge pull request #811 from MichMich/develop
Release 2.1.1
2017-04-01 22:00:06 +02:00
Michael Teeuw
5436050df1 Prepare for release. 2017-04-01 21:49:52 +02:00
Michael Teeuw
d3f3946971 Merge pull request #810 from roramirez/vendor-fix-moment-timezone-script
Bugfix introduced into bb08fe8113
2017-04-01 21:49:03 +02:00
Rodrigo Ramírez Norambuena
597a7f7b40 Bugfix introduced into bb08fe8113
This is work on Pull Request #803 and help of @johanhammar and @fewieden
2017-04-01 15:53:20 -03:00
Michael Teeuw
02f549d1dd Merge pull request #809 from roramirez/readme-timezone
Add link more information timezone information for configuracion in clock module
2017-04-01 11:15:52 +02:00
Michael Teeuw
0c096bb090 Merge pull request #806 from johanhammar/newsfeed-documentation-updates
Updated documentation and fixed typos for the newsfeed module
2017-03-31 09:29:04 +02:00
Michael Teeuw
8bc6cd7fc9 Merge pull request #799 from roramirez/missing-entries-changelog-test
Add in Changelog missing tests added for 2.1.1 version
2017-03-31 09:27:03 +02:00
Michael Teeuw
65d9e5d1fc Merge pull request #800 from roramirez/test-set-MM_PORT
Test set mm port
2017-03-31 09:26:43 +02:00
Johan Hammar
47c356692f Fix a few more typos 2017-03-30 22:14:11 +02:00
Rodrigo Ramírez Norambuena
ef9157174c Fix broken next test:
Now after ran the test MM_PORT of test case for change of port the
enviroment variable is deleted.
2017-03-30 16:41:46 -03:00
Johan Hammar
7345807871 Updated documentation and fixed typos for the newsfeed module. Fixes GH-804 2017-03-30 21:15:51 +02:00
Rodrigo Ramírez Norambuena
19b9d3737e Merge branch 'develop' into test-set-MM_PORT 2017-03-30 16:12:08 -03:00
Michael Teeuw
db3be3d80a Merge pull request #801 from johanhammar/clock-week-section
Added a week section to the clock module
2017-03-30 20:32:53 +02:00
Michael Teeuw
60c7522f22 Merge pull request #802 from johanhammar/develop
Corrected minor typo
2017-03-30 20:32:36 +02:00
Michael Teeuw
60002793b0 Merge pull request #805 from zhyuri/develop
Updated the zh_cn translation.
2017-03-30 20:32:14 +02:00
Yuri
9e5a4189d7 Update zh_cn.json 2017-03-30 14:48:21 +08:00
Yuri
945cbdd3a7 Update zh_cn.json
Add Chinese support updated.
2017-03-30 14:47:16 +08:00
Rodrigo Ramírez Norambuena
f974fd0660 Add roundValue unit test function weatherforecast module:
- tests for this.config.roundTemp is false
    - tests for this.config.roundTemp is true
2017-03-29 00:29:47 -03:00
Rodrigo Ramírez Norambuena
af9fdfa224 Add roundValue unit test function currentweather module:
- tests for this.config.roundTemp is false
2017-03-28 22:15:48 -03:00
Johan Hammar
77c72d2bb3 Merge pull request #1 from roramirez/add-es
Add translations es for Week
2017-03-28 23:02:08 +02:00
Rodrigo Ramírez Norambuena
8404617090 Add translations es for Week 2017-03-28 17:57:34 -03:00
Johan Hammar
cc9a429689 Corrected minor typo 2017-03-28 22:44:47 +02:00
Johan Hammar
44f50eba5b Updated changelog with information about the new week section of the clock module 2017-03-28 22:30:48 +02:00
Johan Hammar
f4509e24c6 Added a week section to the clock module 2017-03-28 22:02:30 +02:00
Rodrigo Ramírez Norambuena
e17a40fdb2 Merge branch 'develop' into missing-entries-changelog-test 2017-03-28 13:19:26 -03:00
Rodrigo Ramírez Norambuena
181cb235df Unit test currentweather module:
Add roundValue unit test function currentweather module
	tests for this.config.roundTemp is true
2017-03-28 10:05:08 -03:00
Michael Teeuw
e3456cb74f Merge pull request #788 from flo80/fullscreen
Support full screen
2017-03-28 13:31:58 +02:00
Michael Teeuw
e377552f12 Merge branch 'develop' into fullscreen 2017-03-28 12:55:10 +02:00
Michael Teeuw
9ab9e4894d Merge pull request #789 from 42SK/develop
Added option to ignore old items in the news feed module
2017-03-28 12:54:09 +02:00
Michael Teeuw
5782979203 Merge pull request #796 from roramirez/package-description
change description package.json
2017-03-28 12:53:25 +02:00
Michael Teeuw
a4bb279da8 Merge pull request #795 from roramirez/test-port-8090
Test change port configuration
2017-03-28 12:53:07 +02:00
Michael Teeuw
8df9549a42 Merge pull request #794 from roramirez/test-position-modules
Add test module position using helloworld
2017-03-28 12:52:57 +02:00
Michael Teeuw
de873c5f6f Merge pull request #793 from roramirez/format-CHANGELOG
Format changelog for 2.1.1
2017-03-28 12:51:44 +02:00
Michael Teeuw
3425e929e9 Merge pull request #790 from roramirez/404_request-test
Test env 404 not found request http://localhost:8080/nothing
2017-03-28 12:51:23 +02:00
Rodrigo Ramírez Norambuena
60c5d96037 fix documentation currentweather and weatherforecast function
roundValue:

This function toFixed return a string type not a number value.
2017-03-27 12:18:36 -03:00
Rodrigo Ramírez Norambuena
4b4c3ddb2f Add changelog test MM_PORT 2017-03-27 02:01:42 -03:00
Rodrigo Ramírez Norambuena
1ea50ea917 Merge branch 'develop' into test-set-MM_PORT 2017-03-28 13:16:56 -03:00
Rodrigo Ramírez Norambuena
29f68d218d Fix spelling mistake 2017-03-26 18:06:34 -03:00
Rodrigo Ramírez Norambuena
daad8bca69 Add test e2e helloworld module with default config text. 2017-03-26 17:36:45 -03:00
Rodrigo Ramírez Norambuena
f4408aa72c Add link for information about Beaufort Wind Scale for ms2Beaufort
function in currentweather and weatherforecast module
2017-03-26 16:57:46 -03:00
Rodrigo Ramírez Norambuena
0117cd478b Unit test for capitalizeFirstLetter newfeed module 2017-03-26 16:19:45 -03:00
Rodrigo Ramírez Norambuena
9ad22d7405 Add link more information timezone information for configuracion in
clock module.
2017-03-26 16:13:54 -03:00
Rodrigo Ramírez Norambuena
de4d0989e9 Add unit test function capFist calendar module 2017-03-26 00:49:22 -03:00
Rodrigo Ramírez Norambuena
0c884c2669 Test for default module directories 2017-03-25 23:52:18 -03:00
Rodrigo Ramírez Norambuena
5d7cfc1c10 test for modules set in modules/default/defaultmodules.js 2017-03-25 19:01:05 -03:00
Rodrigo Ramírez Norambuena
fd2b070a6a Change website in package.json 2017-03-25 00:26:47 -03:00
Flo
455819566b Update CHANGELOG.md 2017-03-24 23:13:08 +01:00
Flo
b39113f0ae Removed fullscreen toggle; is now own, configurable module 2017-03-24 23:10:05 +01:00
Flo
af0f1939a3 Fixed lint errors 2017-03-22 22:28:51 +01:00
Flo
becb9fc43e Updated CHANGELOG 2017-03-22 22:27:47 +01:00
Flo
8b9c274fdd Moved scripts to bottom in index.html 2017-03-22 22:27:19 +01:00
Flo
0701f3496b Merge branch 'fullscreen' of github.com:flo80/MagicMirror into fullscreen 2017-03-22 22:20:27 +01:00
Flo
09c03e8ca7 Support full screen mode on iOS and enable "click to toggle fullscreen" in standard browsers 2017-03-22 22:19:19 +01:00
Michael Teeuw
9285da6c12 Merge pull request #787 from roramirez/200_request-test
test env requst http://localhost:8080
2017-03-22 09:03:08 +01:00
Flo
6a0e16885d Support full screen mode on iOS and enable "click to toggle fullscreen" in standard browsers 2017-03-21 20:56:11 +01:00
42SK
f0db135b1d Added option to ignore old items in the news feed module
Outdated news items can be omitted via the ignoreOldItems and the ignoreOlderThan option.
2017-03-21 19:39:51 +01:00
Rodrigo Ramírez Norambuena
4fb86bd699 change description package.json 2017-03-19 16:54:36 -03:00
Michael Teeuw
c62082b924 Merge pull request #785 from roramirez/colors-error
Use color red for error when the configuration file is not found.
2017-03-18 21:50:18 +01:00
Michael Teeuw
e8f592c6e0 Merge pull request #784 from roramirez/validate_vendor_js_file
Fix eslintignore for vendor/vendor.js and fix the eslint validation
2017-03-18 21:49:46 +01:00
Michael Teeuw
61935942cf Merge pull request #783 from roramirez/fixspace-code-main
Remote extra space  main.js
2017-03-18 20:44:32 +01:00
Michael Teeuw
f1d8bb84b7 Merge pull request #782 from roramirez/fail-auth-calendar
Add test module calendar fail basic auth
2017-03-18 20:44:22 +01:00
Rodrigo Ramírez Norambuena
7918448be2 Add test for vendor
This test get all vendor defined.  Create a get request http each vendor
and expect the 200 HTTP code.
2017-03-18 13:19:31 -03:00
Rodrigo Ramírez Norambuena
f89f704a69 Add task to check configuration file syntax. 2017-03-18 09:45:32 -03:00
Rodrigo Ramírez Norambuena
ae33de7e7c Add in Changelog missing tests added for 2.1.1 version 2017-03-18 09:42:36 -03:00
Rodrigo Ramírez Norambuena
b23e474648 Format changelog for 2.1.1 2017-03-18 09:36:50 -03:00
Michael Teeuw
611bc26685 Merge pull request #719 from roramirez/test-without-modules
Testing default modules
2017-03-18 11:43:06 +01:00
Michael Teeuw
0dc39166ac Merge pull request #775 from roramirez/npm-vendors
Npm for vendors
2017-03-18 11:42:38 +01:00
Michael Teeuw
8d970b7858 Merge pull request #781 from roramirez/test-ipWhitelist-none
Add test  ipWhistelist = []
2017-03-18 11:41:31 +01:00
Michael Teeuw
7033c4a182 Merge pull request #780 from roramirez/restore-code-merges
Restore code removed on Merges on 2017-03-17
2017-03-18 11:41:17 +01:00
Rodrigo Ramírez Norambuena
2c0ca78265 Merge branch 'colors-error' into check-wrong-configuration 2017-03-18 06:00:49 -03:00
Rodrigo Ramírez Norambuena
0d3c03d1e3 Restore code removed on Merges on 2017-03-17 2017-03-17 22:36:21 -03:00
Michael Teeuw
b4dfce4a44 Merge branch 'fewieden-calendar-multiple-icons' into develop 2017-03-17 15:37:40 +01:00
Michael Teeuw
91ca3939b3 Fix Merge Conflicts 2017-03-17 15:36:55 +01:00
Michael Teeuw
92db5d3a35 Merge pull request #770 from amcolash/excluded_events
Calendar module excluded events filter
2017-03-17 14:35:30 +01:00
Michael Teeuw
f252960aaf Merge branch 'develop' into excluded_events 2017-03-17 14:35:11 +01:00
Michael Teeuw
4aec39df7a Fix Merge Conflicts. 2017-03-17 14:32:01 +01:00
Michael Teeuw
15b19925f2 Fix Merge 2017-03-17 14:16:35 +01:00
Michael Teeuw
bfb376505b Merge pull request #759 from roramirez/readme-ipWhitelist
Add note to allow all IP addresses. ipWhitelist configuration directive.
2017-03-17 14:10:24 +01:00
Andrew McOlash
ec75ff5292 Merge branch 'develop' into excluded_events 2017-03-17 07:28:06 -05:00
Michael Teeuw
28eb0be4ad Merge pull request #769 from amcolash/single_line_news
Add in single line news items
2017-03-17 13:27:13 +01:00
Andrew McOlash
4d3b6b1486 Merge remote-tracking branch 'upstream/develop' into excluded_events 2017-03-17 07:25:42 -05:00
Andrew McOlash
d3fd9a188d Merge branch 'develop' into single_line_news 2017-03-17 07:18:13 -05:00
Andrew McOlash
41a15f90cb Merge remote-tracking branch 'upstream/develop' into single_line_news 2017-03-17 07:17:19 -05:00
Michael Teeuw
9c604a7886 Merge pull request #773 from amcolash/degree_label 2017-03-17 13:12:49 +01:00
Andrew McOlash
8ad1d6fd97 Merge branch 'develop' into degree_label 2017-03-17 07:12:15 -05:00
Andrew McOlash
a18e7eb089 Fix conflict with CHANGELOG, merge with upstream/develop 2017-03-17 07:08:00 -05:00
BeatIdo
1f5ea40bf6 News Feed hideLoading option 2017-03-17 09:08:45 +01:00
BeatIdo
44509e027c Add hideLoading option description 2017-03-17 09:06:29 +01:00
Michael Teeuw
fe3758b1bb Merge pull request #768 from roramirez/test-auth-calendar
Test auth calendar
2017-03-17 08:59:04 +01:00
Michael Teeuw
ebe2a30463 Merge pull request #754 from deg0nz/develop
Add support for more authentication methods for the default calendar module
2017-03-17 08:58:37 +01:00
Michael Teeuw
1216a26d13 Merge pull request #766 from BeatIdo/patch-1
Complete OWM city list URL
2017-03-17 08:55:52 +01:00
Michael Teeuw
65800853f4 Merge pull request #765 from roramirez/test-ipWhitelist
Add test without access by ipWhistelist
2017-03-17 08:55:15 +01:00
fewieden
ccb81179ab fix config option 2017-03-16 16:57:55 +01:00
Rodrigo Ramírez Norambuena
f2ea701d34 Fix eslintignore for vendor/vendor.js and fix the eslint validation 2017-03-14 22:53:37 -03:00
Rodrigo Ramírez Norambuena
1d4aa27f1c Merge pull request #1 from fewieden/npm-vendors
fix recursive installation loop, added other vendor dependencies
2017-03-14 17:35:34 -03:00
fewieden
bb08fe8113 fix recursive installation loop, added other vendor dependencies 2017-03-14 11:49:20 +01:00
Andrew McOlash
e2099f0749 Fix indents 2017-03-13 06:27:54 -05:00
Andrew McOlash
3c60feed02 Add in degree label to solve issue #753 2017-03-13 06:24:04 -05:00
Andrew McOlash
5466e1b733 Remove unnecessary string from excluded array 2017-03-12 20:22:40 -05:00
Rodrigo Ramírez Norambuena
328f15c2ea Add font-awesome using npm on vendors:
This can updated libs and clean repository code.
2017-03-12 21:55:08 -03:00
Andrew McOlash
873125abe1 Add changes to CHANGELOG 2017-03-12 11:39:05 -05:00
Andrew McOlash
5df818a19c Add in support to hide and exclude events based on a filter 2017-03-12 11:36:40 -05:00
Andrew McOlash
a5dc3cd018 Update CHANGELOG to reflect updates to the codebase 2017-03-11 17:40:24 -06:00
Andrew McOlash
afe0e3c1d6 Add in option to have single line news 2017-03-11 17:36:47 -06:00
Beh
91e1f958f2 Removed Calendar.zip 2017-03-11 12:24:17 +01:00
Rodrigo Ramírez Norambuena
2a94ee55cc Add first test for newsfeed module.
This test case check if set newsfeed title
2017-03-10 21:02:33 -03:00
Rodrigo Ramírez Norambuena
ccf612f536 Add sample xml rss feed from Blog's RodrigoRamirez.com 2017-03-10 20:38:18 -03:00
Rodrigo Ramírez Norambuena
c6fa0cc072 Add test for check MM_PORT enviroment variable 2017-03-10 18:21:06 -03:00
Rodrigo Ramírez Norambuena
c282bb2fe1 Fix if MM_PORT enviroment variable is set 2017-03-10 18:20:11 -03:00
Rodrigo Ramírez Norambuena
72d18fd7e1 Add test module position using helloworld
Also is using a configuration with "exotic content"
2017-03-10 17:52:40 -03:00
Rodrigo Ramírez Norambuena
6802873cd1 Add test module calendar fail basic auth 2017-03-10 16:50:25 -03:00
Rodrigo Ramírez Norambuena
1bdc46969c Add information message when the ipWhitelist is configurate with [] 2017-03-10 16:36:17 -03:00
Rodrigo Ramírez Norambuena
989ee0e281 Add link for tutorial ipWhitelist HowTo of @mochman 2017-03-10 16:27:05 -03:00
BeatIdo
0f27d646bb removed trailing spaces 2017-03-10 17:03:14 +01:00
BeatIdo
81aca500b3 Hide News Feed loading option
Configuration option to hide News Feed module if feed is empty instead of showing LOADING status
2017-03-10 16:56:28 +01:00
BeatIdo
50f2dded64 Complete OWM city list URL 2017-03-10 16:42:43 +01:00
Michael Teeuw
d26d94b62a Merge pull request #760 from roramirez/readme-tab-fix
Fix tab documentacion calendar for colored option
2017-03-10 14:59:22 +01:00
Michael Teeuw
2811f76714 Merge pull request #758 from CatoAntonsen/nn_translation
Updated Norwegian translations (nn and nb)
2017-03-10 14:57:09 +01:00
Michael Teeuw
67b21ad766 Merge pull request #757 from slametps/develop
indonesian translation
2017-03-10 14:56:43 +01:00
Michael Teeuw
6d07d5dccb Merge pull request #751 from roramirez/callback-fail-load-config
Use just one callback statement in case of failure on configuration loader
2017-03-10 14:53:36 +01:00
Michael Teeuw
da0e3d5c8b Merge pull request #750 from CatoAntonsen/animation_fix
Fixed missing animations on this.show() when module is alone in a region
2017-03-10 14:53:16 +01:00
Rodrigo Ramírez Norambuena
b129fe908c Test check backward backward compatibility authentication method basic
on calendar module

Fix travis basic-auth server
2017-03-10 04:47:57 -03:00
Rodrigo Ramírez Norambuena
f5c57e84c7 Add test calendar without auth method. Should be set by default basic. 2017-03-10 04:36:09 -03:00
Rodrigo Ramírez Norambuena
ceb4ef2642 Add test basic-auth 2017-03-10 04:33:27 -03:00
Rodrigo Ramírez Norambuena
1c235aa761 Add test default calendar 2017-03-10 04:31:26 -03:00
Rodrigo Ramírez Norambuena
cfc8117c3c Remove tests case from without_modules with much hardcode
This test retain
 * Check title.
 * Check footer with Michael website.
2017-03-10 00:52:43 -03:00
Rodrigo Ramírez Norambuena
aa1f515fcf Remote extra space main.js 2017-03-10 00:27:47 -03:00
Rodrigo Ramírez Norambuena
4fdd12bc48 Test change port configuration
This test change to 8090 port on configuration and check if system
response there.
2017-03-09 21:17:39 -03:00
Rodrigo Ramírez Norambuena
34f04b1946 Add note to allow all IP addresses. ipWhitelist configuration directive. 2017-03-09 17:26:50 -03:00
Rodrigo Ramírez Norambuena
5770b9dc0e Test env 404 not found request http://localhost:8080/nothing
This test expect gets 404 HTTP code on get request to
http://localhost:8080/nothing
2017-03-09 17:10:32 -03:00
Rodrigo Ramírez Norambuena
afe2b934de test env requst http://localhost:8080
This test expect get 200 HTTP code on get request to
http://localhost:8080
2017-03-08 10:36:08 -03:00
Rodrigo Ramírez Norambuena
11fe6cfbb0 Add test ipWhistelist = []
This test ipWhistelist on [] to access all IPs
Creates a request to localhost and port added in configuration and
check if gets 200 HTTP code.
2017-03-08 10:30:27 -03:00
Slamet PS
db10226005 update spaces to tab 2017-03-08 10:37:27 +07:00
Rodrigo Ramírez Norambuena
a15b8077a3 Add test without access by ipWhistelist
This test set a invalid IP address for not have access to MagicMirror.
Creates a request to localhost and port added in configuration and check if
gets 403 HTTP code.
2017-03-07 19:50:19 -03:00
Cato Antonsen
a3836b5e17 Updated Norwegian translations (nn and nb) 2017-03-07 18:06:26 +01:00
Beh
f8d80422b2 Fixed Travis CI errors
Changed indentation from spaces to tabs
changed strings from single quote to double quote
2017-03-07 00:34:17 +01:00
Beh
9848f80630 Added support for more authentication methods for the default calendar module
HTTP Basic, Digest and OAuth2/Bearer authentications are now supported
by the calendar module
2017-03-07 00:12:43 +01:00
Michael Teeuw
6ea1732630 Merge pull request #749 from peet86/develop
Small fixes in the Hungarian translation
2017-03-06 15:07:29 +01:00
Rodrigo Ramírez Norambuena
d97571ce0c Fix tab documentacion calendar for colored option 2017-03-06 02:11:27 -03:00
Rodrigo Ramírez Norambuena
1e3b866c8b Use color red for error when the configuration file is not found. 2017-03-05 22:20:35 -03:00
Rodrigo Ramírez Norambuena
2168838365 Use just one callback statement in case of failure on loader of the
configuration file.
2017-03-05 22:05:54 -03:00
Cato Antonsen
219021873d Removed trailing space 2017-03-05 23:42:13 +01:00
Cato Antonsen
120b505361 Implemented another way of waiting for refresh of region before animation 2017-03-05 23:36:24 +01:00
Cato Antonsen
347a2977fa Removed trailing spaces 2017-03-05 22:46:48 +01:00
Cato Antonsen
c2e90864ac Fixed missing animations on this.show() when module is alone in a region 2017-03-05 22:23:05 +01:00
Peter Varga
1027efd6e5 small fixes in hu translation 2017-03-05 19:50:48 +01:00
Michael Teeuw
bd0de83d31 Merge pull request #745 from roramirez/mv-colors-utils
Move colors in utils file
2017-03-05 17:16:16 +01:00
Michael Teeuw
4d3523b677 Merge pull request #746 from roramirez/json-format-config-pm2
Use JSON format for configuration file on pm2 control process file
2017-03-05 17:15:56 +01:00
Michael Teeuw
03f15e0075 Merge pull request #747 from roramirez/comment-bash-installer
Fix format comments on installer script
2017-03-05 17:15:33 +01:00
Michael Teeuw
043779f4af Merge pull request #743 from fewi/build-docker-windows
Fix error when building and running docker on windows
2017-03-03 13:26:32 +01:00
Felix Wiedemann
25b5daf6a5 fix problems when building the docker image on windows 2017-03-03 13:06:32 +01:00
Rodrigo Ramírez Norambuena
db444f5d7e Fix format comments on installer script 2017-03-02 09:22:32 -03:00
Rodrigo Ramírez Norambuena
16499d2fb8 Use JSON format for configuration pm2 control process file on installer
file.

Also, add to validate format on Gruntfile
2017-03-01 22:12:09 -03:00
Rodrigo Ramírez Norambuena
ddff2b2982 Move colors into utils file 2017-02-28 01:41:21 -03:00
Michael Teeuw
e697ee72fa Merge pull request #734 from roramirez/refactor-routes
refactor code for include multiples routes on js/server.js
2017-02-25 22:12:43 +01:00
Michael Teeuw
f98c59172b Merge pull request #736 from roramirez/readme-electron-optins
fix format kiosk mode options setted in README
2017-02-25 11:39:10 +01:00
Michael Teeuw
3badafaa82 Merge pull request #737 from roramirez/deprecated-options
Deprecated options
2017-02-25 11:38:30 +01:00
Michael Teeuw
cbf65a9355 Merge pull request #739 from roramirez/more_info_comment_hotfix
Add more information and tag FIXME on Hotfix code
2017-02-25 11:37:18 +01:00
Rodrigo Ramírez Norambuena
365bc900b0 Add more information and tag FIXME on Hotfix code 2017-02-24 18:52:33 -03:00
Rodrigo Ramírez Norambuena
bd0da63f4c use colors for warning message in deprecated options 2017-02-21 20:28:12 -03:00
Rodrigo Ramírez Norambuena
db0b663a3d Put file deprecated into js directory
Request in Pull Request #569
Initial work by @olexs
2017-02-21 19:28:53 -03:00
Rodrigo Ramírez Norambuena
fd7fe129e2 Merge remote-tracking branch 'olexs/deprecated-config-notify' into deprecated-options 2017-02-21 19:13:33 -03:00
Rodrigo Ramírez Norambuena
27253c360b fix format kiosk mode options setted in README 2017-02-21 19:03:39 -03:00
Rodrigo Ramírez Norambuena
ab226d16c8 refactor code for include multiples routes on js/server.js 2017-02-21 10:33:54 -03:00
Michael Teeuw
d6394402b8 Merge pull request #733 from roramirez/second-test-anytime
Second test case anytime feature module compliments
2017-02-21 10:56:32 +01:00
Michael Teeuw
6be5fac953 Merge pull request #725 from roramirez/compliments-anytime
Test anytime compliments module.
2017-02-20 19:54:33 +01:00
Michael Teeuw
c4435279de Merge pull request #728 from roramirez/global-setup-test
Refactoring some e2e tests.
2017-02-20 18:19:53 +01:00
Michael Teeuw
a9bdc8ad85 Merge pull request #727 from roramirez/vNode7
Add version Node 7 in travis
2017-02-20 18:19:22 +01:00
Michael Teeuw
df2a5fc789 Merge pull request #726 from roramirez/issue-709
Issue 709
2017-02-20 18:19:05 +01:00
Rodrigo Ramírez Norambuena
db87f9e15b init sample test case newsfeed_spec 2017-02-20 08:19:36 -03:00
Rodrigo Ramírez Norambuena
5af2768d33 refactor afterEach and beforeEach compliments_spec 2017-02-20 05:25:16 -03:00
Rodrigo Ramírez Norambuena
474695643f Second test case anytime feature module compliments
Suggested by @fewieden PL #725
2017-02-20 04:59:15 -03:00
Rodrigo Ramírez Norambuena
97ab88b39a Modified test compliments anytime this follow configuration:
{
	morning: [],
	afternoon: [],
	evening: [],
	anytime: ["Anytime here"]
    }
2017-02-20 01:52:07 -03:00
Rodrigo Ramírez Norambuena
3773d40201 Refactoring some e2e tests. Now is use a global-setup instead of
repeat repeat code to setup tests enviroment.
2017-02-19 21:06:38 -03:00
Rodrigo Ramírez Norambuena
b3fd01fe04 Add version Node 7 in travis 2017-02-19 20:06:20 -03:00
Rodrigo Ramírez Norambuena
75c4ca77c2 Update socket.io to 1.7.3 2017-02-19 19:57:21 -03:00
slametps
692ddc60c7 remove period
remove period
2017-02-19 22:23:16 +07:00
Rodrigo Ramírez Norambuena
1a296a8ca1 Test anytime compliments module.
feature introduced 79c79146a5
2017-02-18 23:38:39 -03:00
slametps
f5595dd4c3 added Indonesian translation
added Indonesian translation
2017-02-17 13:45:29 +07:00
Michael Teeuw
11c0221f81 Merge pull request #720 from roramirez/prevent_error_load
Prevent crash system if cannot load a js script or style sheet.
2017-02-15 11:55:46 +01:00
Michael Teeuw
2d0aad3da9 Merge pull request #721 from roramirez/extra-spaces-return
remove extra spaces alert README
2017-02-15 11:55:15 +01:00
Michael Teeuw
ff19cb68b4 Merge pull request #716 from roramirez/increment-timeouts-test-e2e
Increment timeout e2e test to 20000 ms
2017-02-13 20:37:20 +01:00
Rodrigo Ramírez Norambuena
e62df3b3b1 Increment timeout e2e test to 20000 ms 2017-02-12 15:42:00 -03:00
Rodrigo Ramírez Norambuena
1d024cc339 remove extra spaces alert README 2017-02-12 13:29:36 -03:00
Rodrigo Ramírez Norambuena
8bda91aafb Prevent crash system if cannot load a js script or style sheet. 2017-02-12 13:06:11 -03:00
Rodrigo Ramírez Norambuena
fd9963e7eb Testing default modules 2017-02-11 21:03:07 -03:00
Michael Teeuw
dc81ca4f53 Merge pull request #715 from roramirez/spelling
fixed minor word mistake
2017-02-11 23:48:59 +01:00
Rodrigo Ramírez Norambuena
fb754f9bc7 fixed minor word mistake 2017-02-11 19:34:43 -03:00
Michael Teeuw
7045f6571f Merge pull request #711 from qistoph/develop
Check for dev console instead of counting windows
2017-02-11 22:39:25 +01:00
Michael Teeuw
50d9bccacf Merge pull request #714 from qistoph/fix712
Fix issue #712
2017-02-11 22:37:19 +01:00
Chris van Marle
9064769185 Check for dev console 2017-02-11 13:43:03 +01:00
Chris van Marle
5fc16bdbfb Fix sabado in clock_es_spec.js test
Fixes #712
2017-02-11 13:41:00 +01:00
Michael Teeuw
172e4e939d Merge pull request #705 from roramirez/text-fresh-update-branch
add note for pull request about update develop branch
2017-02-10 09:21:20 +01:00
Rodrigo Ramírez Norambuena
f914b728ff add note for pull request about update develop branch 2017-02-09 14:10:07 -03:00
Michael Teeuw
54857e843b Merge pull request #704 from APPLEH0LIC/develop
Added Korean Translation
2017-02-09 13:32:19 +01:00
Michael Teeuw
64b34e98c7 Remove comments. 2017-02-09 13:28:20 +01:00
APPLEH0LIC
1ccf74bca1 Update CHANGELOG.md
added Korean Translation.
2017-02-09 17:56:56 +09:00
APPLEH0LIC
49a534a61b Add kr.json file
Added Korean Translation kr.json file.
2017-02-09 17:56:06 +09:00
APPLEH0LIC
b8889c6a1f Update translations.js
Added Korean Translation
2017-02-09 17:54:47 +09:00
Michael Teeuw
ccbc5c9d17 Merge pull request #696 from kpaaro/develop
Compliments module can use remoteFile without default daytime arrays defined
2017-02-08 19:35:09 +01:00
Michael Teeuw
555e01ec87 Merge branch 'develop' into develop 2017-02-08 19:32:53 +01:00
Michael Teeuw
7869f472c3 Merge pull request #697 from roramirez/global_version
unit test global.version
2017-02-08 19:32:11 +01:00
LAPTOP-KAUR\race2
90f60f95f7 formating fix so that grunt passes 2017-02-08 19:29:52 +02:00
Michael Teeuw
0f0a71a109 Merge pull request #689 from roramirez/test-compliments
add test parts of day for compliments module
2017-02-08 09:14:23 +01:00
Michael Teeuw
a43c8a2def Merge pull request #695 from fewieden/develop
applied dry pattern
2017-02-08 09:11:02 +01:00
LAPTOP-KAUR\race2
cbafaf5d56 compliments,js handles remoteFile without default daytimes defined 2017-02-08 02:35:09 +02:00
LAPTOP-KAUR\race2
62e4e13f5a case correction; added changelog.md entry 2017-02-08 02:33:03 +02:00
fewieden
e69908abef fix indentation 2017-02-08 00:10:44 +01:00
fewieden
6cb3cf8747 fix indentation 2017-02-08 00:05:28 +01:00
fewieden
2f71a43420 dry pattern 2017-02-07 23:51:13 +01:00
Rodrigo Ramírez Norambuena
f57ad57e62 unit test global.version 2017-02-07 19:35:51 -03:00
Rodrigo Ramírez Norambuena
03f5d9b102 Split test for parts of day in compliments module 2017-02-07 16:49:07 -03:00
Michael Teeuw
6b17e1820c Merge pull request #693 from qistoph/testdevarg
Test "dev" argument
2017-02-07 16:27:14 +01:00
Michael Teeuw
e0f6fca987 Merge pull request #688 from Nosrac/develop
New Compliments category: `anytime`
2017-02-07 12:04:40 +01:00
Michael Teeuw
1fe95a5fe4 Merge pull request #687 from fewieden/develop
bugfix newsfeed
2017-02-07 12:04:00 +01:00
Michael Teeuw
1257ecf100 Merge pull request #686 from kpaaro/develop
Added estonian translations
2017-02-07 12:03:20 +01:00
Michael Teeuw
4163304b24 Merge pull request #685 from roramirez/dev-npm-run
fix when is set dev parameter option in "npm start dev".
2017-02-07 12:03:05 +01:00
Michael Teeuw
d35f2c4a4f Merge pull request #681 from qistoph/testing
Testing
2017-02-07 12:02:40 +01:00
Michael Teeuw
e5d5c5f9a7 Merge pull request #679 from EdgardosReis/patch-1
Update pt.json
2017-02-07 12:01:39 +01:00
Rodrigo Ramírez Norambuena
6fcaec3ca8 add test parts of day for compliments module 2017-02-06 00:28:08 -03:00
Kyle Carson
a2892ad097 Update Readme and changelog 2017-02-05 19:29:35 -06:00
Kyle Carson
79c79146a5 Support anytime compliment group. 2017-02-05 19:28:42 -06:00
Kyle Carson
cd37ba308c Merge remote-tracking branch 'MichMich/develop' into develop 2017-02-05 19:19:58 -06:00
fewieden
b35c0f7e39 update changelog 2017-02-06 02:08:59 +01:00
fewieden
14b1b649cb bugfix 2017-02-06 01:19:03 +01:00
Chris van Marle
14c0307c09 Fix grunt error 2017-02-05 12:26:42 +01:00
Chris van Marle
42f22119f2 Add test for 'dev' argument 2017-02-05 11:38:01 +01:00
LAPTOP-KAUR\race2
75f4771616 Added estonian translations 2017-02-05 05:12:31 +02:00
Rodrigo Ramírez Norambuena
83f7cb2033 fix when is set dev parameter option in "npm start dev".
issue #684
2017-02-03 19:26:49 -03:00
EdgardosReis
43a4c6198c Update pt.json 2017-02-03 15:41:11 +00:00
EdgardosReis
8c2fafecd7 Update pt.json
removed comments
2017-02-03 15:40:33 +00:00
Chris van Marle
d004c0ccd1 Split translation key testing
All keys in a translation file should be in the base file (en.json).
When there are keys in the base file that are not in a translation,
the translation file test is skipped.
2017-02-03 10:10:03 +01:00
Chris van Marle
406ae4e8c3 Skip translation test on fail 2017-02-02 14:28:59 +01:00
Chris van Marle
cd8bee1371 Run App in vm 2017-02-02 10:32:35 +01:00
Chris van Marle
123392c549 Translations test 2017-02-02 10:32:06 +01:00
EdgardosReis
42ffe213fd Update pt.json 2017-02-02 00:04:48 +00:00
Michael Teeuw
fd738e5c8b Merge pull request #677 from roramirez/test-displayseconds-false-clock
add test with displaySeconds config disabled for clock module
2017-02-01 17:00:53 +01:00
Rodrigo Ramírez Norambuena
6f95b2c2ad add test with displaySeconds config disabled for clock module 2017-02-01 14:33:17 -03:00
Michael Teeuw
f66c2b078c Merge pull request #678 from roramirez/test-e2e-es-clock
Test e2e es clock
2017-02-01 17:00:33 +01:00
Rodrigo Ramírez Norambuena
c6f5c120ba add tests clock module variant language es 2017-02-01 14:12:27 -03:00
Michael Teeuw
677e93430d Merge pull request #675 from roramirez/run-travis-all-tests
Run tests e2e in Travis
2017-02-01 07:45:50 +01:00
Michael Teeuw
a9a90c5545 Merge pull request #676 from roramirez/hotfix/MM_PORT
hotfix PL #673
2017-02-01 07:45:28 +01:00
Rodrigo Ramírez Norambuena
ee0418e719 hotfix PL #673 2017-01-31 22:08:38 -03:00
Rodrigo Ramírez Norambuena
6fc1141477 Run tests e2e in Travis 2017-01-31 18:38:25 -03:00
Michael Teeuw
b02920c43c Merge pull request #674 from morozgrafix/test_branch
Restructured Test Suite
2017-01-31 21:52:53 +01:00
Michael Teeuw
049d249609 Merge pull request #673 from bastilimbach/feature/docker
Added Docker support for server only mode
2017-01-31 21:51:58 +01:00
Sergey Morozov
fc2a554415 fix for 12hr regex
thanks to @roramirez for testing and catching it.
2017-01-31 12:24:11 -08:00
Sebastian Limbach
42b806b500 Fixed whitespace 2017-01-31 21:19:37 +01:00
Rodrigo Ramírez Norambuena
aeb3ccaf09 Remove extra spaces and lines in tests. 2017-01-31 17:02:18 -03:00
Sergey Morozov
86fdd91597 Restructured Test Suite
- separated tests into e2e and unit directories
- created configs directory structure to support test framework
- added/modified `npm run test`, `npm run test:unit` and `npm run test:e2e` to target all, unit and e2e tests respectively
- modified some of the test names to be more descriptive

New structure of the Test Suite has following directory tree:

```
tests
├── configs
│   ├── env.js
│   └── modules
│       ├── clock
│       │   ├── clock_12hr.js
│       │   ├── clock_24hr.js
│       │   └── clock_showPeriodUpper.js
│       └── helloworld
│           └── helloworld.js
├── e2e
│   ├── env_spec.js
│   └── modules
│       ├── clock_spec.js
│       └── helloworld_spec.js
└── unit
    ├── functions
    │   └── cmp_versions_spec.js
    └── global_vars
        └── root_path_spec.js
```
2017-01-31 11:08:53 -08:00
Sebastian Limbach
e68fea185d Merge branch 'develop' into feature/docker 2017-01-31 19:48:38 +01:00
Sebastian Limbach
a3eaf9f473 Fixed typos and some description changes 2017-01-31 19:41:42 +01:00
Sebastian Limbach
e6a2b9f06e Added the Docker support changes to changelog 2017-01-31 19:40:49 +01:00
Sebastian Limbach
a78973702b Added Docker install documentation 2017-01-31 16:36:01 +01:00
Sebastian Limbach
354b745c39 Added Docker support 2017-01-31 11:41:40 +01:00
Michael Teeuw
ce6cd6acdc Merge pull request #670 from roramirez/translation-check
Translation check
2017-01-31 08:44:10 +01:00
Michael Teeuw
8e129143f1 Merge pull request #671 from Nosrac/develop
Support calendar-specific maximumEntries and maximumNumberOfDays
2017-01-31 08:42:50 +01:00
Michael Teeuw
6d50cbba6f Merge pull request #672 from morozgrafix/test_branch
Add missing 'chai-as-promised' dependency
2017-01-31 08:41:54 +01:00
Sergey Morozov
7731878f36 Add missing 'chai-as-promised' dependency
When I attempted to run e2e tests I got following error:

```
$npm run test:e2e

> magicmirror@2.1.1 test:e2e /Users/sergeym/localDev/MagicMirror
> ./node_modules/mocha/bin/mocha tests/e2e --recursive

module.js:471
    throw err;
    ^

Error: Cannot find module 'chai-as-promised'
...
```

Adding `chai-as-promised` to `package.json` and running npm install fixes it.
2017-01-30 15:33:23 -08:00
Kyle Carson
9f659eef1b Fix formatting 2017-01-30 16:35:21 -06:00
Kyle Carson
14cc642e54 Support calendar-specific maximumEntries and maximumNumberOfDays 2017-01-30 16:26:42 -06:00
Michael Teeuw
c47852cd0a Merge pull request #661 from artifactdev/master
Color options for calendar and weather forecast
2017-01-30 20:56:34 +01:00
Michael Teeuw
c3bfaa31ee Merge branch 'develop' into master 2017-01-30 20:55:53 +01:00
Michael Teeuw
832505a315 Merge pull request #669 from roramirez/test-e2e
Test e2e
2017-01-30 20:55:25 +01:00
Rodrigo Ramírez Norambuena
cb71667336 Use jsonlint task to check translation files 2017-01-30 13:36:22 -03:00
Rodrigo Ramírez Norambuena
1032e97d58 Fix string russian translation module alert 2017-01-30 13:32:52 -03:00
Rodrigo Ramírez Norambuena
b4271da13e add translations/translations.js eslint check 2017-01-30 13:17:36 -03:00
Rodrigo Ramírez Norambuena
e2dc5ef4f2 fix eslint change single quote by double quote 2017-01-30 12:46:21 -03:00
Rodrigo Ramírez Norambuena
c75ee042a8 add e2e test enviroment 2017-01-30 12:36:11 -03:00
Rodrigo Ramírez Norambuena
d474d518ca test e2e module helloworld 2017-01-30 12:24:49 -03:00
Rodrigo Ramírez Norambuena
52b8dbcbb1 separate test type. Create directory for End-to-end testing. 2017-01-30 12:17:45 -03:00
Rodrigo Ramírez Norambuena
0d8d8f0426 Add tests configs directory as express route. 2017-01-30 12:17:23 -03:00
artifactdev
ed12deae25 Update CHANGELOG.md
Added color options for calendar and weather forecast to changelog
2017-01-30 13:17:44 +01:00
Michael Teeuw
7f1e7c981d Merge pull request #666 from roramirez/index-mm-config-file-env-var
Use configuration file in index.html when is set MM_CONFIG_FILE
2017-01-30 12:53:44 +01:00
Michael Teeuw
cc26688d82 Merge pull request #668 from Jopyth/patch-4
missing comma in sv.json translation
2017-01-30 12:52:31 +01:00
Jopyth
a0fa3a6063 missing comma in sv.json translation 2017-01-30 09:28:37 +01:00
Rodrigo Ramírez Norambuena
110a1a640d fix .stylelintrc in jsonlint check 2017-01-29 17:15:01 -03:00
Rodrigo Ramírez Norambuena
bbdc43c750 Use configuration file in index.html when is set MM_CONFIG_FILE 2017-01-29 17:00:56 -03:00
Michael Teeuw
c73b9b4882 Merge pull request #663 from Snille/develop
Added and translated some missing strings in the sv.json file.
2017-01-29 11:39:47 +01:00
Jeremias Arnstadt
e249092f91 used mardown in calendar README 2017-01-29 11:17:00 +01:00
Jeremias Arnstadt
5c0b04bfc8 fixed linting issues 2017-01-29 00:59:38 +01:00
Jeremias Arnstadt
bc257f4951 Merge branch 'develop' of https://github.com/artifactdev/MagicMirror
# Conflicts:
#	modules/default/calendar/README.md
#	modules/default/weatherforecast/README.md
2017-01-29 00:53:07 +01:00
Erik Pettersson
e738ee0812 Added information about the sv.json update. 2017-01-29 00:09:51 +01:00
snille
ebb2db17f3 Fixed the Swedish translation. 2017-01-29 00:06:06 +01:00
Jeremias Arnstadt
4214293b76 updated README of weatherforecast and calendar module for color options 2017-01-28 18:32:06 +01:00
Jeremias Arnstadt
ce3ee909bf added possibility to give each calendar another color 2017-01-28 18:21:02 +01:00
Jeremias Arnstadt
09ba1e2470 added possibility to color max and min temprature 2017-01-28 18:01:37 +01:00
Michael Teeuw
68444b81cc Merge pull request #659 from Jopyth/patch-hidden-status
fix module hidden status
2017-01-28 13:44:49 +01:00
Joseph Bethge
d3c0b9a438 fix module hidden status 2017-01-28 12:31:33 +01:00
Michael Teeuw
6e2f1f72c6 Merge pull request #657 from roramirez/splashscreen-halt-reboot
Show splash screen image on reboot and halt.
2017-01-28 06:21:25 +01:00
Michael Teeuw
c82eec09b7 Merge pull request #658 from roramirez/fix-validate-file-config-by-variable
Fix bug validation when is not set MM_CONFIG_FILE enviroment variable
2017-01-28 06:20:23 +01:00
Olexandr Savchuk
d4093d8c98 Merge branch 'deprecated-config-notify' of github.com:olexs/MagicMirror into deprecated-config-notify 2017-01-27 18:03:34 +01:00
Olexandr Savchuk
90616c82b6 Added console warning for deprecated config options 2017-01-27 18:02:50 +01:00
Rodrigo Ramírez Norambuena
de69fe1745 Show splash screen image on reboot and halt. 2017-01-27 13:42:20 -03:00
Michael Teeuw
9bd42ac221 Merge pull request #656 from roramirez/env-config-file-pl
Code change discussion  Pull Request  #653
2017-01-27 17:27:03 +01:00
Rodrigo Ramírez Norambuena
2f9a272696 Improvement of code block about from discussion Pull Request #653
https://github.com/MichMich/MagicMirror/pull/653
2017-01-27 13:13:04 -03:00
Michael Teeuw
552ea0356e Merge pull request #652 from roramirez/electron-issues
Electron issues
2017-01-27 09:02:20 +01:00
Michael Teeuw
ff6bd91ef7 Merge branch 'develop' into electron-issues 2017-01-27 09:01:57 +01:00
Michael Teeuw
835f20f872 Merge pull request #653 from roramirez/env-config-file
Set configuration file by enviroment variable
2017-01-27 09:00:23 +01:00
Rodrigo Ramírez Norambuena
1e9b35d18f Fix bug validation when is not set MM_CONFIG_FILE enviroment variable 2017-01-26 21:13:58 -03:00
Rodrigo Ramírez Norambuena
3818e48218 remove console.log 2017-01-25 19:05:40 -03:00
Michael Teeuw
5d63065057 Merge pull request #650 from qistoph/testing
Fix grunt errors in root_path.js and syntax in da.json
2017-01-25 12:25:04 +01:00
Chris van Marle
ae41ed1d51 Fix syntax in DA translation 2017-01-25 12:00:38 +01:00
Chris van Marle
36ead2251a Fix grunt errors 2017-01-25 11:58:20 +01:00
Michael Teeuw
dc7093f68a Merge pull request #648 from qistoph/testing
Add root_path testing
2017-01-25 10:03:53 +01:00
Michael Teeuw
6c79d2b008 Merge pull request #649 from roramirez/example-quote-config
Change of examples configuration in README modules.
2017-01-25 10:02:43 +01:00
Rodrigo Ramírez Norambuena
422349c2d1 Change of examples configuration in README modules.
This change is related commit f59f035a7e
Now is used  grunt for check ESLint syntax validation of config/* files
2017-01-24 17:22:17 -03:00
Chris van Marle
7dbfa0b203 Add root_path testing 2017-01-24 17:58:04 +01:00
Michael Teeuw
57ea2ac039 Merge pull request #645 from roramirez/grunt-config
Add config/* to the Grunt target.
2017-01-24 14:43:32 +01:00
Michael Teeuw
a9e664e89d Merge pull request #646 from zoliaz1993/develop
Update Hungarian language.
2017-01-24 14:42:59 +01:00
Michael Teeuw
c0e2210da3 Merge pull request #647 from qistoph/testing
Run npm test on Travis
2017-01-24 14:40:14 +01:00
Chris van Marle
b13c6f283a Run npm test on Travis 2017-01-24 12:03:19 +01:00
Zoltán Rónai
8181b9a31c Rename hu to hu.json
extension (**.json)
2017-01-24 09:09:13 +01:00
Zoltán Rónai
105e4f990d Update translations.js
Text aligned.
2017-01-24 08:59:37 +01:00
zoliaz1993
9670d74345 Update Hungarian language.
Add Alert module Hun translation.
Text aligned formality.
2017-01-24 08:54:39 +01:00
Rodrigo Ramírez Norambuena
86e553e756 Set configuration file by enviroment variable:
Enable ability to set configuration file by the enviroment variable
called MM_CONFIG_FILE.
2017-01-24 02:59:20 -03:00
Rodrigo Ramírez Norambuena
566ea9a110 Use script for start MagicMirror 2017-01-24 02:12:36 -03:00
Rodrigo Ramírez Norambuena
f59f035a7e Add config/* to the Grunt target.
Also, this change can be check config errors by syntax.
2017-01-23 18:03:26 -03:00
Michael Teeuw
4c6d4f3caf Merge pull request #642 from kthorri/master
Icelandic Translation
2017-01-23 19:41:50 +01:00
Michael Teeuw
8af87bac22 Merge pull request #644 from morozgrafix/tests_cleanup
Minor clean up for test suite
2017-01-23 19:41:27 +01:00
Sergey Morozov
690567659c Minor clean up for test suite
@roramirez thanks for starting adding tests. I figured that we might as well grunt them and follow same rules for linting as we do for rest of JS code in the repo.

I've made following minor modifications:
- added tests to the grunt target
- fixed indentation in package.json
- made tests a bit more descriptive
- fixed eslint errors surfaced by grunt
2017-01-23 09:59:19 -08:00
Michael Teeuw
d9c7ee8976 Fixed Changelog to match the correct version. 2017-01-23 16:18:42 +01:00
Michael Teeuw
95cf554de4 Merge branch 'develop' into master 2017-01-23 16:17:28 +01:00
kthorri
47a87a14f5 Fixing typo 2017-01-23 14:55:24 +00:00
kthorri
5e860b6850 Added icelandic translation to changelog 2017-01-23 14:53:57 +00:00
kthorri
9a983e7565 Adding icelandic translation json file 2017-01-23 14:53:18 +00:00
kthorri
00197d131d Adding Icelandic translation to translation.js 2017-01-23 14:51:59 +00:00
Michael Teeuw
9758f3c9d2 Add the Hungarian translation. 2017-01-23 11:38:48 +01:00
Michael Teeuw
e7d7425b6e Merge pull request #641 from zoliaz1993/master
Add the Hungarian translation.
2017-01-23 11:38:12 +01:00
Michael Teeuw
b566c81ae7 Merge branch 'develop' into master 2017-01-23 11:36:15 +01:00
Michael Teeuw
742837e7a1 Merge pull request #640 from roramirez/fix-mm-script-path
Fix path for script MagicMirror on pm2
2017-01-23 10:29:54 +01:00
zoliaz1993
5087dbd756 Update hu.json
Remove + line.
2017-01-23 09:44:09 +01:00
Rodrigo Ramez Norambuena
b893ae7c14 Fix path for script MagicMirror on pm2 2017-01-22 23:47:17 -03:00
Michael Teeuw
1f7863057f Merge pull request #636 from Jopyth/fix_calendar
Fix Calendar Issues
2017-01-22 16:10:31 +01:00
Michael Teeuw
3dd3afd21f Update CHANGELOG.md 2017-01-22 12:23:11 +01:00
Michael Teeuw
387d3b7335 Merge pull request #638 from villevirtanen/patch-2
Updates to fi.json
2017-01-22 12:22:02 +01:00
villevirtanen
782bfd058b Update fi.json
DAYAFTERTOMORROW, UPDATE_NOTIFICATION and UPDATE_NOTIFICATION_MODULE added.
2017-01-22 10:46:28 +02:00
Michael Teeuw
c0d936fa4d Merge pull request #635 from roramirez/tests
minor fix textual
2017-01-21 19:28:43 +01:00
Joseph Bethge
63819c5757 fix calendar issues 2017-01-21 16:05:29 +01:00
Rodrigo Ramírez Norambuena
08cbac6277 minor fix textual 2017-01-21 11:04:11 -03:00
Michael Teeuw
68c0a9aec4 Merge pull request #634 from roramirez/note-readme-cp-config-sample
Add note in step of copy for sample file configuration in README.
2017-01-21 11:58:59 +01:00
Michael Teeuw
1c585815a1 Merge pull request #633 from roramirez/tests
Hotfix  introduced client error on commit  3a8d72d
2017-01-21 11:57:31 +01:00
Rodrigo Ramírez Norambuena
853ec7320f Add note in step of copy for sample file configuration in README.
This note is related if was used installer script.
2017-01-20 19:07:37 -03:00
Rodrigo Ramírez Norambuena
b8917a3c0e Hotfix introduced client error on commit 3a8d72d
Noticed by @qistoph
https://github.com/MichMich/MagicMirror/pull/623#issuecomment-273505208
2017-01-20 18:44:28 -03:00
zoliaz1993
c4d70e7f9b Hungarian Translation 2017-01-20 13:49:10 +01:00
zoliaz1993
7f1b11d19b Hungarian translation 2017-01-20 13:45:14 +01:00
zoliaz1993
02a32dea40 Revert "Hungarian Translation"
This reverts commit d9e20ea17a.
2017-01-20 13:43:58 +01:00
zoliaz1993
d9e20ea17a Hungarian Translation 2017-01-20 13:43:44 +01:00
Michael Teeuw
039c2fe0a6 Merge pull request #630 from fry0815/fix_temperature_check
Fix temperature check
2017-01-19 20:04:56 +01:00
Michael Teeuw
a967e73f9e Merge branch 'develop' into fix_temperature_check 2017-01-19 20:03:13 +01:00
Tino Ziegler
222e4154a1 changed to double quotes 2017-01-19 09:11:33 +01:00
Tino Ziegler
56413ee94e added fix 2017-01-18 16:04:02 +01:00
Tino Ziegler
93c07b2b1e Fix: check if temperature is defined (0°) 2017-01-18 15:56:12 +01:00
Michael Teeuw
27ed64a1af Merge pull request #628 from aaronaxvig/master
Provide example of syntax for electronOptions
2017-01-18 09:13:37 +01:00
Michael Teeuw
ad68106c3c Merge pull request #629 from roramirez/branch-README
update branch Manual Installation in README.md
2017-01-18 09:13:13 +01:00
Rodrigo Ramírez Norambuena
a591cf1d21 update branch Manual Installation in README.md 2017-01-18 01:36:14 -03:00
Michael Teeuw
03a4b8f5cf Merge pull request #627 from tosti007/README_tables
Replace HTML tables with Markdown tables
2017-01-17 17:23:27 +01:00
Michael Teeuw
2d8d25808d Merge pull request #623 from roramirez/tests
Init Tests
2017-01-17 17:22:50 +01:00
Michael Teeuw
a82fcce734 Merge branch 'develop' into tests 2017-01-17 17:22:37 +01:00
Brian
0734e136d0 Update CHANGELOG 2017-01-17 16:15:39 +01:00
Brian
2913120ff7 Update README files 2017-01-17 16:14:50 +01:00
Michael Teeuw
bd277b087a Merge pull request #624 from tosti007/Calendar_Regex
Add Regexp possibility to titleReplace
2017-01-17 11:07:42 +01:00
Brian
fc00966b8b Update CHANGELOG 2017-01-17 11:05:18 +01:00
Michael Teeuw
495a76353f Merge pull request #622 from tosti007/develop
Fix typo and remove unused variable
2017-01-17 08:41:15 +01:00
Michael Teeuw
6ea225ed2a Rescale Splash Screen 2017-01-16 11:53:02 +01:00
Brian
c1a5f59c42 Remove Trailing space 2017-01-16 02:52:50 +01:00
Brian
49fb9108e9 Add Regexp possibility to titleReplace
Check if the given needle is a regexp, if so create one and use it
instead
2017-01-16 02:49:08 +01:00
Rodrigo Ramírez Norambuena
4cb3b514ab update CHANGELOG test 2017-01-15 22:41:16 -03:00
Brian
c95a37130a Remove unused uelf variable 2017-01-16 02:36:10 +01:00
Brian
29e82cc509 Fix Typo
Change E into R
2017-01-16 02:27:12 +01:00
Michael Teeuw
a4cb53fdb4 Show correct units for showRainAmount 2017-01-15 21:16:01 +01:00
Michael Teeuw
865dce6f68 Add info about issue #611. 2017-01-15 20:36:11 +01:00
Michael Teeuw
1d02154d99 Fix eslint issues. 2017-01-15 19:41:42 +01:00
Rodrigo Ramírez Norambuena
3a8d72db31 init tests:
This patch propouse use the mocha for testing MagicMirror.
2017-01-15 15:40:23 -03:00
Michael Teeuw
ec57a240d5 Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop 2017-01-15 19:38:53 +01:00
Michael Teeuw
949f7587dc Solve issue: #611 2017-01-15 19:38:46 +01:00
Michael Teeuw
55cce646e0 Merge pull request #621 from roramirez/fix-changelog-blackslash
fix blackslash introduce in Pull Request #619
2017-01-15 19:30:50 +01:00
Rodrigo Ramírez Norambuena
4c3dce694a fix blackslash introduce in Pull Request #619
URL Pull Request: https://github.com/MichMich/MagicMirror/pull/619
2017-01-15 14:10:48 -03:00
Michael Teeuw
46d5b70391 Merge pull request #619 from nhubbard/develop
Add postinstall script
2017-01-15 00:19:58 +01:00
Michael Teeuw
08a102d182 Merge pull request #620 from roramirez/Changelog-reference
Changelog: fix number reference issue.
2017-01-15 00:18:21 +01:00
Rodrigo Ramírez Norambuena
1cf8e08d4b Changelog: fix number reference issue. 2017-01-14 19:37:38 -03:00
Nicholas Hubbard
65a8b83150 Add Cache 2017-01-14 15:46:38 -05:00
Nicholas Hubbard
f4c8db654c Fix postinstall error. 2017-01-14 15:42:29 -05:00
Nicholas Hubbard
5c4d1c0259 Add CHANGELOG.md 2017-01-14 15:37:32 -05:00
Nicholas Hubbard
a459f8b84c Merge branch 'develop' of https://github.com/nhubbard/MagicMirror into develop
This merge is necessary to make Git happy.
2017-01-14 15:34:23 -05:00
Nicholas Hubbard
0d672420f7 Add postinstall script for installation 2017-01-14 15:32:59 -05:00
Michael Teeuw
2f7be0559a Switch to rrule-alt. Issue: #565 2017-01-14 19:31:24 +01:00
Michael Teeuw
0623ae1f87 Merge pull request #596 from IgniparousTempest/master
Afrikaans Translation
2017-01-12 19:48:04 +01:00
Michael Teeuw
8ae946c2c5 Merge branch 'develop' into master 2017-01-12 19:46:34 +01:00
Michael Teeuw
bb75f6ffce Merge pull request #601 from morozgrafix/russian_translations2
Russian translations2
2017-01-12 19:45:10 +01:00
Michael Teeuw
fcfe83f0cc Merge pull request #599 from qistoph/hover
Pass pointer-events on fullscreen overlay to underlaying modules
2017-01-12 19:44:46 +01:00
Michael Teeuw
5cbcded929 Merge branch 'develop' into russian_translations2 2017-01-12 19:42:50 +01:00
Michael Teeuw
2a95f792ec Merge pull request #609 from roramirez/README-update
Fix capitalize missing word Community
2017-01-12 19:41:45 +01:00
Michael Teeuw
daa2808448 Merge pull request #612 from thobach/master
Enabled newsfeed default module for gesture events from https://github.com/thobach/MMM-Gestures
2017-01-12 19:41:06 +01:00
Michael Teeuw
fc06ffdcee Merge branch 'develop' into master 2017-01-12 19:40:53 +01:00
Michael Teeuw
1601179081 Merge pull request #613 from roramirez/pm2_start
Pm2 start
2017-01-12 19:39:03 +01:00
Michael Teeuw
7fe374b67e Merge pull request #614 from greg-dev/fix-update-info-pl
Fix missing comma and complete Polish translation
2017-01-12 19:37:37 +01:00
Michael Teeuw
7a353bbe48 Merge pull request #617 from alexbarcelo/extra_update
Add `apt-get update` in raspberry.sh script
2017-01-12 19:36:08 +01:00
Alex Barcelo
c103ff271b Merge branch 'master' into extra_update 2017-01-12 17:37:31 +01:00
Alex Barcelo
ab9e0f891a updating CHANGELOG 2017-01-12 17:35:04 +01:00
Alex Barcelo
af85ef8cfb removing unnecessary exit, leaving a warning 2017-01-12 17:34:56 +01:00
Alex Barcelo
3cea6e5d0c Add apt-get update in raspberry.sh script
Just tried this script and realized that it is likely that it will fail because the apt index is not up to date.

The trivial fix seems to be to add an `apt-get update` before the package installation. It should be harmless also.
2017-01-12 17:34:54 +01:00
Greg Dev
6d1b0ae498 Add Polish translation for UPDATE_INFO 2017-01-12 01:33:13 +01:00
Courtney Pitcher
07d5b07748 Update Changelog.md 2017-01-11 21:48:33 +02:00
Courtney Pitcher
d47b9cd5c0 Merge branch 'develop' into master 2017-01-11 21:47:19 +02:00
IgniparousTempest
d542c063d7 Updated CHANGELOG.md to include Afrikkans translation 2017-01-11 21:42:31 +02:00
Rodrigo Ramírez Norambuena
4bb3d33907 add choice to use pm2 for auto starting of MagicMirror 2017-01-11 10:22:46 -03:00
Thomas Bachmann
62bec25b6e Merge remote-tracking branch 'MichMich/develop' 2017-01-11 11:34:04 +01:00
Thomas Bachmann
3ba16f1773 Merge remote-tracking branch 'MichMich/develop' 2017-01-11 11:32:20 +01:00
Thomas Bachmann
c302030301 Added documentation on supported notifications and related third party modules 2017-01-11 11:19:33 +01:00
Rodrigo Ramírez Norambuena
49abe2b11f Fix capitalize missing word Community 2017-01-10 16:11:29 -03:00
Sergey Morozov
544e7fce88 removing .gitignore changes and changelog notes about it 2017-01-10 11:05:37 -08:00
Michael Teeuw
b9e7f018e2 Merge pull request #607 from qistoph/fixdefmod
Fix gitignore to not ignore default modules folder
2017-01-10 19:54:02 +01:00
Michael Teeuw
f31049cf69 Merge branch 'develop' into fixdefmod 2017-01-10 19:52:20 +01:00
Michael Teeuw
2b3b73b3f1 Merge pull request #600 from roramirez/config_sample-installer
modified installer to use config.js.sample for init config.
2017-01-10 19:46:38 +01:00
Michael Teeuw
704bb5a848 Merge pull request #597 from roramirez/fix-white-flash-boot
Remove white flash on boot up
2017-01-10 19:44:01 +01:00
Michael Teeuw
01f7d7add2 Merge pull request #608 from roramirez/new_year
update year license for 2017
2017-01-10 19:34:55 +01:00
Rodrigo Ramírez Norambuena
831d8b6d36 update year license for 2017 2017-01-10 15:22:10 -03:00
Chris van Marle
2e9b6ead2e Fix gitignore to not ignore default modules folder
/modules/** makes git ignore all directories and files in /modules, so
it's not even looking in /modules/default for changes.
!/modules/default/** is therefore never used. By adding the new line
!/modules/default, git is told to look in the /modules/default folder
for changes and will find all sub files/dirs and match these on
!/modules/default/**.
2017-01-10 11:31:00 +01:00
Rodrigo Ramírez Norambuena
d71fd0ff2d Add pm2 configuration for manager MagicMirror in script installer 2017-01-09 20:39:48 -03:00
aaronaxvig
6466bd4ba7 Add back missing newline 2017-01-08 18:15:48 -07:00
aaronaxvig
a97fa1abb6 Remove errant character 2017-01-08 18:14:30 -07:00
aaronaxvig
6171e5cc6e Update README.md 2017-01-08 18:02:45 -07:00
Thomas Bachmann
456502893c Addressed code review comments to reduce redundant lines 2017-01-08 14:38:16 +01:00
Thomas Bachmann
443a90c7ba Made full article view of news full-screen on any screen size 2017-01-07 22:42:11 +01:00
Thomas Bachmann
b8a72245dc Using generic news feed events as notifications, instead of more implementation specific gestures from sensor 2017-01-06 21:57:30 +01:00
Sergey Morozov
d019f88e26 Merge branch 'develop' into russian_translations2 2017-01-06 11:24:52 -08:00
Sergey Morozov
01cf4cc1ed Added Russian Translations
Redo of the PR #598

**Added:**
- Russian Translations

**Fixed:**
- corrected .gitignore rules for default modules

(Reasoning behind change: when I added translation for `alert` module `git add` was telling me that `.gitignore` rule excludes files and folders under `modules/default`)

I also noticed that `.gitignore:56` has following declaration:

```
!/modules/node_helper
!/modules/node_helper/**
```
but I don't think this directory structure exists today (also there is a small typo)
2017-01-06 11:21:20 -08:00
Rodrigo Ramírez Norambuena
396bbd83c8 modified installer to use config.js.sample for init config. 2017-01-05 16:09:41 -03:00
Chris van Marle
92e0affb85 Disable pointer-events on fullscreen overlay 2017-01-05 10:14:52 +01: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
IgniparousTempest
af41e4892f Afrikaans language translation 2017-01-04 16:26:49 +02:00
Thomas Bachmann
09531b399a Fixed Link formatting in MD 2017-01-04 11:04:33 +01:00
Thomas Bachmann
6251b77b28 Fixed code formatting issues 2017-01-04 11:01:07 +01:00
Thomas Bachmann
0099b6d4a2 Added change to CHANGELOG.md 2017-01-04 10:56:03 +01:00
Thomas Bachmann
adb8de9754 Enabled newsfeed default module for gesture events from https://github.com/thobach/MMM-Gestures 2017-01-04 10:46:31 +01:00
Michael Teeuw
8ac8b666bf Update CHANGELOG.md 2017-01-04 08:59:37 +01:00
Michael Teeuw
095feddf73 Merge pull request #591 from qistoph/modloaded
Update CHANGELOG for the async loaded function
2017-01-04 08:58:53 +01:00
Chris van Marle
4882a801d2 Update CHANGELOG 2017-01-03 17:46:41 +01:00
Michael Teeuw
1a1736ca0e Merge pull request #588 from brosy/handle-newsfeed-errors
Add error handling to newsfeed
2017-01-03 11:43:26 +01:00
Ben Brosnahan
a7619771a6 Add error handling to newsfeed 2017-01-02 21:35:53 +00:00
Michael Teeuw
6febcf3b94 Merge pull request #556 from qistoph/modloaded
Add async callback to module when loaded
2017-01-02 13:37:16 +01:00
Chris van Marle
3947deb7bd Add async callback to module when loaded 2017-01-02 13:04:15 +01:00
Michael Teeuw
98855de71f Changes in preperation of 2.1.1 2016-12-31 21:25:49 +01:00
Michael Teeuw
8010e6220d Merge pull request #586 from MichMich/develop
Release 2.1.0
2016-12-31 21:17:54 +01:00
Michael Teeuw
09e6a6a4ad Merge branch 'master' into develop 2016-12-31 21:16:09 +01:00
Michael Teeuw
da772e6649 Add release date. 2016-12-31 21:12:53 +01:00
Michael Teeuw
65b8f78ca1 Merge pull request #579 from brosy/handle-newsfeed-errors
Add error handling to newsfeed
2016-12-31 19:13:01 +01:00
Michael Teeuw
23bcac2e55 Merge pull request #585 from roramirez/extra-spaces
fix tabs, remove extra spaces and lines.
2016-12-31 19:12:24 +01:00
Michael Teeuw
e6a88eef35 Merge pull request #584 from roramirez/js-use-root-path
global.root_path for js core
2016-12-31 19:11:21 +01:00
Michael Teeuw
6654c461a6 Merge pull request #582 from henglert/patch-1
Fix repeating count of yearly calendar events
2016-12-31 19:10:21 +01:00
Rodrigo Ramírez Norambuena
a48cb052c2 resolv some missing fix eslint rules no-trailing-spaces 2016-12-30 17:47:33 -03:00
Rodrigo Ramírez Norambuena
809d932087 add rules "no-trailing-spaces" and "no-irregular-whitespace" for ESLint 2016-12-30 17:44:41 -03:00
Rodrigo Ramírez Norambuena
19d906c5e4 fix tabs, remove extra spaces and lines. 2016-12-29 22:23:08 -03:00
Rodrigo Ramírez Norambuena
2f933a90fd global.root_path for js core
Use global.root_path instead of "/../" syntax to go back directory
2016-12-29 19:09:28 -03:00
henglert
3607875714 Fix repeating count of yearly calendar events
The occurrence counter for a yearly repeating event e was calculated by "current year" - "e.firstYear", instead of "e.year" - "e.firstYear". That leads to a repeating event counter - 1 at the end of the year. E.g.
event e: first Date: 2015-01-02, yearly repetition
repeating count evaluated on 2015-12-31: 2015-2015 = 0 => incorrect
repeating count evaluated on 2016-01-01: 2016-2015 = 1 => correct
Fix: repeating count has to be calculated from event date instead of current date.
2016-12-29 15:31:01 +01:00
Michael Teeuw
fec8829041 Merge pull request #580 from roramirez/root_path
global: Add the root_path variable in global.
2016-12-28 13:33:47 +01:00
Rodrigo Ramírez Norambuena
f58e758a41 global: Add the root_path variable in global.
This will can be help for work the better way in use the path into
the core and modules.
2016-12-27 14:31:35 -03:00
Ben Brosnahan
cebed0824f Fix lint error 2016-12-26 11:35:37 +00:00
Ben Brosnahan
97120bd1f1 Add error handling to newsfeed 2016-12-26 01:17:45 +00:00
Michael Teeuw
4237d0c7e3 Merge pull request #547 from dbahn25/hidePrivate
Hide private
2016-12-24 14:23:47 +01:00
Daniel Buecheler
243cdfefa2 Fix failed linter test 2016-12-22 22:00:59 +01:00
Daniel Buecheler
a12a4cd8f2 Merge remote-tracking branch 'mich/develop' into hidePrivate
Resolved merge conflict
2016-12-22 21:53:47 +01:00
Olexandr Savchuk
980b8a2924 Added console warning for deprecated config options 2016-12-14 18:54:44 +01:00
Michael Teeuw
989dca5792 Merge pull request #563 from aschulz90/mm-fixes
Mm fixes
2016-12-14 10:05:20 +01:00
Michael Teeuw
c9eb06bb70 Merge pull request #560 from berlincount/develop
make electronOptions configurable
2016-12-14 10:04:27 +01:00
Michael Teeuw
af89906b81 Merge pull request #559 from roramirez/user-agent
newsfeed, calendar: Standardize user-agent.
2016-12-14 10:03:31 +01:00
Andreas
de71b1b397 Revert calendar default value and add documentation 2016-12-13 17:16:46 +01:00
Rodrigo Ramírez Norambuena
2decee1d87 Merge branch 'develop' into user-agent fix conflict. 2016-12-13 10:40:10 -03:00
Andreas 'count' Kotes
6a184b069b make electronOptions configurable, remove kioskmode from documentation 2016-12-13 13:59:24 +01:00
Michael Teeuw
48db615ac8 Merge pull request #553 from roramirez/grunt-eslint-modules
Grunt eslint modules
2016-12-13 12:58:43 +01:00
Michael Teeuw
bb9caa4838 Merge pull request #566 from roramirez/flag-plymouth
splashscreen: remove flag not used into script plymouth
2016-12-13 12:49:53 +01:00
Rodrigo Ramírez Norambuena
3c11c3fc16 splashscreen: remove flag not used into script plymouth 2016-12-13 00:33:29 -03:00
Andreas
6c1dbc5e61 Updated module READMEs with current default values 2016-12-12 14:55:07 +01:00
Andreas
21bf1dd1a3 Updated module READMEs with current default values 2016-12-12 14:52:00 +01:00
Michael Teeuw
78aa2b491c Merge pull request #558 from roramirez/size-for-compliments-text
Size for compliments text
2016-12-09 14:54:29 +01:00
Rodrigo Ramírez Norambuena
53d2c7e89f compliments: add abilty to set classes for compliments module 2016-12-09 10:49:49 -03:00
Michael Teeuw
cdf78db629 Merge pull request #552 from olexs/electron-zoom-factor
Option to scale the whole display using Electron's zoom factor
2016-12-08 15:57:47 +01:00
Olexandr Savchuk
15c5725829 Merge branch 'develop' into electron-zoom-factor 2016-12-08 15:54:52 +01:00
Michael Teeuw
96653170a2 Merge pull request #551 from olexs/round-temps
Option to display temperatures rounded to nearest integer
2016-12-08 15:47:44 +01:00
Michael Teeuw
eade89da48 Merge pull request #555 from qistoph/remoteonly
Check updates (in updatenotification) only for repos with remote
2016-12-08 15:29:17 +01:00
Rodrigo Ramírez Norambuena
9b86049964 newsfeed, calendar: Standardize user-agent.
Add node and MagicMirror version.
2016-12-08 01:29:55 -03:00
Rodrigo Ramírez Norambuena
9e2bbd50b6 README compliments: Close code tag and fix tabs 2016-12-07 22:03:32 -03:00
Chris van Marle
0d18266ad1 Fetch remote git only if repo has a remote 2016-12-07 08:38:45 +01:00
Rodrigo Ramírez Norambuena
83ee0534f2 fixed eslint error into modules for Javascript files 2016-12-02 23:23:54 -03:00
Rodrigo Ramírez Norambuena
8ad00025ad use Gruntfile into modules/default/* 2016-12-02 23:23:48 -03:00
Olexandr Savchuk
7d08a7c9cd Added documentation and changelog entry. 2016-12-02 21:14:41 +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
Olexandr Savchuk
89bc3137ba Fixed method description. 2016-12-02 20:56:10 +01:00
Olexandr Savchuk
4d8d30f897 Moved misplaced method signature 2016-12-02 20:53:02 +01:00
Olexandr Savchuk
d67e9468c0 Changed roundTemp implementation to a cleaner one 2016-12-02 20:52:36 +01:00
Olexandr Savchuk
7dda36ab97 Merge branch 'round-temps' of github.com:olexs/MagicMirror into round-temps 2016-12-02 17:38:04 +01:00
Olexandr Savchuk
32df3e80b1 Renamed roundTemperature option to roundTemp
Added changelog entry
2016-12-02 17:33:41 +01:00
Olexandr Savchuk
3c33969d23 implemented roundTemperature in weather modules 2016-12-02 17:27:45 +01:00
Olexandr Savchuk
c2aec5ae36 implemented roundTemperature in weather modules 2016-12-02 17:17:58 +01:00
Daniel Bücheler
7afc908c32 Added hidePrivate option of calendar module 2016-11-30 21:28:49 +01:00
Daniel Bücheler
c66ecbdd29 Added hidePrivate to README.md
Added explanation of hidePrivate option to the Calendar Module's README
2016-11-30 21:28:44 +01:00
Daniel Buecheler
e61bccab36 Calendar Module: Added false as default for hidePrivate 2016-11-30 21:24:04 +01:00
Daniel Buecheler
cfeef98261 Private events are hidden
Events with the class:PRIVATE iCal property are not shown in the
calendar module. They are not added to the array of calendar
events in createEventList.

This feature can be turned on and off in the config via the property
hidePrivate: true/false.
2016-11-30 21:09:57 +01:00
Michael Teeuw
c949548150 Merge pull request #546 from BrianHepler/load_compliments_from_remote_file
Load compliments from remote file
2016-11-30 16:43:14 +01:00
Brian
829ccfca88 Updated changelog and compliments documentation. 2016-11-30 10:31:19 -05:00
Brian
950fa84d1c Added capability to load compliments from the host file system. 2016-11-30 10:30:49 -05:00
Michael Teeuw
5666729fcf Merge pull request #543 from roramirez/pulled-clock
clock: remove statement of repetead code.
2016-11-29 10:41:29 +01:00
Michael Teeuw
3a13886af9 Merge pull request #542 from aschulz90/mm-fixes
Fixed Global Default Config Being Modified
2016-11-26 16:17:14 +01:00
Rodrigo Ramírez Norambuena
db6e0ccf63 clock: remove statement of repetead code. 2016-11-26 11:45:12 -03:00
Andreas
35f2ebc2aa Fixed Global Default Config Being Modified 2016-11-26 15:33:10 +01:00
Michael Teeuw
60ac4a3e86 Merge pull request #541 from roramirez/bind-address
Add option to set bind address
2016-11-26 13:23:27 +01:00
Rodrigo Ramírez Norambuena
c966d34b07 fix camelCase detected eslint 2016-11-25 21:55:51 -03:00
Rodrigo Ramírez Norambuena
a05d7059fb Update CHANGELOG 2016-11-25 21:54:03 -03:00
Rodrigo Ramírez Norambuena
facc1dc944 add label where is bind serveronly 2016-11-25 21:48:36 -03:00
Rodrigo Ramírez Norambuena
df2ebbf384 Add option to set bind address 2016-11-25 21:41:05 -03:00
Michael Teeuw
e210471c7a Merge pull request #539 from roramirez/fix_tab_config.js_sample
fix tab into config.js.sample
2016-11-24 15:48:03 +01:00
Michael Teeuw
f42d552dad Merge pull request #540 from roramirez/space_comment_js_main
fix comments and space js/main.js
2016-11-24 15:47:49 +01:00
Rodrigo Ramírez Norambuena
edfd9e46b6 fix comments and space js/main.js 2016-11-24 00:26:40 -03:00
Rodrigo Ramírez Norambuena
27644776f3 fix tab into config.js.sample 2016-11-24 00:20:04 -03:00
Michael Teeuw
a4797dcc73 Merge pull request #537 from roramirez/comment-fix
comments fix for js/module.js
2016-11-22 23:09:35 +01:00
Rodrigo Ramírez Norambuena
677312648b comments fix for js/module.js 2016-11-22 18:53:46 -03:00
Michael Teeuw
ace460c69b Merge pull request #535 from Platimir/patch-3
Added update info translation
2016-11-22 07:51:48 +01:00
Platimir
b922fe35ab Added update info translation
Added 2/3 update info translation
2016-11-21 22:14:16 +01:00
Michael Teeuw
222e2166ff Merge pull request #530 from Jopyth/patch-3
update documentation to module default config
2016-11-21 11:03:10 +01:00
Michael Teeuw
7dc25ec425 Merge pull request #532 from roramirez/default_value_animation_newsfeed
newsfeed: fix set default value for animationSpeed option in README
2016-11-21 11:02:52 +01:00
Michael Teeuw
980835981f Merge pull request #533 from roramirez/onlyTemp
Only temp
2016-11-21 11:02:30 +01:00
Rodrigo Ramírez Norambuena
e425adc230 fix some tabs 2016-11-20 22:19:55 -03:00
Rodrigo Ramez Norambuena
2ea7ef327e currentweather: add option onlyTemp.
Is added option onlyTemp for show only current temperature and weather
icon.
2016-11-20 22:19:51 -03:00
Rodrigo Ramírez Norambuena
6c9d33f05c newsfeed: fix set default value for animationSpeed option in README 2016-11-20 20:06:58 -03:00
Jopyth
c584b51726 Update CHANGELOG.md 2016-11-20 16:49:30 +01:00
Jopyth
3c8fa3382b update documentation to module default config 2016-11-20 16:47:49 +01:00
Michael Teeuw
e5c75259e0 Merge pull request #524 from qistoph/moduleupdates
Check updates for configured modules only
2016-11-19 11:37:02 +01:00
Michael Teeuw
f78e437a42 Merge pull request #526 from roramirez/UPDATE_NOTIFICATION_MODULE-es
Update translations module es
2016-11-19 11:35:54 +01:00
Michael Teeuw
8f61b1d320 Merge pull request #527 from roramirez/standarize-tab-translations
fix tabs translations
2016-11-19 11:35:40 +01:00
Michael Teeuw
84f3c6f7e6 Merge pull request #528 from Jopyth/patch-2
add German translation for module update
2016-11-19 11:35:16 +01:00
Jopyth
bfb6c001a0 add german translation for module update 2016-11-19 07:46:30 +01:00
Rodrigo Ramírez Norambuena
f0fa9f2033 translations: Fix massive tabs into translations files. 2016-11-18 22:19:45 -03:00
Rodrigo Ramírez Norambuena
c82cc30968 translations: Add UPDATE_NOTIFICATION_MODULE string for spanish. 2016-11-18 19:23:04 -03:00
Michael Teeuw
b0cb14b515 Merge pull request #525 from Jopyth/patch-2
Fix typo
2016-11-18 17:13:11 +01:00
Jopyth
7f86d2aa0a Fix typo 2016-11-18 17:07:55 +01:00
Chris van Marle
482dd4db76 Check updates for configured modules only 2016-11-18 12:57:45 +01:00
Michael Teeuw
0f44fd2290 Merge pull request #523 from nhubbard/develop
Update Dependencies and Improve Security
2016-11-17 19:36:14 +01:00
Nicholas Hubbard
690d461693 Update CHANGELOG 2016-11-17 10:33:13 -05:00
Nicholas Hubbard
f1ca72aee9 Improve Security and Update Dependencies 2016-11-17 09:34:11 -05:00
Michael Teeuw
a3a6fc0d15 Merge pull request #521 from nhubbard/develop
Update Electron
2016-11-17 08:47:29 +01:00
Nicholas Hubbard
4f4fe5f06b Update Electron: Part II
Add the change to the changelog.
2016-11-16 20:04:56 -05:00
Nicholas Hubbard
c59f47f4b5 Update Electron: Part I
Replace `electron-prebuilt` with `electron`.
2016-11-16 20:02:37 -05:00
Michael Teeuw
0ae810b8c6 Merge pull request #519 from StefanBols/develop
Updated da translation file
2016-11-16 20:47:10 +01:00
Stefan Bols
ac9f42a8fe Updated da translationfile 2016-11-16 20:35:55 +01:00
Michael Teeuw
eab7e56ece Merge pull request #518 from qistoph/moduleupdates
Module Updates
2016-11-16 18:57:44 +01:00
Chris van Marle
7329515a4d Check for module updates 2016-11-16 18:19:44 +01:00
Michael Teeuw
6d6bf2df3a Merge pull request #516 from StefanBols/develop
Added UPDATE INFO to da.json
2016-11-16 07:03:29 +01:00
Stefan Bols
3008bfbe0a Added UPDATE INFO to da.json 2016-11-15 22:54:47 +01:00
Michael Teeuw
9399517cfb Merge pull request #512 from roramirez/readme-calendar-format-fix
calendar: little fix format README
2016-11-15 19:40:43 +01:00
Michael Teeuw
b117fe222d Merge pull request #515 from roramirez/disabled_module
Config: Add option disabled for modules configuration
2016-11-15 09:33:07 +01:00
Rodrigo Ramírez Norambuena
62567264f0 Config: Add option disabled for modules configuration 2016-11-14 14:45:59 -03:00
Michael Teeuw
c054b3b0de Merge pull request #514 from roramirez/log_line_number
logger: Show line number where is called the function for the log
2016-11-14 17:26:59 +01:00
Rodrigo Ramez Norambuena
83fb5b4d1b logger: Show line number where is called the function for the log 2016-11-14 00:04:23 -03:00
Rodrigo Ramírez Norambuena
07a86800c9 calendar: little fix format README 2016-11-12 21:10:37 -03:00
Michael Teeuw
688b5f29b6 Cleanup. 2016-11-12 20:03:56 +01:00
Michael Teeuw
e311f17062 Temp fix for wrapper issue. 2016-11-12 11:19:58 +01:00
Michael Teeuw
b4cdb22e24 Merge pull request #509 from roramirez/extra_log
remove extra console.log introduced in commit e419701
2016-11-11 14:20:38 +01:00
Rodrigo Ramez Norambuena
b63194c0aa remove extra console.log introduced in commit e419701 2016-11-11 10:18:29 -03:00
Michael Teeuw
0bab32315c Merge PR 2016-11-10 20:06:00 +01:00
Michael Teeuw
7e881dd850 Merge branch 'compliments_from_currentweather' of https://github.com/roramirez/MagicMirror into roramirez-compliments_from_currentweather 2016-11-10 20:03:58 +01:00
Michael Teeuw
d6aaafb069 Merge pull request #508 from roramirez/var_updateTimer
currentweather: Remove variable updateTimer not used
2016-11-10 20:01:25 +01:00
Michael Teeuw
731fcb8829 Merge pull request #507 from roramirez/update_es_translations
Update es translations
2016-11-10 19:39:37 +01:00
Michael Teeuw
af0e94a4b7 Merge pull request #506 from qistoph/dateformat
Dateformat
2016-11-10 19:38:51 +01:00
Rodrigo Ramírez Norambuena
deda869cc5 currentweather: Remove variable updateTimer not used 2016-11-10 15:33:16 -03:00
Rodrigo Ramírez Norambuena
434089395a translations: add DAYAFTERTOMORROW key Spanish language. 2016-11-10 15:27:10 -03:00
Rodrigo Ramírez Norambuena
048985bdf4 translations: add Spanish translations for alert module 2016-11-10 15:26:55 -03:00
Rodrigo Ramez Norambuena
70d6d4246d compliments: Add feature use current weather.
Possibility the use the actual type of currentweather to show the
compliments.
2016-11-10 15:11:18 -03:00
Chris van Marle
70befe900c Update changelog 2016-11-10 17:28:39 +01:00
Chris van Marle
9fd81bf6c7 Add dateFormat to calendar module 2016-11-10 17:26:29 +01:00
Michael Teeuw
a388fe3acb Merge pull request #505 from StefanBols/develop
Added keys to EN and DA translations files
2016-11-09 19:29:02 +01:00
Stefan Bols
d4946d931a Create da.json 2016-11-09 17:40:51 +01:00
Stefan Bols
9812654bfa Update CHANGELOG.md 2016-11-09 17:30:20 +01:00
Stefan Bols
557426246c Added key DAYAFTERTOMORROW to translation file
The key was found in the NL translation file, and were missing in the EN file
2016-11-09 17:22:33 +01:00
Stefan Bols
d0a3e8f789 Added DAYAFTERTOMORROW key to translation file
Key found at NL translation file, and are missing in the Danish translation
2016-11-09 17:20:35 +01:00
Michael Teeuw
50b37f2ddd Update changelog. 2016-11-08 20:11:46 +01:00
Michael Teeuw
e4197012f6 updateWrapperStates to hide unused regions. 2016-11-08 20:07:31 +01:00
Michael Teeuw
df00a1e0a3 Merge pull request #503 from derwehr/develop
added url to the newsfeed fetcher
2016-11-07 20:48:29 +01:00
derwehr
41327bfb03 quick fix to prevent issues with feeds that omit url and link 2016-11-07 20:46:28 +01:00
derwehr
66ef72a040 added url to the newsfeed fetcher 2016-11-07 17:49:32 +01:00
Michael Teeuw
af660bc631 Fix typo. 2016-11-06 12:54:00 +01:00
Michael Teeuw
18edb13e76 Remove Snyk since it gives to many NPM issues. 2016-11-06 12:37:04 +01:00
Michael Teeuw
e05431c847 Merge pull request #482 from roramirez/fix_change_log_pr_479
Fix the position for the feature note added in the Pull Request #479
2016-11-06 12:34:43 +01:00
Michael Teeuw
5c61f95093 Merge pull request #485 from roramirez/url_example_cities
currentweather, weatherforecast: sample URL for LocationID:
2016-11-06 12:33:20 +01:00
Michael Teeuw
9a407c727a Merge pull request #497 from roramirez/error_missing_coma-lang-es
error missing coma into es translations
2016-11-06 12:31:22 +01:00
Michael Teeuw
cad655a15b Merge pull request #500 from roramirez/space_vs_tab_calendar
calendar: fix space vs tab into caledarfetcher.js
2016-11-06 12:29:44 +01:00
Rodrigo Ramez Norambuena
1fa5c53b72 calendar: fix space vs tab into caledarfetcher.js 2016-11-05 21:23:37 -03:00
Rodrigo Ramez Norambuena
d01b1a706c error missing coma into es translations 2016-11-03 17:56:06 -03:00
Rodrigo Ramírez Norambuena
678d5fc532 currentweather, weatherforecast: sample URL for LocationID:
Changed from README the sample URLs for get the LocationID.
The http://bulk.openweather.org/sample/ doesn't work
2016-11-03 15:36:04 -03:00
Michael Teeuw
c4e01fa566 Merge pull request #494 from onuryilmaz/develop
Turkish translation added
2016-11-03 08:14:27 +01:00
Michael Teeuw
e694622b83 Merge pull request #495 from roramirez/update-es
Update: translations es
2016-11-03 08:13:44 +01:00
Rodrigo Ramírez Norambuena
1d16c96ca4 Update: translations es 2016-11-03 00:19:32 -03:00
Onur Yilmaz
ab1f34726b Turkish translation added 2016-11-02 22:03:17 +00:00
Onur Yilmaz
c9f201755e Turkish translation added 2016-11-02 22:01:14 +00:00
Michael Teeuw
094ef592a7 Merge pull request #492 from aschulz90/mm-fixes
Mm fixes
2016-10-31 20:39:00 +01:00
Andreas
e7493c38d1 Update CHANGELOG.md 2016-10-31 20:16:55 +01:00
Andreas
6fd0fcfdb5 Update module.js 2016-10-31 20:10:52 +01:00
Michael Teeuw
6da534a961 Merge pull request #491 from dougshamoo/patch-1
Fix typo in readme
2016-10-29 21:44:18 +02:00
Doug Shamoo
f26e43144e Fix typo in README 2016-10-29 12:27:34 -07:00
Michael Teeuw
427529171c Merge pull request #489 from roramirez/README-weathers-times
README Fix updateInterval for currentweather, weatherforecast:
2016-10-27 16:41:08 +02:00
Rodrigo Ramírez Norambuena
cd146cf822 README Fix updateInterval for currentweather, weatherforecast:
Fix milliseconds in the example for the updateInterval option
2016-10-27 11:12:15 -03:00
Michael Teeuw
ced412372c Merge pull request #486 from roramirez/fix_location_id_empty
currentweather, weatherforecast: fix locationID empty
2016-10-26 21:29:26 +02:00
Rodrigo Ramez Norambuena
2f6e650c1b currentweather, weatherforecast: fix locationID empty
Fix when the option locationID the value = ''

If you have the next config

 config: {
            // See 'Configuration options' for more information.
            location: 'Chillan, Chile',
            locationID: '',
            appid: 'abcde12345abcde12345abcde12345ab'
        }

The modules dont get the data, because the parameters of query is created
in id=''
2016-10-26 16:15:42 -03:00
Rodrigo Ramírez Norambuena
5c125ca9b4 Fix position note for add the feature into Pull Request #479 2016-10-25 16:14:59 -03:00
Michael Teeuw
89c0939d58 Fix needs update check. 2016-10-25 12:30:24 +02:00
Michael Teeuw
8ea955fb23 Fix type. 2016-10-25 12:24:01 +02:00
Michael Teeuw
73a297f23f Merge pull request #479 from roramirez/timezone-clock-module
add support to enable set timezone for show in clock module.
2016-10-25 11:39:19 +02:00
Rodrigo Ramírez Norambuena
95f1382fbf add support to enable set timezone for show in clock module. 2016-10-24 23:55:40 -03:00
Michael Teeuw
80df01c8ee Fix unit for display time. 2016-10-22 12:04:58 +02:00
Michael Teeuw
c2df864119 Merge pull request #475 from RedNax67/develop
Deliver additional information in calendar broadcasts
2016-10-20 09:20:30 +02:00
xander
2cc9356c32 Push location, geo and description on events stack for single and repeating events. 2016-10-20 09:05:12 +02:00
RedNax67
89234c0163 Merge pull request #1 from MichMich/develop
Develop
2016-10-20 08:41:40 +02:00
Michael Teeuw
1b7fe286a6 remove logging 2016-10-17 17:03:10 +02:00
Michael Teeuw
7c2d797ed0 Merge pull request #470 from Jopyth/patch-1
Change position from absolute to fixed
2016-10-17 16:50:48 +02:00
Jopyth
4d2eedc56b Update CHANGELOG.md 2016-10-16 17:32:17 +02:00
Jopyth
ece0d9301f Update CHANGELOG.md 2016-10-16 17:32:05 +02:00
Jopyth
cc10cd88d3 change position from absolute to fixed 2016-10-16 17:24:21 +02:00
Michael Teeuw
b9f308c832 Stylelint fixes 2016-10-15 17:11:03 +02:00
Michael Teeuw
6816bd8bad Solve margin issue. 2016-10-15 17:06:52 +02:00
Michael Teeuw
0e026de5bd Merge pull request #469 from fewieden/develop
added german translation for updatenotification
2016-10-15 15:43:01 +02:00
fewieden
a419ad201d added german translation for updatenotification 2016-10-15 13:39:42 +02:00
Michael Teeuw
a66a4f62bd Add module 'updatenotification'. 2016-10-15 13:08:46 +02:00
Michael Teeuw
e721d2204b Fix typo. 2016-10-15 11:27:34 +02:00
Michael Teeuw
f293cf6e81 Merge pull request #468 from Jopyth/patch-rain
Add option to show rain amount
2016-10-15 08:57:53 +02:00
Jopyth
0cde1d4969 Update CHANGELOG.md 2016-10-14 23:13:13 +02:00
Joseph Bethge
bd49bd6e33 option to show rain amount 2016-10-14 23:07:18 +02:00
Michael Teeuw
84dc1fa151 Possibility to use the the calendar feed as the source for the weather. 2016-10-14 17:42:07 +02:00
Michael Teeuw
5858e862d9 Broadcast calendar eventlist to other modules. 2016-10-14 15:23:03 +02:00
Michael Teeuw
8b004a549a Change Newsfeed logging. 2016-10-14 14:19:03 +02:00
Michael Teeuw
4a53e4207c Small visual change. 2016-10-13 21:05:48 +02:00
Michael Teeuw
6510de5d29 Fix logger issue on electron. 2016-10-13 20:22:30 +02:00
Michael Teeuw
a6191320a1 Improve documentation. 2016-10-13 16:47:00 +02:00
Michael Teeuw
a75ff0c061 Improve documentation. 2016-10-13 16:45:23 +02:00
Michael Teeuw
0d45eb91db Fix typo. 2016-10-13 16:43:43 +02:00
Michael Teeuw
95edbc16bb Add requiresVersion property to module API. 2016-10-13 16:42:15 +02:00
Michael Teeuw
15a5e3c779 Fix typo. 2016-10-13 15:19:12 +02:00
Michael Teeuw
0433432e62 Add information about recent changes. 2016-10-13 15:15:38 +02:00
Michael Teeuw
e7ca73bbad Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop
# Conflicts:
#	modules/README.md
2016-10-13 15:07:19 +02:00
Michael Teeuw
8d8374b8e2 First implementation of Visibility locking. 2016-10-13 15:03:52 +02:00
Michael Teeuw
4dc5bbe601 First implementation of Visibility locking. 2016-10-13 15:00:59 +02:00
Michael Teeuw
55371f9c78 Improve object instantiation to prevent reference errors. 2016-10-13 14:25:53 +02:00
Michael Teeuw
af63f4098f Improve logger. 2016-10-13 13:24:56 +02:00
Michael Teeuw
2b4939a875 Add VSCode IntelliSense support. 2016-10-13 13:10:33 +02:00
Michael Teeuw
d5d22844ab Fix info about default setting. 2016-10-04 16:27:06 +02:00
Michael Teeuw
7dab00be87 Fix info about default setting. 2016-10-04 16:26:35 +02:00
Michael Teeuw
67582d388a Fix Table. 2016-10-04 16:25:39 +02:00
Michael Teeuw
0671e7d456 Add update information. 2016-10-04 16:21:53 +02:00
Michael Teeuw
c9e6af96d0 Change update information. 2016-10-04 16:19:33 +02:00
Michael Teeuw
ee48a56603 Add info about humidity. 2016-10-01 14:08:15 +02:00
Michael Teeuw
4c03f39437 Merge branch 'amcolash-current_humidity' into develop 2016-10-01 14:06:45 +02:00
Michael Teeuw
d8d425c963 Visual changes. 2016-10-01 14:06:10 +02:00
Michael Teeuw
ec64ac9f1d Merge branch 'current_humidity' of https://github.com/amcolash/MagicMirror into amcolash-current_humidity 2016-10-01 13:56:46 +02:00
Michael Teeuw
7ed682c186 Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop 2016-10-01 13:55:54 +02:00
Michael Teeuw
9dcb579741 Merge branch 'fewieden-develop' into develop 2016-10-01 13:55:31 +02:00
Michael Teeuw
19f837aa41 Merge changes. 2016-10-01 13:55:08 +02:00
Michael Teeuw
b267491934 Add IPv6 loopback IP address to default whitelist. 2016-10-01 13:49:41 +02:00
Michael Teeuw
a369dddde8 Merge branch 'yo-less-patch-4' into develop 2016-10-01 11:03:16 +02:00
Michael Teeuw
29d87d7c48 Merge branch 'patch-4' of https://github.com/yo-less/MagicMirror into yo-less-patch-4
# Conflicts:
#	CHANGELOG.md
2016-10-01 11:03:05 +02:00
Michael Teeuw
4847f50093 Merge branch 'kasperwandahl-master' into develop 2016-10-01 10:53:08 +02:00
Michael Teeuw
7c848b1253 Merge changes 2016-10-01 10:52:46 +02:00
Michael Teeuw
607aa46032 Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop 2016-10-01 10:35:33 +02:00
Michael Teeuw
430193891f Fix Config keys. 2016-10-01 10:35:22 +02:00
fewieden
cbb82ed635 replace system output with MagicMirror splash screen on boot 2016-10-01 00:38:14 +02:00
Michael Teeuw
1dfb72703a Merge pull request #461 from hkapanen/Finnish
Finnish translation
2016-09-30 20:10:31 +02:00
Harri Kapanen
5edf377f4b Finnish translation 2016-09-30 20:44:53 +03:00
Michael Teeuw
43a33d267a Merge pull request #453 from dmcinnes/patch-1
Fix typos in the module dev docs
2016-09-30 09:30:43 +02:00
Doug McInnes
c4048f4c7b fix typos in the module dev docs 2016-09-29 21:40:45 -07:00
Michael Teeuw
501c89ae3a Merge pull request #457 from Jopyth/patch-limited-access
Patch limited access
2016-09-29 17:58:06 +02:00
Joseph Bethge
5899497aa7 log denied access attempts on server 2016-09-29 17:55:32 +02:00
Joseph Bethge
2c758a9981 remove warning message 2016-09-29 17:52:22 +02:00
Joseph Bethge
66eb99e506 transfer usage information to readme 2016-09-29 17:49:54 +02:00
Joseph Bethge
b583140077 fix double quotes and config.js.sample 2016-09-29 17:43:57 +02:00
Joseph Bethge
f378c93dd3 replace ugly error message 2016-09-29 17:07:22 +02:00
Joseph Bethge
5d29fa5e62 ip address filtering 2016-09-29 16:34:57 +02:00
Michael Teeuw
54f04c9141 Fix ESLint issues 2016-09-29 11:12:49 +02:00
Michael Teeuw
fc0c706100 Add MagPi Logo 2016-09-29 11:05:37 +02:00
Kasper Wandahl Fogh
02ac9fa0d7 Added danish in translations.js and updated changelog 2016-09-24 10:57:02 +02:00
Kasper Wandahl Fogh
ca95c75df3 Added danish translation 2016-09-24 10:41:44 +02:00
Michael Teeuw
4ff86795b9 Snyk security update. 2016-09-22 19:56:54 +02:00
Michael Teeuw
30eaec29d3 Modified translations for Frysk. 2016-09-21 10:29:34 +02:00
Michael Teeuw
742d38c9ec Merge pull request #450 from Wilco89/patch-1
Patch 1
2016-09-21 10:28:23 +02:00
Wilco Land
56a4597784 Update fy.json
Added "DAYAFTERTOMORROW"
2016-09-21 09:57:47 +02:00
Michael Teeuw
b2a7d3584b Add getHeader functionlity.. 2016-09-20 17:22:24 +02:00
Michael Teeuw
b8167f89e5 Merge pull request #448 from MichMich/develop
Release 2.0.5
2016-09-20 16:41:12 +02:00
Michael Teeuw
c916472b22 Release 2.0.5 2016-09-20 16:32:45 +02:00
Michael Teeuw
bdfe7c5e69 Merge pull request #447 from valmassoi/develop
Fix default weather forecast module api URL
2016-09-19 15:27:32 +02:00
valmassoi
749475799a Fix default weather forecast module api URL 2016-09-18 10:54:20 -07:00
Michael Teeuw
daf9c807b5 Merge pull request #446 from contra/patch-1
fix typo
2016-09-18 08:42:03 +02:00
contra
5dfecfdee3 fix typo 2016-09-17 17:54:38 -04:00
Michael Teeuw
d267c03ee2 Merge pull request #435 from nhubbard/develop
Add all the linters!
2016-09-13 09:33:06 +02:00
Michael Teeuw
864e3c7a50 Merge pull request #437 from andyipod1437/develop
Able to turn off and on the date display the clock module.
2016-09-11 21:16:07 +02:00
Andrew Chumchal
747e1a818d Able to turn off and on the clock module 2016-09-11 08:14:28 -07:00
Andrew Chumchal
f468dbf427 Update CHANGELOG.md 2016-09-11 08:04:33 -07:00
Nicholas Hubbard
88572e90d4 Add all the linters 2016-09-10 16:41:57 -04:00
Michael Teeuw
41fc7dd73d Merge pull request #434 from nhubbard/develop
Clean Up the Contributing Documentation and Process: An Opera, Reincarnated
2016-09-09 08:56:34 +02:00
Nicholas Hubbard
c87c588c79 Clean Up the Contributing Documentation and Process: Part VII.LXVI.IV
* Fix yet another out-of-the-blue error that Stylelint found.
2016-09-08 16:00:48 -04:00
Nicholas Hubbard
5ab4b57411 Clean Up the Contributing Documentation and Process: Part VII.LXVI.III
* Fix the errors that popped up out of the blue from Stylelint.
2016-09-08 15:57:25 -04:00
Michael Teeuw
3c936c6957 Merge pull request #433 from icewind1991/webcal-auth
add support for http basic auth for calendars
2016-09-08 21:54:53 +02:00
Nicholas Hubbard
0ca903a146 Clean Up the Contributing Documentation and Process: Part VII.LXVI.II
* Fix the indentation in the clock CSS.
2016-09-08 15:51:58 -04:00
Nicholas Hubbard
4e91919990 Clean Up the Contributing Documentation and Process: Part VII.LXVI.I
* Fix the StyleLint config to allow the empty blocks in the clock module CSS.
2016-09-08 15:49:24 -04:00
Nicholas Hubbard
e023a68780 Clean Up the Contributing Documentation and Process: Part VII.LXVI
* Fix the issues in css/main.css.
2016-09-08 15:47:16 -04:00
Nicholas Hubbard
17452cd5b6 Clean Up the Contributing Documentation and Process: Part VII.XXXIII
* Fix the css/custom.css issues.
2016-09-08 15:44:43 -04:00
Nicholas Hubbard
c76f2c8483 Clean Up the Contributing Documentation and Process: Part VII
* Fix the globbing error in the previous commits.
2016-09-08 15:41:12 -04:00
Robin Appelman
90207f9b68 add support for http basic auth for calendars 2016-09-08 21:29:17 +02:00
Nicholas Hubbard
0ec5371b61 Clean Up the Contributing Documentation and Process: Part VII
* Update the changelog to mention my changes.
2016-09-08 15:26:50 -04:00
Nicholas Hubbard
8549aeb466 Clean Up the Contributing Documentation and Process: Part VI
* Alter the pull request template to look a little better.
2016-09-08 15:24:52 -04:00
Nicholas Hubbard
504d3cd131 Clean Up the Contributing Documentation and Process: Part V
* Replace the contribution instructions with the ones from CONTRIBUTING.md.
2016-09-08 15:23:45 -04:00
Nicholas Hubbard
83ed298eba Clean Up the Contributing Documentation and Process: Part IV
* Replace `postcss:lint` with `stylelint`.
* Update the contribution instructions.
2016-09-08 15:22:40 -04:00
Nicholas Hubbard
a90f2cb156 Clean Up the Contributing Documentation and Process: Part III
* Remove PostCSS from Grunt.
* Add StyleLint to Grunt.
2016-09-08 15:17:20 -04:00
Nicholas Hubbard
1a54bafdd5 Clean Up the Contributing Documentation and Process: Part II
* Add `grunt-stylelint` over the complicated PostCSS method previously used.
* Remove PostCSS dependencies.
2016-09-08 15:14:00 -04:00
Nicholas Hubbard
3cc186f7e4 Clean Up the Contributing Documentation and Process: Part I
* Remove the HTML Validator
* Replace JSCS with ESLint
* Replace `npm` commands with equivalent `grunt` commands
2016-09-08 15:10:17 -04:00
Michael Teeuw
a2497d7564 Merge pull request #430 from nhubbard/develop
Close #374
2016-09-07 08:31:06 +02:00
Nicholas Hubbard
c01c882081 Update the Changelog 2016-09-06 19:25:16 -04:00
Nicholas Hubbard
af279df5c9 Closes #374.
ARMv6 is not supported by recent versions of Chrome, and by extent, this means recent versions of Electron as well.
2016-09-06 19:23:52 -04:00
Michael Teeuw
1ea7ce2589 Fix typo. 2016-09-06 10:09:11 +02:00
Michael Teeuw
476c577bc1 Add fixes. 2016-09-06 10:08:12 +02:00
Michael Teeuw
e3b91c4d71 Merge pull request #428 from callumdmay/master
Fix typos in raspberry.sh
2016-09-06 10:06:52 +02:00
Michael Teeuw
1e2d7acf4a Merge pull request #427 from pOakley/patch-1
currentweather module api url bugfix
2016-09-06 10:06:17 +02:00
Callum
1def120616 Fix typos in raspberry.sh 2016-09-05 22:47:49 -04:00
Phil Oakley
25ddf2c651 currentweather module api url bugfix
Running this on Raspberry Pi 2, node version v6.5.0, magicmirror@2.0.0

The current url created has a typo that causes the module to only display default weather units (Kelvin). After checking the website (http://openweathermap.org/current), there is no "/" at this location in the url. Removing it fixes the issue and allows the user to see the specified units in config.js.
2016-09-05 19:06:21 -06:00
Michael Teeuw
e5d384e808 Merge pull request #426 from nhubbard/develop
CII Best Practices
2016-09-05 10:44:03 +02:00
Jens
63351553d8 calendar.js doesn't overcapitalize future events 2016-09-04 14:24:49 +02:00
Jens
4630740ac7 Added 'getRelative' tag 2016-09-04 00:05:02 +02:00
Jens
0ff4884d3a Added 'getRelative' tag 2016-09-03 23:42:24 +02:00
Jens
2dfdedf7b0 Update README.md 2016-09-03 23:40:29 +02:00
Jens
e1fa5fb180 Added 'getRelative' tag 2016-09-03 23:39:32 +02:00
Jens
4e47f9eb68 Added 'getRelative' tag 2016-09-03 23:37:09 +02:00
Jens
c4c8955bc2 Added 'getRelative' tag 2016-09-03 23:36:29 +02:00
Jens
f47b808478 Added calendar.js tweaks (capitalization / 'getRelative' tag) 2016-09-03 23:28:07 +02:00
Jens
493367da5e point of time when calendar event gets relative now customizable 2016-09-03 23:22:51 +02:00
Jens
4ca185cf45 point of time when calendar event gets relative now customizable 2016-09-03 23:22:37 +02:00
Jens
8f4effbb8d poinst of time when calendar event gets relative now customizable 2016-09-03 23:17:46 +02:00
Nicholas Hubbard
a4ba7f277e Add Change to Changelog 2016-09-02 22:00:37 -04:00
Nicholas Hubbard
c3f97a0cf1 Add CII Badge, Remove Node Version 2016-09-02 21:58:22 -04:00
Jens
c1b8fc1233 calendar dates are uniformly capitalized
This is an attempt at standardizing the calendar layout. Currently the calendar times are only partly capitalized, some time phrases start with lower-case letters, some don't (The ones pulled from the TRANSLATIONS folder start with upper-case letters, the others don't). Behavior has been changed to create a more standardized layout.
2016-09-03 00:39:46 +02:00
Michael Teeuw
a481638c03 Add dutch translation 2016-09-01 09:42:33 +02:00
Michael Teeuw
c12dfc7b4d Merge branch 'yo-less-patch-2' into develop 2016-09-01 09:39:34 +02:00
Michael Teeuw
34bc527709 Merge branch 'patch-2' of https://github.com/yo-less/MagicMirror into yo-less-patch-2 2016-09-01 09:38:06 +02:00
yo-less
ee134d0d7c Merge branch 'patch-2' of https://github.com/yo-less/MagicMirror into patch-2 2016-08-31 22:50:09 +02:00
yo-less
f795ee7fd9 Added "day after tomorrow" changes to calendar.js 2016-08-31 22:49:31 +02:00
yo-less
1bba75881f Added 'day after tomorrow'changes to calendar.js 2016-08-31 22:46:54 +02:00
yo-less
34db2d9efa commit changes 2016-08-31 22:45:12 +02:00
yo-less
91dd308952 Added 'day after tomorrow' changes to calendar.js 2016-08-31 22:43:27 +02:00
Jens
3d97e26cde Delete CHANGELOG.md 2016-08-31 22:40:50 +02:00
Jens
104c1ecbec Added "day after tomorrow" changes to calendar.js 2016-08-31 22:18:30 +02:00
Jens
88266ec4e3 Added "day after tomorrow" changes to calendar.js 2016-08-31 22:17:43 +02:00
Jens
f5be159187 Added "DAYAFTERTOMORROW" tag if available 2016-08-31 22:11:31 +02:00
Jens
1194d86460 Merge pull request #1 from yo-less/patch-1
Added "DAYAFTERTOMORROW" tag if config language is German
2016-08-31 14:49:44 +02:00
Jens
76d6dca63f Added "Übermorgen" to show in calendar.js 2016-08-31 14:41:49 +02:00
Jens
1b69e62e2e Added "DAYAFTERTOMORROW" tag if config language is German 2016-08-31 14:39:37 +02:00
Michael Teeuw
e89839359f Merge pull request #422 from Platimir/patch-1
Update README.md
2016-08-30 16:08:01 +02:00
Platimir
177d113cd9 Update README.md 2016-08-30 15:57:52 +02:00
Andrew McOlash
853fa87012 Slight change to padding of humidity icon, just too much before 2016-08-28 01:58:56 -05:00
Andrew McOlash
a592ca25ff Add in icon for the current humidity 2016-08-28 01:52:08 -05:00
Michael Teeuw
a8c9926fa7 Merge pull request #420 from yo-less/patch-1
Updated README.md
2016-08-27 20:58:21 +02:00
Jens
bf5587fe09 Updated README.md
Fixed minor typo
2016-08-27 20:35:00 +02:00
Michael Teeuw
7c8a27e894 Merge pull request #419 from yo-less/patch-1
Updated README.md
2016-08-27 13:55:28 +02:00
Jens
d248b11ffc Updated README.md
Fixed inconsistencies in tag removal instructions.
2016-08-27 13:48:33 +02:00
Michael Teeuw
1282e010ee Merge pull request #417 from yo-less/patch-1
Updated README.md
2016-08-27 13:29:06 +02:00
Michael Teeuw
d5d1ca948e Merge pull request #418 from yo-less/patch-2
Updated CHANGELOG.md
2016-08-27 13:28:55 +02:00
Jens
a08704e8ed Updated CHANGELOG.md
Added tag removal description for newsfeed items
2016-08-27 13:12:08 +02:00
Jens
2a8c0c0c08 Updated README.md
Fixed inconsistencies in tag removal instructions.
2016-08-27 12:59:00 +02:00
Michael Teeuw
2ae0c98b4c Merge pull request #416 from yo-less/master
Tags at the beginning and/or end of newsfeed items
2016-08-27 12:00:28 +02:00
yo-less
c427050a92 Allow for the removal of feed tags
Added options: both, description, title
2016-08-27 01:16:31 +02:00
yo-less
43a0829f44 Allow for the removal of feed tags
legibility update
2016-08-27 00:37:19 +02:00
yo-less
e9b8b91861 Allow for removal of feed tags
Updated README.md for legibility
2016-08-27 00:35:27 +02:00
yo-less
6f104f5056 Allow for the removal of feed tags
User-specified feed tags in description and title can be removed
2016-08-27 00:32:47 +02:00
yo-less
e720efabdc Updated readme.md / Included more tag 2016-08-26 22:08:23 +02:00
yo-less
45cb770e41 Added option to remove "more" tags in description
Many feed descriptions end with with a link tag to the actual article
online (see http://www.deutschlandfunk.de/die-nachrichten.353.de.rss,
for example). The mirror news description looks strange with this tag in
the end.

I have added an option to remove the tag from the description and
updated the readme.md accordingly.
2016-08-26 22:06:03 +02:00
Michael Teeuw
3f1cc66767 Merge pull request #414 from MichMich/master
Fix typo in NL.json
2016-08-24 09:39:09 +02:00
Michael Teeuw
d1f5118bb5 Merge pull request #413 from mrvanes/patch-1
Update nl.json
2016-08-24 09:35:38 +02:00
Martin
b90f1f786e Update nl.json
Corrected typo
2016-08-24 08:51:49 +02:00
Andrew McOlash
c6f424201b Fix indentation and spacing 2016-08-18 09:32:19 -05:00
Andrew McOlash
a7db8cf7cd Humidity data to the current weather module 2016-08-17 21:51:48 -05: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
290 changed files with 19104 additions and 28090 deletions

View File

@@ -1,7 +1,6 @@
vendor/
vendor/*
!/vendor/vendor.js
/modules/**
!/modules/default/**
!/modules/node_helper
!/modules/node_helper/**
!/modules/default/defaultmodules.js
!/modules/default/defaultmodules.js

View File

@@ -4,11 +4,19 @@
"quotes": ["error", "double"],
"max-len": ["error", 250],
"curly": "error",
"camelcase": ["error", {"properties": "never"}]
"camelcase": ["error", {"properties": "never"}],
"no-trailing-spaces": ["error", {"ignoreComments": false }],
"no-irregular-whitespace": ["error"]
},
"env": {
"browser": true,
"node": true,
"es6": true
}
}
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"globalReturn": true
}
}
}

View File

@@ -3,57 +3,47 @@ Contribution Policy for MagicMirror²
Thanks for contributing to MagicMirror²!
We hold our code to standard, and these standards are documented below.
We hold our code to standard, and these standards are documented below.
First, before you run the linters, you will need to install them all **and** install the development dependencies:
If you wish to run both linters, use `grunt` without any arguments.
```bash
(sudo) npm install -g jscs stylelint html-validator-cli
npm install
```
### JavaScript: Run ESLint
### JavaScript: Run JSCS
We use [ESLint](http://eslint.org) on our JavaScript files.
We use [JSCS](http://jscs.info) on our JavaScript files.
Our ESLint configuration is in our .eslintrc.json and .eslintignore files.
Our JSCS configuration is in our .jscsrc file.
To run JSCS, use `npm run jscs`.
To run ESLint, use `grunt eslint`.
### CSS: Run StyleLint
We use [StyleLint](http://stylelint.io) to lint our CSS. Our configuration is in our .stylelintrc file.
To run StyleLint, use `npm run stylelint`.
To run StyleLint, use `grunt stylelint`.
### HTML: Run HTML Validator
### Submitting Issues
We use [NU Validator](https://validator.w3.org/nu) to validate our HTML. The configuration is in the command in the package.json file.
Please only submit reproducible issues.
To run HTML Validator, use `npm run htmlvalidator`.
## Submitting Issues
Please only submit reproducible issues.
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: [https://forum.magicmirror.builders/category/15/bug-hunt](https://forum.magicmirror.builders/category/15/bug-hunt)
Problems installing or configuring your MagicMirror? Check out: [https://forum.magicmirror.builders/category/10/troubleshooting](https://forum.magicmirror.builders/category/10/troubleshooting)
When submitting a new issue, please supply the following information:
**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]:
**Platform**: Place your platform here... give us your web browser/Electron version *and* your hardware (Raspberry Pi 2/3, Windows, Mac, Linux, System V UNIX).
**Node Version** [ 0.12.13 or later ]:
**Node Version**: Make sure it's version 0.12.13 or later.
**MagicMirror Version** [ V1 / V2-Beta ]:
**MagicMirror Version**: Now that the versions have split, tell us if you are using the PHP version (v1) or the newer JavaScript version (v2).
**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
**Description**: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
**Steps to Reproduce:** List the step by step process to reproduce the issue.
**Steps to Reproduce**: List the step by step process to reproduce the issue.
**Expected Results:** Describe what you expected to see.
**Expected Results**: Describe what you expected to see.
**Actual Results:** Describe what you actually saw.
**Actual Results**: Describe what you actually saw.
**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.)
**Configuration**: What does the used config.js file look like? Don't forget to remove any sensitive information!
**Additional Notes:** Provide any other relevant notes not previously mentioned (optional)
**Additional Notes**: Provide any other relevant notes not previously mentioned. This is optional.

View File

@@ -1,21 +1,24 @@
Please only submit reproducible issues.
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: [https://forum.magicmirror.builders/category/15/bug-hunt](https://forum.magicmirror.builders/category/15/bug-hunt)
Problems installing or configuring your MagicMirror? Check out: [https://forum.magicmirror.builders/category/10/troubleshooting](https://forum.magicmirror.builders/category/10/troubleshooting)
**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]:
When submitting a new issue, please supply the following information:
**Node Version** [ 0.12.13 or later ]:
**Platform**: Place your platform here... give us your web browser/Electron version *and* your hardware (Raspberry Pi 2/3, Windows, Mac, Linux, System V UNIX).
**MagicMirror Version** [ V1 / V2-Beta ]:
**Node Version**: Make sure it's version 0.12.13 or later.
**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
**MagicMirror Version**: Now that the versions have split, tell us if you are using the PHP version (v1) or the newer JavaScript version (v2).
**Steps to Reproduce:** List the step by step process to reproduce the issue.
**Description**: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
**Expected Results:** Describe what you expected to see.
**Steps to Reproduce**: List the step by step process to reproduce the issue.
**Actual Results:** Describe what you actually saw.
**Expected Results**: Describe what you expected to see.
**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.)
**Actual Results**: Describe what you actually saw.
**Additional Notes:** Provide any other relevant notes not previously mentioned (optional)
**Configuration**: What does the used config.js file look like? Don't forget to remove any sensitive information!
**Additional Notes**: Provide any other relevant notes not previously mentioned. This is optional.

View File

@@ -1,9 +1,14 @@
> Please send your PR's the develop branch.
> Don't forget to add the change to changelog.md.
> Please send your pull requests the develop branch.
> Don't forget to add the change to CHANGELOG.md.
* Does the pull request solve a **related** issue? [yes | no]
**Note**: Sometimes the development moves very fast. It is highly
recommended that you update your branch of `develop` before creating a
pull request to send us your changes. This makes everyone's lives
easier (including yours) and helps us out on the development team.
Thanks!
* Does the pull request solve a **related** issue?
* If so, can you reference the issue?
* What does the pull request accomplish? (please list)
* What does the pull request accomplish? Use a list if needed.
* If it includes major visual changes please add screenshots.

19
.gitignore vendored
View File

@@ -16,6 +16,12 @@ jspm_modules
.npm
.node_repl_history
# Visual Studio Code ignoramuses.
.vscode/
# IDE Code ignoramuses.
.idea/
# Various Windows ignoramuses.
Thumbs.db
ehthumbs.db
@@ -53,14 +59,25 @@ Temporary Items
# Various Magic Mirror ignoramuses and anti-ignoramuses.
# Don't ignore the node_helper nore module.
# Don't ignore the node_helper core module.
!/modules/node_helper
!/modules/node_helper/**
# Ignore all modules except the default modules.
/modules/**
!/modules/default
!/modules/default/**
!/modules/README.md**
# Ignore changes to the custom css files.
/css/custom.css
# Vim
## swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
## diff patch
*.orig
*.rej
*.bak

View File

@@ -1,4 +1,5 @@
{
"extends": "stylelint-config-standard",
"font-family-name-quotes": "double-where-recommended"
}
"font-family-name-quotes": "double-where-recommended",
"block-no-empty": false
}

View File

@@ -1,7 +1,18 @@
language: node_js
node_js:
- "6"
- "5.1"
- "7"
before_script:
- yarn danger ci
- npm install grunt-cli -g
script: grunt
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 5
script:
- grunt
- npm run test:unit
- npm run test:e2e
after_script:
- npm list
cache:
directories:
- node_modules

View File

@@ -1,12 +1,355 @@
# MagicMirror² Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
---
## [2.4.0] - 2018-07-01
⚠️ **Warning:** This release includes an updated version of Electron. This requires a Raspberry Pi configuration change to allow the best performance and prevent the CPU from overheating. Please read the information on the [MagicMirror Wiki](https://github.com/michmich/magicmirror/wiki/configuring-the-raspberry-pi#enable-the-open-gl-driver-to-decrease-electrons-cpu-usage).
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
### Added
- Enabled translation of feelsLike for module currentweather
- Added support for on-going calendar events
- Added scroll up in fullscreen newsfeed article view
- Changed fullscreen newsfeed width from 100% to 100vw (better results)
- Added option to calendar module that colors only the symbol instead of the whole line
- Added option for new display format in the calendar module with date headers with times/events below.
- Ability to fetch compliments from a remote server
- Add regex filtering to calendar module
- Customize classes for table
- Added option to newsfeed module to only log error parsing a news article if enabled
- Add update translations for Português Brasileiro
### Changed
- Upgrade to Electron 2.0.0.
- Remove yarn-or-npm which breaks production builds.
- Invoke module suspend even if no dom content. [#1308](https://github.com/MichMich/MagicMirror/issues/1308)
### Fixed
- Fixed issue where wind chill could not be displayed in Fahrenheit. [#1247](https://github.com/MichMich/MagicMirror/issues/1247)
- Fixed issues where a module crashes when it tries to dismiss a non existing alert. [#1240](https://github.com/MichMich/MagicMirror/issues/1240)
- In default module currentWeather/currentWeather.js line 296, 300, self.config.animationSpeed can not be found because the notificationReceived function does not have "self" variable.
- Fixed browser-side code to work on the Midori browser.
- Fixed issue where heat index was reporting incorrect values in Celsius and Fahrenheit. [#1263](https://github.com/MichMich/MagicMirror/issues/1263)
- Fixed weatherforecast to use dt_txt field instead of dt to handle timezones better
- Newsfeed now remembers to show the description when `"ARTICLE_LESS_DETAILS"` is called if the user wants to always show the description. [#1282](https://github.com/MichMich/MagicMirror/issues/1282)
- `clientonly/*.js` is now linted, and one linting error is fixed
- Fix issue #1196 by changing underscore to hyphen in locale id, in align with momentjs.
- Fixed issue where heat index and wind chill were reporting incorrect values in Kelvin. [#1263](https://github.com/MichMich/MagicMirror/issues/1263)
### Updated
- Updated Italian translation
- Updated German translation
- Updated Dutch translation
## [2.3.1] - 2018-04-01
### Fixed
- Downgrade electron to 1.4.15 to solve the black screen issue.[#1243](https://github.com/MichMich/MagicMirror/issues/1243)
## [2.3.0] - 2018-04-01
### Added
- Add new settings in compliments module: setting time intervals for morning and afternoon
- Add system notification `MODULE_DOM_CREATED` for notifying each module when their Dom has been fully loaded.
- Add types for module.
- Implement Danger.js to notify contributors when CHANGELOG.md is missing in PR.
- Allow to scroll in full page article view of default newsfeed module with gesture events from [MMM-Gestures](https://github.com/thobach/MMM-Gestures)
- Changed 'compliments.js' - update DOM if remote compliments are loaded instead of waiting one updateInterval to show custom compliments
- Automated unit tests utils, deprecated, translator, cloneObject(lockstrings)
- Automated integration tests translations
- Add advanced filtering to the excludedEvents configuration of the default calendar module
- New currentweather module config option: `showFeelsLike`: Shows how it actually feels like. (wind chill or heat index)
- New currentweather module config option: `useKMPHwind`: adds an option to see wind speed in Kmph instead of just m/s or Beaufort.
- Add dc:date to parsing in newsfeed module, which allows parsing of more rss feeds.
### Changed
- Add link to GitHub repository which contains the respective Dockerfile.
- Optimized automated unit tests cloneObject, cmpVersions
- Update notifications use now translation templates instead of normal strings.
- Yarn can be used now as an installation tool
- Changed Electron dependency to v1.7.13.
### Fixed
- News article in fullscreen (iframe) is now shown in front of modules.
- Forecast respects maxNumberOfDays regardless of endpoint.
- Fix exception on translation of objects.
## [2.2.2] - 2018-01-02
### Added
- Add missing `package-lock.json`.
### Changed
- Changed Electron dependency to v1.7.10.
## [2.2.1] - 2018-01-01
### Fixed
- Fixed linting errors.
## [2.2.0] - 2018-01-01
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
### Changed
- Calender week is now handled with a variable translation in order to move number language specific.
- Reverted the Electron dependency back to 1.4.15 since newer version don't seem to work on the Raspberry Pi very well.
### Added
- Add option to use [Nunjucks](https://mozilla.github.io/nunjucks/) templates in modules. (See `helloworld` module as an example.)
- Add Bulgarian translations for MagicMirror² and Alert module.
- Add graceful shutdown of modules by calling `stop` function of each `node_helper` on SIGINT before exiting.
- Link update subtext to Github diff of current version versus tracking branch.
- Add Catalan translation.
- Add ability to filter out newsfeed items based on prohibited words found in title (resolves #1071)
- Add options to truncate description support of a feed in newsfeed module
- Add reloadInterval option for particular feed in newsfeed module
- Add no-cache entries of HTTP headers in newsfeed module (fetcher)
- Add Czech translation.
- Add option for decimal symbols other than the decimal point for temperature values in both default weather modules: WeatherForecast and CurrentWeather.
### Fixed
- Fixed issue with calendar module showing more than `maximumEntries` allows
- WeatherForecast and CurrentWeather are now using HTTPS instead of HTTP
- Correcting translation for Indonesian language
- Fix issue where calendar icons wouldn't align correctly
## [2.1.3] - 2017-10-01
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
### Changed
- Remove Roboto fonts files inside `fonts` and these are installed by npm install command.
### Added
- Add `clientonly` script to start only the electron client for a remote server.
- Add symbol and color properties of event when `CALENDAR_EVENTS` notification is broadcasted from `default/calendar` module.
- Add `.vscode/` folder to `.gitignore` to keep custom Visual Studio Code config out of git.
- Add unit test the capitalizeFirstLetter function of newfeed module.
- Add new unit tests for function `shorten` in calendar module.
- Add new unit tests for function `getLocaleSpecification` in calendar module.
- Add unit test for js/class.js.
- Add unit tests for function `roundValue` in currentweather module.
- Add test e2e showWeek feature in spanish language.
- Add warning Log when is used old authentication method in the calendar module.
- Add test e2e for helloworld module with default config text.
- Add ability for `currentweather` module to display indoor humidity via INDOOR_HUMIDITY notification.
- Add Welsh (Cymraeg) translation.
- Add Slack badge to Readme.
### Updated
- Changed 'default.js' - listen on all attached interfaces by default.
- Add execution of `npm list` after the test are ran in Travis CI.
- Change hooks for the vendors e2e tests.
- Add log when clientonly failed on starting.
- Add warning color when are using full ip whitelist.
- Set version of the `express-ipfilter` on 0.3.1.
### Fixed
- Fixed issue with incorrect allignment of analog clock when displayed in the center column of the MM.
- Fixed ipWhitelist behaviour to make empty whitelist ([]) allow any and all hosts access to the MM.
- Fixed issue with calendar module where 'excludedEvents' count towards 'maximumEntries'.
- Fixed issue with calendar module where global configuration of maximumEntries was not overridden by calendar specific config (see module doc).
- Fixed issue where `this.file(filename)` returns a path with two hashes.
- Workaround for the WeatherForecast API limitation.
## [2.1.2] - 2017-07-01
### Changed
- Revert Docker related changes in favor of [docker-MagicMirror](https://github.com/bastilimbach/docker-MagicMirror). All Docker images are outsourced. ([#856](https://github.com/MichMich/MagicMirror/pull/856))
- Change Docker base image (Debian + Node) to an arm based distro (AlpineARM + Node) ([#846](https://github.com/MichMich/MagicMirror/pull/846))
- Fix the dockerfile to have it running from the first time.
### Added
- Add in option to wrap long calendar events to multiple lines using `wrapEvents` configuration option.
- Add test e2e `show title newsfeed` for newsfeed module.
- Add task to check configuration file.
- Add test check URLs of vendors.
- Add test of match current week number on clock module with showWeek configuration.
- Add test default modules present modules/default/defaultmodules.js.
- Add unit test calendar_modules function capFirst.
- Add test for check if exists the directories present in defaults modules.
- Add support for showing wind direction as an arrow instead of abbreviation in currentWeather module.
- Add support for writing translation fucntions to support flexible word order
- Add test for check if exits the directories present in defaults modules.
- Add calendar option to set a separate date format for full day events.
- Add ability for `currentweather` module to display indoor temperature via INDOOR_TEMPERATURE notification
- Add ability to change the path of the `custom.css`.
- Add translation Dutch to Alert module.
- Added Romanian translation.
### Updated
- Added missing keys to Polish translation.
- Added missing key to German translation.
- Added better translation with flexible word order to Finnish translation.
### Fixed
- Fix instruction in README for using automatically installer script.
- Bug of duplicated compliments as described in [here](https://forum.magicmirror.builders/topic/2381/compliments-module-stops-cycling-compliments).
- Fix double message about port when server is starting
- Corrected Swedish translations for TODAY/TOMORROW/DAYAFTERTOMORROW.
- Removed unused import from js/electron.js
- Made calendar.js respect config.timeFormat irrespecive of locale setting.
- Fixed alignment of analog clock when a large calendar is displayed in the same side bar.
## [2.1.1] - 2017-04-01
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
### Changed
- Add `anytime` group for Compliments module.
- Compliments module can use remoteFile without default daytime arrays defined.
- Installer: Use init config.js from config.js.sample.
- Switched out `rrule` package for `rrule-alt` and fixes in `ical.js` in order to fix calendar issues. ([#565](https://github.com/MichMich/MagicMirror/issues/565))
- Make mouse events pass through the region fullscreen_above to modules below.
- Scaled the splash screen down to make it a bit more subtle.
- Replace HTML tables with markdown tables in README files.
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
- Run `npm test` on Travis automatically.
- Show the splash screen image even when is reboot or halted.
- Added some missing translaton strings in the sv.json file.
- Run task jsonlint to check translation files.
- Restructured Test Suite.
### Added
- Added Docker support (Pull Request [#673](https://github.com/MichMich/MagicMirror/pull/673)).
- Calendar-specific support for `maximumEntries`, and ` maximumNumberOfDays`.
- Add loaded function to modules, providing an async callback.
- Made default newsfeed module aware of gesture events from [MMM-Gestures](https://github.com/thobach/MMM-Gestures)
- Add use pm2 for manager process into Installer RaspberryPi script.
- Russian Translation.
- Afrikaans Translation.
- Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM.
- Init tests using mocha.
- Option to use RegExp in Calendar's titleReplace.
- Hungarian Translation.
- Icelandic Translation.
- Add use a script to prevent when is run by SSH session set DISPLAY enviroment.
- Enable ability to set configuration file by the enviroment variable called MM_CONFIG_FILE.
- Option to give each calendar a different color.
- Option for colored min-temp and max-temp.
- Add test e2e helloworld.
- Add test e2e enviroment.
- Add `chai-as-promised` npm module to devDependencies.
- Basic set of tests for clock module.
- Run e2e test in Travis.
- Estonian Translation.
- Add test for compliments module for parts of day.
- Korean Translation.
- Added console warning on startup when deprecated config options are used.
- Add option to display temperature unit label to the current weather module.
- Added ability to disable wrapping of news items.
- Added in the ability to hide events in the calendar module based on simple string filters.
- Updated Norwegian translation.
- Added hideLoading option for News Feed module.
- Added configurable dateFormat to clock module.
- Added multiple calendar icon support.
- Added tests for Translations, dev argument, version, dev console.
- Added test anytime feature compliments module.
- Added test ipwhitelist configuration directive.
- Added test for calendar module: default, basic-auth, backward compability, fail-basic-auth.
- Added meta tags to support fullscreen mode on iOS (for server mode)
- Added `ignoreOldItems` and `ignoreOlderThan` options to the News Feed module
- Added test for MM_PORT enviroment variable.
- Added a configurable Week section to the clock module.
### Fixed
- Update .gitignore to not ignore default modules folder.
- Remove white flash on boot up.
- Added `update` in Raspberry Pi installation script.
- Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611))
- If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit.
- Module currentWeather: check if temperature received from api is defined.
- Fix an issue with module hidden status changing to `true` although lock string prevented showing it.
- Fix newsfeed module bug (removeStartTags)
- Fix when is set MM_PORT enviroment variable.
- Fixed missing animation on `this.show(speed)` when module is alone in a region.
## [2.1.0] - 2016-12-31
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
### Added
- Finnish translation.
- Danish translation.
- Turkish translation.
- Option to limit access to certain IP addresses based on the value of `ipWhitelist` in the `config.js`, default is access from localhost only (Issue [#456](https://github.com/MichMich/MagicMirror/issues/456)).
- Added ability to change the point of time when calendar events get relative.
- Add Splash screen on boot.
- Add option to show humidity in currentWeather module.
- Add VSCode IntelliSense support.
- Module API: Add Visibility locking to module system. [See documentation](https://github.com/MichMich/MagicMirror/tree/develop/modules#visibility-locking) for more information.
- Module API: Method to overwrite the module's header. [See documentation](https://github.com/MichMich/MagicMirror/tree/develop/modules#getheader) for more information.
- Module API: Option to define the minimum MagicMirror version to run a module. [See documentation](https://github.com/MichMich/MagicMirror/tree/develop/modules#requiresversion) for more information.
- Calendar module now broadcasts the event list to all other modules using the notification system. [See documentation](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/calendar) for more information.
- Possibility to use the the calendar feed as the source for the weather (currentweather & weatherforecast) location data. [See documentation](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/weatherforecast) for more information.
- Added option to show rain amount in the weatherforecast default module
- Add module `updatenotification` to get an update whenever a new version is availabe. [See documentation](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/updatenotification) for more information.
- Add the abilty to set timezone on the date display in the Clock Module
- Ability to set date format in calendar module
- Possibility to use currentweather for the compliments
- Added option `disabled` for modules.
- Added option `address` to set bind address.
- Added option `onlyTemp` for currentweather module to show show only current temperature and weather icon.
- Added option `remoteFile` to compliments module to load compliment array from filesystem.
- Added option `zoom` to scale the whole mirror display with a given factor.
- Added option `roundTemp` for currentweather and weatherforecast modules to display temperatures rounded to nearest integer.
- Added abilty set the classes option to compliments module for style and text size of compliments.
- Added ability to configure electronOptions
- Calendar module: option to hide private events
- Add root_path for global vars
### Updated
- Modified translations for Frysk.
- Modified core English translations.
- Updated package.json as a result of Snyk security update.
- Improve object instantiation to prevent reference errors.
- Improve logger. `Log.log()` now accepts multiple arguments.
- Remove extensive logging in newsfeed node helper.
- Calendar times are now uniformly capitalized.
- Modules are now secure, and Helmet is now used to prevent abuse of the Mirror's API.
### Fixed
- Solve an issue where module margins would appear when the first module of a section was hidden.
- Solved visual display errors on chrome, if all modules in one of the right sections are hidden.
- Global and Module default config values are no longer modified when setting config values.
- Hide a region if all modules in a region are hidden. Prevention unwanted margins.
- Replaced `electron-prebuilt` package with `electron` in order to fix issues that would happen after 2017.
- Documentation of alert module
## [2.0.5] - 2016-09-20
### Added
- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'.
- Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included).
- Added CII Badge (we are compliant with the CII Best Practices)
- Add support for doing http basic auth when loading calendars
- Add the abilty to turn off and on the date display in the Clock Module
### Fixed
- Fix typo in installer.
- Add message to unsupported Pi error to mention that Pi Zeros must use server only mode, as ARMv6 is unsupported. Closes #374.
- Fix API url for weather API.
### Updated
- Force fullscreen when kioskmode is active.
- Update the .github templates and information with more modern information.
- Update the Gruntfile with a more functional StyleLint implementation.
## [2.0.4] - 2016-08-07
### Added
- Brazilian Portuguese Translation.
- Option to enable Kios mode.
- Option to enable Kiosk mode.
- Added ability to start the app with Dev Tools.
- Added ability to turn off the date display in `clock.js` when in analog mode.
- Greek Translation
@@ -47,7 +390,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Added reference to Italian Translation.
- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344)
- Added the missing NE translation to all languages. [#344](https://github.com/MichMich/MagicMirror/issues/344)
- Added proper User-Agent string to calendar call.
### Changed
@@ -71,4 +414,4 @@ It includes (but is not limited to) the following features:
## [1.0.0] - 2014-02-16
### Initial release of MagicMirror.
This was part of the blogpost: http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the
This was part of the blogpost: [http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the](http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the)

View File

@@ -6,23 +6,99 @@ module.exports = function(grunt) {
options: {
configFile: ".eslintrc.json"
},
target: ["js/*.js", "modules/default/*.js", "serveronly/*.js", "*.js"]
target: [
"js/*.js",
"modules/default/*.js",
"modules/default/*/*.js",
"serveronly/*.js",
"clientonly/*.js",
"*.js",
"tests/**/*.js",
"!modules/default/alert/notificationFx.js",
"!modules/default/alert/modernizr.custom.js",
"!modules/default/alert/classie.js",
"config/*",
"translations/translations.js",
"vendor/vendor.js",
"modules/node_modules/node_helper/index.js"
]
},
postcss: {
lint: {
stylelint: {
simple: {
options: {
processors: [
require("stylelint")({"extends": "stylelint-config-standard", "font-family-name-quotes": "double-where-recommended"}),
require("postcss-reporter")({ clearMessages: true })
]
configFile: ".stylelintrc"
},
dist: {
src: "**/**/**/**/**/**/**/**.css"
src: [
"css/main.css",
"modules/default/calendar/calendar.css",
"modules/default/clock/clock_styles.css",
"modules/default/currentweather/currentweather.css",
"modules/default/weatherforcast/weatherforcast.css"
]
}
},
jsonlint: {
main: {
src: [
"package.json",
".eslintrc.json",
".stylelintrc",
"translations/*.json",
"modules/default/*/translations/*.json",
"installers/pm2_MagicMirror.json",
"vendor/package.js"
],
options: {
reporter: "jshint"
}
}
},
markdownlint: {
all: {
options: {
config: {
"default": true,
"line-length": false,
"blanks-around-headers": false,
"no-duplicate-header": false,
"no-inline-html": false,
"MD010": false,
"MD001": false,
"MD031": false,
"MD040": false,
"MD002": false,
"MD029": false,
"MD041": false,
"MD032": false,
"MD036": false,
"MD037": false,
"MD009": false,
"MD018": false,
"MD012": false,
"MD026": false,
"MD038": false
}
},
src: [
"README.md",
"CHANGELOG.md",
"LICENSE.md",
"modules/README.md",
"modules/default/**/*.md",
"!modules/default/calendar/vendor/ical.js/readme.md"
]
}
},
yamllint: {
all: [
".travis.yml"
]
}
});
grunt.loadNpmTasks("grunt-eslint");
grunt.loadNpmTasks("grunt-postcss");
grunt.registerTask("default", ["eslint", "postcss:lint"]);
};
grunt.loadNpmTasks("grunt-stylelint");
grunt.loadNpmTasks("grunt-jsonlint");
grunt.loadNpmTasks("grunt-yamllint");
grunt.loadNpmTasks("grunt-markdownlint");
grunt.registerTask("default", ["eslint", "stylelint", "jsonlint", "markdownlint", "yamllint"]);
};

View File

@@ -1,7 +1,7 @@
The MIT License (MIT)
=====================
Copyright © 2016 Michael Teeuw
Copyright © 2016-2017 Michael Teeuw
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

164
README.md
View File

@@ -3,10 +3,11 @@
<p align="center">
<a href="https://david-dm.org/MichMich/MagicMirror"><img src="https://david-dm.org/MichMich/MagicMirror.svg" alt="Dependency Status"></a>
<a href="https://david-dm.org/MichMich/MagicMirror#info=devDependencies"><img src="https://david-dm.org/MichMich/MagicMirror/dev-status.svg" alt="devDependency Status"></a>
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-v5.10.1-brightgreen.svg" alt="Node Version"></a>
<a href="https://bestpractices.coreinfrastructure.org/projects/347"><img src="https://bestpractices.coreinfrastructure.org/projects/347/badge"></a>
<a href="http://choosealicense.com/licenses/mit"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
<a href="https://travis-ci.org/MichMich/MagicMirror"><img src="https://travis-ci.org/MichMich/MagicMirror.svg" alt="Travis"></a>
<a href="https://snyk.io/test/github/MichMich/MagicMirror"><img src="https://snyk.io/test/github/MichMich/MagicMirror/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/MichMich/MagicMirror" style="max-width:100%;"></a>
<a href="http://slack.magicmirror.builders"><img src="http://slack.magicmirror.builders:3000/badge.svg" alt="Slack Status"></a>
</p>
**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant. **MagicMirror²** is built by the creator of [the original MagicMirror](http://michaelteeuw.nl/tagged/magicmirror) with the incredible help of a [growing community of contributors](https://github.com/MichMich/MagicMirror/graphs/contributors).
@@ -15,82 +16,140 @@ MagicMirror² focuses on a modular plugin system and uses [Electron](http://elec
## Table Of Contents
- [Usage](#usage)
- [Installation](#installation)
- [Raspberry Pi](#raspberry-pi)
- [General](#general)
- [Server Only](#server-only)
- [Client Only](#client-only)
- [Docker](#docker)
- [Configuration](#configuration)
- [Modules](#modules)
- [Updating](#updating)
- [Known Issues](#known-issues)
- [community](#community)
- [Community](#community)
- [Contributing Guidelines](#contributing-guidelines)
- [Manifesto](#manifesto)
## Usage
## Installation
#### Raspberry Pi Support
Electron, the app wrapper around MagicMirror², only supports the Raspberry Pi 2 & 3. The Raspberry Pi 1 is currently **not** supported. If you want to run this on a Raspberry Pi 1, use the [server only](#server-only) feature and setup a fullscreen browser yourself.
### Raspberry Pi
#### Automatic Installer (Raspberry Pi Only!)
#### Automatic Installation (Raspberry Pi only!)
*Electron*, the app wrapper around MagicMirror², only supports the Raspberry Pi 2/3. The Raspberry Pi 0/1 is currently **not** supported. If you want to run this on a Raspberry Pi 1, use the [server only](#server-only) feature and setup a fullscreen browser yourself. (Yes, people have managed to run MM² also on a Pi0, so if you insist, search in the forums.)
Note that you will need to install the lastest full version of Raspbian, **don't use the Lite version**.
Execute the following command on your Raspberry Pi to install MagicMirror²:
````
curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash
````
```bash
bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"
```
#### Manual Installation
1. Download and install the latest Node.js version.
2. Clone the repository and check out the beta branch: `git clone https://github.com/MichMich/MagicMirror`
3. Enter the repository: `cd ~/MagicMirror`
4. Install and run the app: `npm install && npm start`
1. Download and install the latest *Node.js* version.
2. Clone the repository and check out the master branch: `git clone https://github.com/MichMich/MagicMirror`
3. Enter the repository: `cd MagicMirror/`
4. Install and run the app with: `npm install && npm start` \
For **Server Only** use: `npm install && node serveronly` .
**Important:** `npm start` does **not** work via SSH, use `DISPLAY=:0 nohup npm start &` instead. This starts the mirror on the remote display.
**Note:** if you want to debug on Raspberry Pi you can use `npm start dev` which will start the MagicMirror app with Dev Tools enabled.
**:warning: Important!**
#### Server Only
- **The installation step for `npm install` will take a very long time**, often with little or no terminal response! \
For the RPi3 this is **~10** minutes and for the Rpi2 **~25** minutes. \
Do not interrupt or you risk getting a :broken_heart: by Raspberry Jam.
In some cases, you want to start the application without an actual app window. In this case, execute the following command from the MagicMirror folder: `node serveronly`. This will start the server, after which you can open the application in your browser of choice.
#### Raspberry Configuration & Auto Start.
Also note that:
The following wiki links are helpful in the configuration of your MagicMirror² operating system:
- [Configuring the Raspberry Pi](https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi)
- [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror)
- `npm start` does **not** work via SSH. But you can use `DISPLAY=:0 nohup npm start &` instead. \
This starts the mirror on the remote display.
- If you want to debug on Raspberry Pi you can use `npm start dev` which will start MM with *Dev Tools* enabled.
- To access toolbar menu when in mirror mode, hit `ALT` key.
- To toggle the (web) `Developer Tools` from mirror mode, use `CTRL-SHIFT-I` or `ALT` and select `View`.
#### Updating you MagicMirror²
If you want to update your MagicMirror² to the latest version, use your terminal to go to your Magic Mirror folder and type the following command:
### Server Only
````
git pull
````
In some cases, you want to start the application without an actual app window. In this case, you can start MagicMirror² in server only mode by manually running `node serveronly` or using Docker. This will start the server, after which you can open the application in your browser of choice. Detailed description below.
**Important:** Make sure that you whitelist the interface/ip (`ipWhitelist`) in the server config where you want the client to connect to, otherwise it will not be allowed to connect to the server. You also need to set the local host `address` field to `0.0.0.0` in order for the RPi to listen on all interfaces and not only `localhost` (default).
```javascript
var config = {
address: "0.0.0.0", // default is "localhost"
port: 8080, // default
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:172.17.0.1"], // default -- need to add your IP here
...
};
```
### Client Only
This is when you already have a server running remotely and want your RPi to connect as a standalone client to this instance, to show the MM from the server. Then from your RPi, you run it with: `node clientonly --address 192.168.1.5 --port 8080`. (Specify the ip address and port number of the server)
### Docker
MagicMirror² in server only mode can be deployed using [Docker](https://docker.com). After a successful [Docker installation](https://docs.docker.com/engine/installation/) you just need to execute the following command in the shell:
```bash
docker run -d \
--publish 80:8080 \
--restart always \
--volume ~/magic_mirror/config:/opt/magic_mirror/config \
--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
--name magic_mirror \
bastilimbach/docker-magicmirror
```
To get more information about the available Dockerfile versions and configurations head over to the respective [GitHub repository](https://github.com/bastilimbach/docker-MagicMirror).
If you changed nothing more than the config or the modules, this should work without any problems.
Type `git status` to see your changes, if there are any, you can reset them with `git reset --hard`. After that, git pull should be possible.
## Configuration
1. Duplicate `config/config.js.sample` to `config/config.js`.
2. Modify your required settings.
### Raspberry Specific
The following wiki links are helpful for the initial configuration of your MagicMirror² operating system:
- [Configuring the Raspberry Pi](https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi)
- [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror)
### General
1. Copy `/home/pi/MagicMirror/config/config.js.sample` to `/home/pi/MagicMirror/config/config.js`. \
**Note:** If you used the installer script. This step is already done for you.
2. Modify your required settings. \
Note: You'll can check your configuration running `npm run config:check` in `/home/pi/MagicMirror`.
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`|
| `address` | The *interface* ip address on which to accept connections. The default is `localhost`, which would prevent exposing the built-in webserver to machines on the local network. To expose it to other machines, use: `0.0.0.0`. |
| `ipWhitelist` | The list of IPs from which you are allowed to access the MagicMirror². The default value is `["127.0.0.1", "::ffff:127.0.0.1", "::1"]`, which is from `localhost` only. Add your IP when needed. You can also specify IP ranges with subnet masks (`["127.0.0.1", "127.0.0.1/24"]`) or directly with (`["127.0.0.1", ["192.168.0.1", "192.168.0.100"]]`). Set `[]` to allow all IP addresses. For more information see: [follow post ipWhitelist HowTo](https://forum.magicmirror.builders/topic/1326/ipwhitelist-howto) |
| `zoom` | This allows to scale the mirror contents with a given zoom factor. The default value is `1.0`|
| `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`. |
| `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** |
| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `kiosk = true`, `autoHideMenuBar = false` and `fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). |
| `customCss` | The path of the `custom.css` stylesheet. The default is `css/custom.css`. |
Module configuration:
| **Option** | **Description** |
| --- | --- |
| `module` | The name of the module. This can also contain the subfolder. Valid examples include `clock`, `default/calendar` and `custommodules/mymodule`. |
| `position` | The location of the module in which the module will be loaded. Possible values are `top_ bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file. |
| `position` | The location of the module in which the module will be loaded. Possible values are `top_bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file. |
| `classes` | Additional classes which are passed to the module. The field is optional. |
| `header` | To display a header text above the module, add the header property. This field is optional. |
| `disabled` | Set disabled to `true` to skip creating the module. This field is optional. |
| `config` | An object with the module configuration properties. Check the documentation of the module for more information. This field is optional, unless the module requires extra configuration. |
## Modules
@@ -106,12 +165,20 @@ The following modules are installed by default.
- [**Hello World**](modules/default/helloworld)
- [**Alert**](modules/default/alert)
For more available modules, check out out the wiki page: [MagicMirror² Modules](https://github.com/MichMich/MagicMirror/wiki/MagicMirror²-Modules). If you want to build your own modules, check out the [MagicMirror² Module Development Documentation](modules) and don't forget to add it to the wiki and the [forum](https://forum.magicmirror.builders/category/7/showcase)!
For more available modules, check out out the wiki page [MagicMirror² 3rd Party Modules](https://github.com/MichMich/MagicMirror/wiki/3rd-party-modules). If you want to build your own modules, check out the [MagicMirror² Module Development Documentation](modules) and don't forget to add it to the wiki and the [forum](https://forum.magicmirror.builders/category/7/showcase)!
## Known issues
- Electron seems to have some issues on certain Raspberry Pi 2's. See [#145](https://github.com/MichMich/MagicMirror/issues/145).
- MagicMirror² (Electron) sometimes quits without an error after an extended period of use. See [#150](https://github.com/MichMich/MagicMirror/issues/150).
## Updating
If you want to update your MagicMirror² to the latest version, use your terminal to go to your Magic Mirror folder and type the following command:
```bash
git pull && npm install
```
If you changed nothing more than the config or the modules, this should work without any problems.
Type `git status` to see your changes, if there are any, you can reset them with `git reset --hard`. After that, git pull should be possible.
## Community
@@ -129,3 +196,24 @@ 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!
## Manifesto
A real Manifesto is still to be written. Till then, Michael's response on [one of the repository issues](https://github.com/MichMich/MagicMirror/issues/1174) gives a great summary:
> "... I started this project as an ultimate starter project for Raspberry Pi enthusiasts. As a matter of fact, for most of the contributors, the MagicMirror project is the first open source project they ever contributed to. This is one of the reasons why the MagicMirror project is featured in several RasPi magazines.
>
>The project has a lot of opportunities for improvement. We could use a powerful framework like Vue to ramp up the development speed. We could use SASS for better/easier css implementations. We could make it an NPM installable package. And as you say, we could bundle it up. The big downside of of of these changes is that it over complicates things: a user no longer will be able to open just one file and make a small modification and see how it works out.
>
>Of course, a bundled version can be complimentary to the regular un-bundled version. And I'm sure a lot of (new) users will opt for the bundled version. But this means those users won't be motivated to take a peek under the hood. They will just remain 'users'. They won't become contributors, and worse: they won't be motivated to take their first steps in software development.
>
>And to be honest: motivating curious users to step out of their comfort zone and take those first steps is what drives me in this project. Therefor my ultimate goal is this project is to keep it as accessible as possible."
>
> ~ Michael Teeuw
<p align="center">
<br>
<a href="https://forum.magicmirror.builders/topic/728/magicmirror-is-voted-number-1-in-the-magpi-top-50"><img src="https://magicmirror.builders/img/magpi-best-watermark-custom.png" width="150" alt="MagPi Top 50"></a>
</p>

104
clientonly/index.js Normal file
View File

@@ -0,0 +1,104 @@
/* jshint esversion: 6 */
"use strict";
// Use seperate scope to prevent global scope pollution
(function () {
var config = {};
// Helper function to get server address/hostname from either the commandline or env
function getServerAddress() {
// Helper function to get command line parameters
// Assumes that a cmdline parameter is defined with `--key [value]`
function getCommandLineParameter(key, defaultValue = undefined) {
var index = process.argv.indexOf(`--${key}`);
var value = index > -1 ? process.argv[index + 1] : undefined;
return value !== undefined ? String(value) : defaultValue;
}
// Prefer command line arguments over environment variables
["address", "port"].forEach((key) => {
config[key] = getCommandLineParameter(key, process.env[key.toUpperCase()]);
})
}
function getServerConfig(url) {
// Return new pending promise
return new Promise((resolve, reject) => {
// Select http or https module, depending on reqested url
const lib = url.startsWith("https") ? require("https") : require("http");
const request = lib.get(url, (response) => {
var configData = "";
// Gather incomming data
response.on("data", function(chunk) {
configData += chunk;
});
// Resolve promise at the end of the HTTP/HTTPS stream
response.on("end", function() {
resolve(JSON.parse(configData));
});
});
request.on("error", function(error) {
reject(new Error(`Unable to read config from server (${url} (${error.message}`));
});
})
};
function fail(message, code = 1) {
if (message !== undefined && typeof message === "string") {
console.log(message);
} else {
console.log("Usage: 'node clientonly --address 192.168.1.10 --port 8080'");
}
process.exit(code);
}
getServerAddress();
(config.address && config.port) || fail();
// Only start the client if a non-local server was provided
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].indexOf(config.address) === -1) {
getServerConfig(`http://${config.address}:${config.port}/config/`)
.then(function (config) {
// Pass along the server config via an environment variable
var env = Object.create(process.env);
var options = { env: env };
config.address = config.address;
config.port = config.port;
env.config = JSON.stringify(config);
// Spawn electron application
const electron = require("electron");
const child = require("child_process").spawn(electron, ["js/electron.js"], options);
// Pipe all child process output to current stdout
child.stdout.on("data", function (buf) {
process.stdout.write(`Client: ${buf}`);
});
// Pipe all child process errors to current stderr
child.stderr.on("data", function (buf) {
process.stderr.write(`Client: ${buf}`);
});
child.on("error", function (err) {
process.stdout.write(`Client: ${err}`);
});
child.on("close", (code) => {
if (code != 0) {
console.log(`There something wrong. The clientonly is not running code ${code}`);
}
});
})
.catch(function (reason) {
fail(`Unable to connect to server: (${reason})`);
});
} else {
fail();
}
}());

View File

@@ -2,62 +2,80 @@
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
var config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "", "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out, is "localhost"
port: 8080,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
language: 'en',
language: "en",
timeFormat: 24,
units: 'metric',
units: "metric",
modules: [
{
module: 'alert',
module: "alert",
},
{
module: 'clock',
position: 'top_left'
module: "updatenotification",
position: "top_bar"
},
{
module: 'calendar',
header: 'US Holidays',
position: 'top_left',
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "US Holidays",
position: "top_left",
config: {
calendars: [
{
symbol: 'calendar-check-o ',
url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
symbol: "calendar-check-o ",
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
}
]
}
},
{
module: 'compliments',
position: 'lower_third'
module: "compliments",
position: "lower_third"
},
{
module: 'currentweather',
position: 'top_right',
module: "currentweather",
position: "top_right",
config: {
location: 'New York',
locationID: '', //ID from http://www.openweathermap.org
appid: 'YOUR_OPENWEATHER_API_KEY'
location: "New York",
locationID: "", //ID from http://www.openweathermap.org/help/city_list.txt
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: 'weatherforecast',
position: 'top_right',
header: 'Weather Forecast',
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: 'New York',
locationID: '5128581', //ID from http://www.openweathermap.org
appid: 'YOUR_OPENWEATHER_API_KEY'
location: "New York",
locationID: "5128581", //ID from http://www.openweathermap.org/help/city_list.txt
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: 'newsfeed',
position: 'bottom_bar',
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
@@ -74,4 +92,4 @@ var config = {
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== 'undefined') {module.exports = config;}
if (typeof module !== "undefined") {module.exports = config;}

View File

@@ -1,10 +1,11 @@
html {
cursor: none;
overflow:hidden;
overflow: hidden;
background: #000;
}
::-webkit-scrollbar {
display: none;
::-webkit-scrollbar {
display: none;
}
body {
@@ -94,7 +95,7 @@ body {
header {
text-transform: uppercase;
font-size: 15px;
font-family: "Roboto Condensed";
font-family: "Roboto Condensed", Arial, Helvetica, sans-serif;
font-weight: 400;
border-bottom: 1px solid #666;
line-height: 15px;
@@ -113,11 +114,18 @@ sup {
*/
.module {
margin-top: 30px;
margin-bottom: 30px;
}
.module:first-child {
margin-top: 0;
.region.bottom .module {
margin-top: 30px;
margin-bottom: 0;
}
.no-wrap {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/**
@@ -134,10 +142,16 @@ sup {
left: -60px;
right: -60px;
bottom: -60px;
pointer-events: none;
}
.region.fullscreen * {
pointer-events: auto;
}
.region.right {
right: 0;
text-align: right;
}
.region.top {
@@ -148,6 +162,10 @@ sup {
margin-bottom: 25px;
}
.region.bottom .container {
margin-top: 25px;
}
.region.top .container:empty {
margin-bottom: 0;
}
@@ -172,10 +190,6 @@ sup {
bottom: 0;
}
.region.bottom .container {
margin-top: 25px;
}
.region.bottom .container:empty {
margin-top: 0;
}
@@ -218,10 +232,6 @@ sup {
text-align: left;
}
.region.right {
text-align: right;
}
.region table {
width: 100%;
border-spacing: 0;

17
dangerfile.js Normal file
View File

@@ -0,0 +1,17 @@
import { danger, fail, warn } from "danger"
// Check if the CHANGELOG.md file has been edited
// Fail the build and post a comment reminding submitters to do so if it wasn't changed
if (!danger.git.modified_files.includes("CHANGELOG.md")) {
warn("Please include an updated `CHANGELOG.md` file.<br>This way we can keep track of all the contributions.")
}
// Check if the PR request is send to the master branch.
// This should only be done by MichMich.
if (danger.github.pr.base.ref === "master" && danger.github.pr.user.login !== "MichMich") {
// Check if the PR body or title includes the text: #accepted.
// If not, the PR will fail.
if ((danger.github.pr.body + danger.github.pr.title).includes("#accepted")) {
fail("Please send all your pull requests to the `develop` branch.<br>Pull requests on the `master` branch will not be accepted.")
}
}

View File

@@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

12
fonts/package-lock.json generated Normal file
View File

@@ -0,0 +1,12 @@
{
"name": "magicmirror-fonts",
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"roboto-fontface": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/roboto-fontface/-/roboto-fontface-0.8.0.tgz",
"integrity": "sha512-ZYzRkETgBrdEGzL5JSKimvjI2CX7ioyZCkX2BpcfyjqI+079W0wHAyj5W4rIZMcDSOHgLZtgz1IdDi/vU77KEQ=="
}
}
}

15
fonts/package.json Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "magicmirror-fonts",
"description": "Package for fonts use by MagicMirror Core.",
"repository": {
"type": "git",
"url": "git+https://github.com/MichMich/MagicMirror.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/MichMich/MagicMirror/issues"
},
"dependencies": {
"roboto-fontface": "^0.8.0"
}
}

View File

@@ -5,9 +5,9 @@
src:
local("Roboto Thin"),
local("Roboto-Thin"),
url("Roboto-Thin/Roboto-Thin.woff2") format("woff2"),
url("Roboto-Thin/Roboto-Thin.woff") format("woff"),
url("Roboto-Thin/Roboto-Thin.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.ttf") format("truetype");
}
@font-face {
@@ -17,9 +17,9 @@
src:
local("Roboto Condensed Light"),
local("RobotoCondensed-Light"),
url("RobotoCondensed-Light/RobotoCondensed-Light.woff2") format("woff2"),
url("RobotoCondensed-Light/RobotoCondensed-Light.woff") format("woff"),
url("RobotoCondensed-Light/RobotoCondensed-Light.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.ttf") format("truetype");
}
@font-face {
@@ -29,9 +29,9 @@
src:
local("Roboto Condensed"),
local("RobotoCondensed-Regular"),
url("RobotoCondensed-Regular/RobotoCondensed-Regular.woff2") format("woff2"),
url("RobotoCondensed-Regular/RobotoCondensed-Regular.woff") format("woff"),
url("RobotoCondensed-Regular/RobotoCondensed-Regular.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.ttf") format("truetype");
}
@font-face {
@@ -41,9 +41,9 @@
src:
local("Roboto Condensed Bold"),
local("RobotoCondensed-Bold"),
url("RobotoCondensed-Bold/RobotoCondensed-Bold.woff2") format("woff2"),
url("RobotoCondensed-Bold/RobotoCondensed-Bold.woff") format("woff"),
url("RobotoCondensed-Bold/RobotoCondensed-Bold.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.ttf") format("truetype");
}
@font-face {
@@ -53,9 +53,9 @@
src:
local("Roboto"),
local("Roboto-Regular"),
url("Roboto-Regular/Roboto-Regular.woff2") format("woff2"),
url("Roboto-Regular/Roboto-Regular.woff") format("woff"),
url("Roboto-Regular/Roboto-Regular.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.ttf") format("truetype");
}
@font-face {
@@ -65,9 +65,9 @@
src:
local("Roboto Medium"),
local("Roboto-Medium"),
url("Roboto-Medium/Roboto-Medium.woff2") format("woff2"),
url("Roboto-Medium/Roboto-Medium.woff") format("woff"),
url("Roboto-Medium/Roboto-Medium.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.ttf") format("truetype");
}
@font-face {
@@ -77,9 +77,9 @@
src:
local("Roboto Bold"),
local("Roboto-Bold"),
url("Roboto-Bold/Roboto-Bold.woff2") format("woff2"),
url("Roboto-Bold/Roboto-Bold.woff") format("woff"),
url("Roboto-Bold/Roboto-Bold.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.ttf") format("truetype");
}
@font-face {
@@ -89,7 +89,7 @@
src:
local("Roboto Light"),
local("Roboto-Light"),
url("Roboto-Light/Roboto-Light.woff2") format("woff2"),
url("Roboto-Light/Roboto-Light.woff") format("woff"),
url("Roboto-Light/Roboto-Light.ttf") format("truetype");
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff2") format("woff2"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff") format("woff"),
url("node_modules/roboto-fontface/fonts/roboto/Roboto-Light.ttf") format("truetype");
}

7
fonts/yarn.lock Normal file
View File

@@ -0,0 +1,7 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
roboto-fontface@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/roboto-fontface/-/roboto-fontface-0.8.0.tgz#031a83c8f79932801a57d83bf743f37250163499"

View File

@@ -1,13 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>Magic Mirror</title>
<title>MagicMirror²</title>
<meta name="google" content="notranslate" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="fonts/roboto.css">
<!-- custom.css is loaded by the loader.js to make sure it's loaded after the module css files. -->
<script type="text/javascript">
var version = "#VERSION#";
</script>
</head>
<body>
<div class="region fullscreen below"><div class="container"></div></div>
@@ -28,8 +38,9 @@
</div>
<div class="region fullscreen above"><div class="container"></div></div>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="vendor/node_modules/nunjucks/browser/nunjucks.min.js"></script>
<script type="text/javascript" src="js/defaults.js"></script>
<script type="text/javascript" src="config/config.js"></script>
<script type="text/javascript" src="#CONFIG_FILE#"></script>
<script type="text/javascript" src="vendor/vendor.js"></script>
<script type="text/javascript" src="modules/default/defaultmodules.js"></script>
<script type="text/javascript" src="js/logger.js"></script>

2
installers/mm.sh Executable file
View File

@@ -0,0 +1,2 @@
cd ~/MagicMirror
DISPLAY=:0 npm start

View File

@@ -0,0 +1,7 @@
{
"apps" : [{
"name" : "MagicMirror",
"script" : "/home/pi/MagicMirror/installers/mm.sh",
"watch" : ["/home/pi/MagicMirror/config/config.js"]
}]
}

View File

@@ -0,0 +1,2 @@
echo "\033[32mMagicMirror installation successful!"
exit 0

View File

@@ -18,26 +18,31 @@ echo ' \$$$$$$ |'
echo ' \______/'
echo -e "\e[0m"
# Define the tested version of Node.js.
# Define the tested version of Node.js.
NODE_TESTED="v5.1.0"
#Determine which Pi is running.
# Determine which Pi is running.
ARM=$(uname -m)
#Check the Raspberry Pi version.
# Check the Raspberry Pi version.
if [ "$ARM" != "armv7l" ]; then
echo -e "\e[91mSorry, your Raspberry Pi is not supported."
echo -e "\e[91mPlease run MagicMirror on a Raspberry Pi 2 or 3."
echo -e "\e[91mIf this is a Pi Zero, you are in the same boat as the original Raspberry Pi. You must run in server only mode."
exit;
fi
#define helper methods.
# Define helper methods.
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function command_exists () { type "$1" &> /dev/null ;}
# Update before first apt-get
echo -e "\e[96mUpdating packages ...\e[90m"
sudo apt-get update || echo -e "\e[91mUpdate failed, carrying on installation ...\e[90m"
# Installing helper tools
echo -e "\e[96mInstalling helper tools ...\e[90m"
sudo apt-get install curl wget git build-essential unzip || exit
sudo apt-get --assume-yes install curl wget git build-essential unzip || exit
# Check if we need to install or upgrade Node.js.
echo -e "\e[96mCheck current Node installation ...\e[0m"
@@ -48,19 +53,19 @@ if command_exists node; then
echo -e "\e[0mMinimum Node version: \e[1m$NODE_TESTED\e[0m"
echo -e "\e[0mInstalled Node version: \e[1m$NODE_CURRENT\e[0m"
if version_gt $NODE_TESTED $NODE_CURRENT; then
echo -e "\e[96mNode should be upgraded.\e[0m"
NODE_INSTALL=true
echo -e "\e[96mNode should be upgraded.\e[0m"
NODE_INSTALL=true
#Check if a node process is currenlty running.
#If so abort installation.
if pgrep "node" > /dev/null; then
echo -e "\e[91mA Node process is currently running. Can't upgrade."
echo "Please quit all Node processes and restart the installer."
exit;
# Check if a node process is currenlty running.
# If so abort installation.
if pgrep "node" > /dev/null; then
echo -e "\e[91mA Node process is currently running. Can't upgrade."
echo "Please quit all Node processes and restart the installer."
exit;
fi
else
echo -e "\e[92mNo Node.js upgrade nessecery.\e[0m"
else
echo -e "\e[92mNo Node.js upgrade necessary.\e[0m"
fi
else
@@ -68,22 +73,22 @@ else
NODE_INSTALL=true
fi
# Install or upgare node if nessecery.
# Install or upgrade node if necessary.
if $NODE_INSTALL; then
echo -e "\e[96mInstalling Node.js ...\e[90m"
#Fetch the latest version of Node.js from the selected branch
#The NODE_STABLE_BRANCH variable will need to be manually adjusted when a new branch is released. (e.g. 7.x)
#Only tested (stable) versions are recommended as newer versions could break MagicMirror.
# Fetch the latest version of Node.js from the selected branch
# The NODE_STABLE_BRANCH variable will need to be manually adjusted when a new branch is released. (e.g. 7.x)
# Only tested (stable) versions are recommended as newer versions could break MagicMirror.
NODE_STABLE_BRANCH="6.x"
NODE_STABLE_BRANCH="9.x"
curl -sL https://deb.nodesource.com/setup_$NODE_STABLE_BRANCH | sudo -E bash -
sudo apt-get install -y nodejs
echo -e "\e[92mNode.js installation Done!\e[0m"
fi
#Install magic mirror
# Install MagicMirror
cd ~
if [ -d "$HOME/MagicMirror" ] ; then
echo -e "\e[93mIt seems like MagicMirror is already installed."
@@ -96,7 +101,7 @@ if [ -d "$HOME/MagicMirror" ] ; then
fi
echo -e "\e[96mCloning MagicMirror ...\e[90m"
if git clone https://github.com/MichMich/MagicMirror.git; then
if git clone --depth=1 https://github.com/MichMich/MagicMirror.git; then
echo -e "\e[92mCloning MagicMirror Done!\e[0m"
else
echo -e "\e[91mUnable to clone MagicMirror."
@@ -112,6 +117,46 @@ else
exit;
fi
# Use sample config for start MagicMirror
cp config/config.js.sample config/config.js
# Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen.
echo -e "\e[96mCheck plymouth installation ...\e[0m"
if command_exists plymouth; then
THEME_DIR="/usr/share/plymouth/themes"
echo -e "\e[90mSplashscreen: Checking themes directory.\e[0m"
if [ -d $THEME_DIR ]; then
echo -e "\e[90mSplashscreen: Create theme directory if not exists.\e[0m"
if [ ! -d $THEME_DIR/MagicMirror ]; then
sudo mkdir $THEME_DIR/MagicMirror
fi
if sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; then
echo -e "\e[90mSplashscreen: Theme copied successfully.\e[0m"
if sudo plymouth-set-default-theme -R MagicMirror; then
echo -e "\e[92mSplashscreen: Changed theme to MagicMirror successfully.\e[0m"
else
echo -e "\e[91mSplashscreen: Couldn't change theme to MagicMirror!\e[0m"
fi
else
echo -e "\e[91mSplashscreen: Copying theme failed!\e[0m"
fi
else
echo -e "\e[91mSplashscreen: Themes folder doesn't exist!\e[0m"
fi
else
echo -e "\e[93mplymouth is not installed.\e[0m";
fi
# Use pm2 control like a service MagicMirror
read -p "Do you want use pm2 for auto starting of your MagicMirror (y/N)?" choice
if [[ $choice =~ ^[Yy]$ ]]; then
sudo npm install -g pm2
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
pm2 save
fi
echo " "
echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m"
echo " "

176
js/app.js
View File

@@ -7,9 +7,27 @@
var fs = require("fs");
var Server = require(__dirname + "/server.js");
var Utils = require(__dirname + "/utils.js");
var defaultModules = require(__dirname + "/../modules/default/defaultmodules.js");
var path = require("path");
// Get version number.
global.version = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
console.log("Starting MagicMirror: v" + global.version);
// global absolute root path
global.root_path = path.resolve(__dirname + "/../");
if (process.env.MM_CONFIG_FILE) {
global.configuration_file = process.env.MM_CONFIG_FILE;
}
// FIXME: Hotfix Pull Request
// https://github.com/MichMich/MagicMirror/pull/673
if (process.env.MM_PORT) {
global.mmPort = process.env.MM_PORT;
}
// The next part is here to prevent a major exception when there
// is no internet connection. This could probable be solved better.
process.on("uncaughtException", function (err) {
@@ -34,32 +52,58 @@ var App = function() {
var loadConfig = function(callback) {
console.log("Loading config ...");
var defaults = require(__dirname + "/defaults.js");
var configFilename = path.resolve(__dirname + "/../config/config.js");
// For this check proposed to TestSuite
// https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror/8
var configFilename = path.resolve(global.root_path + "/config/config.js");
if (typeof(global.configuration_file) !== "undefined") {
configFilename = path.resolve(global.configuration_file);
}
try {
fs.accessSync(configFilename, fs.F_OK);
var c = require(configFilename);
checkDeprecatedOptions(c);
var config = Object.assign(defaults, c);
callback(config);
} catch (e) {
if (e.code == "ENOENT") {
console.error("WARNING! Could not find config file. Please create one. Starting with default configuration.");
callback(defaults);
console.error(Utils.colors.error("WARNING! Could not find config file. Please create one. Starting with default configuration."));
} else if (e instanceof ReferenceError || e instanceof SyntaxError) {
console.error("WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration.");
callback(defaults);
console.error(Utils.colors.error("WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration."));
} else {
console.error("WARNING! Could not load config file. Starting with default configuration. Error found: " + e);
callback(defaults);
console.error(Utils.colors.error("WARNING! Could not load config file. Starting with default configuration. Error found: " + e));
}
callback(defaults);
}
};
var checkDeprecatedOptions = function(userConfig) {
var deprecated = require(global.root_path + "/js/deprecated.js");
var deprecatedOptions = deprecated.configs;
var usedDeprecated = [];
deprecatedOptions.forEach(function(option) {
if (userConfig.hasOwnProperty(option)) {
usedDeprecated.push(option);
}
});
if (usedDeprecated.length > 0) {
console.warn(Utils.colors.warn(
"WARNING! Your config is using deprecated options: " +
usedDeprecated.join(", ") +
". Check README and CHANGELOG for more up-to-date ways of getting the same functionality.")
);
}
}
/* loadModule(module)
* Loads a specific module.
*
* argument module string - The name of the module (including subpath).
*/
var loadModule = function(module) {
var loadModule = function(module, callback) {
var elements = module.split("/");
var moduleName = elements[elements.length - 1];
@@ -82,9 +126,24 @@ var App = function() {
if (loadModule) {
var Module = require(helperPath);
var m = new Module();
if (m.requiresVersion) {
console.log("Check MagicMirror version for node helper '" + moduleName + "' - Minimum version: " + m.requiresVersion + " - Current version: " + global.version);
if (cmpVersions(global.version, m.requiresVersion) >= 0) {
console.log("Version is ok!");
} else {
console.log("Version is incorrect. Skip module: '" + moduleName + "'");
return;
}
}
m.setName(moduleName);
m.setPath(path.resolve(moduleFolder));
nodeHelpers.push(m);
m.loaded(callback);
} else {
callback();
}
};
@@ -93,16 +152,48 @@ var App = function() {
*
* argument module string - The name of the module (including subpath).
*/
var loadModules = function(modules) {
var loadModules = function(modules, callback) {
console.log("Loading module helpers ...");
for (var m in modules) {
loadModule(modules[m]);
}
var loadNextModule = function() {
if (modules.length > 0) {
var nextModule = modules[0];
loadModule(nextModule, function() {
modules = modules.slice(1);
loadNextModule();
});
} else {
// All modules are loaded
console.log("All module helpers loaded.");
callback();
}
};
console.log("All module helpers loaded.");
loadNextModule();
};
/* cmpVersions(a,b)
* Compare two symantic version numbers and return the difference.
*
* argument a string - Version number a.
* argument a string - Version number b.
*/
function cmpVersions(a, b) {
var i, diff;
var regExStrip0 = /(\.0+)+$/;
var segmentsA = a.replace(regExStrip0, "").split(".");
var segmentsB = b.replace(regExStrip0, "").split(".");
var l = Math.min(segmentsA.length, segmentsB.length);
for (i = 0; i < l; i++) {
diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10);
if (diff) {
return diff;
}
}
return segmentsA.length - segmentsB.length;
}
/* start(callback)
* This methods starts the core app.
* It loads the config, then it loads all modules.
@@ -119,32 +210,59 @@ var App = function() {
for (var m in config.modules) {
var module = config.modules[m];
if (modules.indexOf(module.module) === -1) {
if (modules.indexOf(module.module) === -1 && !module.disabled) {
modules.push(module.module);
}
}
loadModules(modules);
loadModules(modules, function() {
var server = new Server(config, function(app, io) {
console.log("Server started ...");
var server = new Server(config, function(app, io) {
console.log("Server started ...");
for (var h in nodeHelpers) {
var nodeHelper = nodeHelpers[h];
nodeHelper.setExpressApp(app);
nodeHelper.setSocketIO(io);
nodeHelper.start();
}
for (var h in nodeHelpers) {
var nodeHelper = nodeHelpers[h];
nodeHelper.setExpressApp(app);
nodeHelper.setSocketIO(io);
nodeHelper.start();
}
console.log("Sockets connected & modules started ...");
console.log("Sockets connected & modules started ...");
if (typeof callback === "function") {
callback(config);
}
if (typeof callback === "function") {
callback(config);
}
});
});
});
};
/* stop()
* This methods stops the core app.
* This calls each node_helper's STOP() function, if it exists.
* Added to fix #1056
*/
this.stop = function() {
for (var h in nodeHelpers) {
var nodeHelper = nodeHelpers[h];
if (typeof nodeHelper.stop === "function") {
nodeHelper.stop();
}
}
};
/* Listen for SIGINT signal and call stop() function.
*
* Added to fix #1056
* Note: this is only used if running `server-only`. Otherwise
* this.stop() is called by app.on("before-quit"... in `electron.js`
*/
process.on("SIGINT", () => {
console.log("[SIGINT] Received. Shutting down server...");
setTimeout(() => { process.exit(0); }, 3000); // Force quit after 3 seconds
this.stop();
process.exit(0);
});
};
module.exports = new App();
module.exports = new App();

View File

@@ -4,15 +4,15 @@
*/
// Inspired by base2 and Prototype
(function() {
(function () {
var initializing = false;
var fnTest = /xyz/.test(function() {xyz;}) ? /\b_super\b/ : /.*/;
var fnTest = /xyz/.test(function () { xyz; }) ? /\b_super\b/ : /.*/;
// The base Class implementation (does nothing)
this.Class = function() {};
this.Class = function () { };
// Create a new Class that inherits from this class
Class.extend = function(prop) {
Class.extend = function (prop) {
var _super = this.prototype;
// Instantiate a base class (but only create the instance,
@@ -21,28 +21,32 @@
var prototype = new this();
initializing = false;
// Make a copy of all prototype properies, to prevent reference issues.
for (var name in prototype) {
prototype[name] = cloneObject(prototype[name]);
}
// Copy the properties over onto the new prototype
for (var name in prop) {
// Check if we're overwriting an existing function
prototype[name] = typeof prop[name] == "function" &&
typeof _super[name] == "function" && fnTest.test(prop[name]) ?
(function(name, fn) {
return function() {
var tmp = this._super;
typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function (name, fn) {
return function () {
var tmp = this._super;
// Add a new ._super() method that is the same method
// but on the super-class
this._super = _super[name];
// Add a new ._super() method that is the same method
// but on the super-class
this._super = _super[name];
// The method only need to be bound temporarily, so we
// remove it when we're done executing
var ret = fn.apply(this, arguments);
this._super = tmp;
// The method only need to be bound temporarily, so we
// remove it when we're done executing
var ret = fn.apply(this, arguments);
this._super = tmp;
return ret;
};
})(name, prop[name]) :
prop[name];
return ret;
};
})(name, prop[name]) : prop[name];
}
// The dummy class constructor
@@ -66,5 +70,26 @@
};
})();
//Define the clone method for later use.
//Helper Method
function cloneObject(obj) {
if (obj === null || typeof obj !== "object") {
return obj;
}
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
if (key === "lockStrings") {
Log.log(key);
}
}
return temp;
}
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = Class;}
if (typeof module !== "undefined") {
module.exports = Class;
}

View File

@@ -7,15 +7,29 @@
* MIT Licensed.
*/
var port = 8080;
var address = "localhost";
if (typeof(mmPort) !== "undefined") {
port = mmPort;
}
var defaults = {
port: 8080,
address: address,
port: port,
kioskmode: false,
electronOptions: {},
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
language: "en",
timeFormat: 24,
units: "metric",
zoom: 1,
customCss: "css/custom.css",
modules: [
{
module: "updatenotification",
position: "top_center"
},
{
module: "helloworld",
position: "upper_third",

14
js/deprecated.js Normal file
View File

@@ -0,0 +1,14 @@
/* Magic Mirror Deprecated Config Options List
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* Olex S. original idea this deprecated option
*/
var deprecated = {
configs: ["kioskmode"],
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = deprecated;}

View File

@@ -1,11 +1,12 @@
/* jshint esversion: 6 */
"use strict";
const Server = require(__dirname + "/server.js");
const electron = require("electron");
const core = require(__dirname + "/app.js");
// Config
var config = {};
var config = process.env.config ? JSON.parse(process.env.config) : {};
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
@@ -16,29 +17,63 @@ const BrowserWindow = electron.BrowserWindow;
let mainWindow;
function createWindow() {
// Create the browser window.
var electronOptionsDefaults = {
width: 800,
height: 600,
x: 0,
y: 0,
darkTheme: true,
webPreferences: {
nodeIntegration: false,
zoomFactor: config.zoom
},
backgroundColor: "#000000"
};
// DEPRECATED: "kioskmode" backwards compatibility, to be removed
// settings these options directly instead provides cleaner interface
if (config.kioskmode) {
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, kiosk:true, darkTheme: true, webPreferences: {nodeIntegration: false}});
electronOptionsDefaults.kiosk = true;
} else {
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false}});
electronOptionsDefaults.fullscreen = true;
electronOptionsDefaults.autoHideMenuBar = true;
}
var electronOptions = Object.assign({}, electronOptionsDefaults, config.electronOptions);
// Create the browser window.
mainWindow = new BrowserWindow(electronOptions);
// and load the index.html of the app.
//mainWindow.loadURL('file://' + __dirname + '../../index.html');
mainWindow.loadURL("http://localhost:" + config.port);
// If config.address is not defined or is an empty string (listening on all interfaces), connect to localhost
var address = (config.address === void 0) | (config.address === "") ? (config.address = "localhost") : config.address;
mainWindow.loadURL(`http://${address}:${config.port}`);
// Open the DevTools if run with "npm start dev"
if(process.argv[2] == "dev"){
if (process.argv.includes("dev")) {
mainWindow.webContents.openDevTools();
}
// Emitted when the window is closed.
// Set responders for window events.
mainWindow.on("closed", function() {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null;
});
if (config.kioskmode) {
mainWindow.on("blur", function() {
mainWindow.focus();
});
mainWindow.on("leave-full-screen", function() {
mainWindow.setFullScreen(true);
});
mainWindow.on("resize", function() {
setTimeout(function() {
mainWindow.reload();
}, 1000);
});
}
}
// This method will be called when Electron has finished
@@ -50,11 +85,7 @@ app.on("ready", function() {
// Quit when all windows are closed.
app.on("window-all-closed", function() {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== "darwin") {
app.quit();
}
createWindow();
});
app.on("activate", function() {
@@ -65,8 +96,24 @@ app.on("activate", function() {
}
});
// Start the core application.
// This starts all node helpers and starts the webserver.
core.start(function(c) {
config = c;
/* This method will be called when SIGINT is received and will call
* each node_helper's stop function if it exists. Added to fix #1056
*
* Note: this is only used if running Electron. Otherwise
* core.stop() is called by process.on("SIGINT"... in `app.js`
*/
app.on("before-quit", (event) => {
console.log("Shutting down server...");
event.preventDefault();
setTimeout(() => { process.exit(0); }, 3000); // Force-quit after 3 seconds.
core.stop();
process.exit(0);
});
// Start the core application if server is run on localhost
// This starts all node helpers and starts the webserver.
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].indexOf(config.address) > -1) {
core.start(function(c) {
config = c;
});
}

View File

@@ -32,10 +32,10 @@ var Loader = (function() {
});
} else {
// All modules loaded. Load custom.css
// This is done after all the moduels so we can
// overwrite all the defined styls.
// This is done after all the modules so we can
// overwrite all the defined styles.
loadFile("css/custom.css", function() {
loadFile(config.customCss, function() {
// custom.css loaded. Start all modules.
startModules();
});
@@ -89,6 +89,10 @@ var Loader = (function() {
moduleFolder = config.paths.modules + "/default/" + module;
}
if (moduleData.disabled === true) {
continue;
}
moduleFiles.push({
index: m,
identifier: "module_" + m + "_" + module,
@@ -117,9 +121,13 @@ var Loader = (function() {
var afterLoad = function() {
var moduleObject = Module.create(module.name);
bootstrapModule(module, moduleObject, function() {
if (moduleObject) {
bootstrapModule(module, moduleObject, function() {
callback();
});
} else {
callback();
});
}
};
if (loadedModuleFiles.indexOf(url) !== -1) {
@@ -178,6 +186,11 @@ var Loader = (function() {
script.onload = function() {
if (typeof callback === "function") {callback();}
};
script.onerror = function() {
console.error("Error on loading script:", fileName);
if (typeof callback === "function") {callback();}
};
document.getElementsByTagName("body")[0].appendChild(script);
break;
case "css":
@@ -189,6 +202,11 @@ var Loader = (function() {
stylesheet.onload = function() {
if (typeof callback === "function") {callback();}
};
stylesheet.onerror = function() {
console.error("Error on loading stylesheet:", fileName);
if (typeof callback === "function") {callback();}
};
document.getElementsByTagName("head")[0].appendChild(stylesheet);
break;
}

View File

@@ -13,35 +13,15 @@
var Log = (function() {
return {
info: function(message) {
console.info(message);
},
log: function(message) {
console.log(message);
},
error: function(message) {
console.error(message);
},
warn: function(message) {
console.warn(message);
},
group: function(message) {
console.group(message);
},
groupCollapsed: function(message) {
console.groupCollapsed(message);
},
groupEnd: function() {
console.groupEnd();
},
time: function(message) {
console.time(message);
},
timeEnd: function(message) {
console.timeEnd(message);
},
timeStamp: function(message) {
console.timeStamp(message);
}
info: Function.prototype.bind.call(console.info, console),
log: Function.prototype.bind.call(console.log, console),
error: Function.prototype.bind.call(console.error, console),
warn: Function.prototype.bind.call(console.warn, console),
group: Function.prototype.bind.call(console.group, console),
groupCollapsed: Function.prototype.bind.call(console.groupCollapsed, console),
groupEnd: Function.prototype.bind.call(console.groupEnd, console),
time: Function.prototype.bind.call(console.time, console),
timeEnd: Function.prototype.bind.call(console.timeEnd, console),
timeStamp: Function.prototype.bind.call(console.timeStamp, console)
};
})();

View File

@@ -1,5 +1,5 @@
/* global Log, Loader, Module, config, defaults */
/* jshint -W020 */
/* jshint -W020, esversion: 6 */
/* Magic Mirror
* Main System
@@ -19,39 +19,49 @@ var MM = (function() {
* are configured for a specific position.
*/
var createDomObjects = function() {
for (var m in modules) {
var module = modules[m];
var domCreationPromises = [];
if (typeof module.data.position === "string") {
var wrapper = selectWrapper(module.data.position);
var dom = document.createElement("div");
dom.id = module.identifier;
dom.className = module.name;
if (typeof module.data.classes === "string") {
dom.className = "module " + dom.className + " " + module.data.classes;
}
dom.opacity = 0;
wrapper.appendChild(dom);
if (typeof module.data.header !== "undefined" && module.data.header !== "") {
var moduleHeader = document.createElement("header");
moduleHeader.innerHTML = module.data.header;
dom.appendChild(moduleHeader);
}
var moduleContent = document.createElement("div");
moduleContent.className = "module-content";
dom.appendChild(moduleContent);
updateDom(module, 0);
modules.forEach(function(module) {
if (typeof module.data.position !== "string") {
return;
}
}
sendNotification("DOM_OBJECTS_CREATED");
var wrapper = selectWrapper(module.data.position);
var dom = document.createElement("div");
dom.id = module.identifier;
dom.className = module.name;
if (typeof module.data.classes === "string") {
dom.className = "module " + dom.className + " " + module.data.classes;
}
dom.opacity = 0;
wrapper.appendChild(dom);
if (typeof module.data.header !== "undefined" && module.data.header !== "") {
var moduleHeader = document.createElement("header");
moduleHeader.innerHTML = module.data.header;
moduleHeader.className = "module-header";
dom.appendChild(moduleHeader);
}
var moduleContent = document.createElement("div");
moduleContent.className = "module-content";
dom.appendChild(moduleContent);
var domCreationPromise = updateDom(module, 0);
domCreationPromises.push(domCreationPromise);
domCreationPromise.then(function() {
sendNotification("MODULE_DOM_CREATED", null, null, module);
}).catch(Log.error);
});
updateWrapperStates();
Promise.all(domCreationPromises).then(function() {
sendNotification("DOM_OBJECTS_CREATED");
});
};
/* selectWrapper(position)
@@ -63,7 +73,7 @@ var MM = (function() {
var classes = position.replace("_"," ");
var parentWrapper = document.getElementsByClassName(classes);
if (parentWrapper.length > 0) {
var wrapper = parentWrapper[0].getElementsByClassName("container");
var wrapper = parentWrapper[0].getElementsByClassName("container");
if (wrapper.length > 0) {
return wrapper[0];
}
@@ -73,14 +83,15 @@ var MM = (function() {
/* sendNotification(notification, payload, sender)
* Send a notification to all modules.
*
* argument notification string - The identifier of the noitication.
* argument notification string - The identifier of the notification.
* argument payload mixed - The payload of the notification.
* argument sender Module - The module that sent the notification.
* argument sendTo Module - The module to send the notification to. (optional)
*/
var sendNotification = function(notification, payload, sender) {
var sendNotification = function(notification, payload, sender, sendTo) {
for (var m in modules) {
var module = modules[m];
if (module !== sender) {
if (module !== sender && (!sendTo || module === sendTo)) {
module.notificationReceived(notification, payload, sender);
}
}
@@ -91,62 +102,112 @@ var MM = (function() {
*
* argument module Module - The module that needs an update.
* argument speed Number - The number of microseconds for the animation. (optional)
*
* return Promise - Resolved when the dom is fully updated.
*/
var updateDom = function(module, speed) {
var newContent = module.getDom();
return new Promise(function(resolve) {
var newContentPromise = module.getDom();
var newHeader = module.getHeader();
if (!module.hidden) {
if (!(newContentPromise instanceof Promise)) {
// convert to a promise if not already one to avoid if/else's everywhere
newContentPromise = Promise.resolve(newContentPromise);
}
if (!moduleNeedsUpdate(module, newContent)) {
newContentPromise.then(function(newContent) {
var updatePromise = updateDomWithContent(module, speed, newHeader, newContent);
updatePromise.then(resolve).catch(Log.error);
}).catch(Log.error);
});
};
/* updateDomWithContent(module, speed, newHeader, newContent)
* Update the dom with the specified content
*
* argument module Module - The module that needs an update.
* argument speed Number - The number of microseconds for the animation. (optional)
* argument newHeader String - The new header that is generated.
* argument newContent Domobject - The new content that is generated.
*
* return Promise - Resolved when the module dom has been updated.
*/
var updateDomWithContent = function(module, speed, newHeader, newContent) {
return new Promise(function(resolve) {
if (module.hidden || !speed) {
updateModuleContent(module, newHeader, newContent);
resolve();
return;
}
if (!moduleNeedsUpdate(module, newHeader, newContent)) {
resolve();
return;
}
if (!speed) {
updateModuleContent(module, newContent);
updateModuleContent(module, newHeader, newContent);
resolve();
return;
}
hideModule(module, speed / 2, function() {
updateModuleContent(module, newContent);
updateModuleContent(module, newHeader, newContent);
if (!module.hidden) {
showModule(module, speed / 2);
}
resolve();
});
} else {
updateModuleContent(module, newContent);
}
});
};
/* moduleNeedsUpdate(module, newContent)
* Check if the content has changed.
*
* argument module Module - The module to check.
* argument newHeader String - The new header that is generated.
* argument newContent Domobject - The new content that is generated.
*
* return bool - Does the module need an update?
*/
var moduleNeedsUpdate = function(module, newContent) {
var moduleNeedsUpdate = function(module, newHeader, newContent) {
var moduleWrapper = document.getElementById(module.identifier);
var contentWrapper = moduleWrapper.getElementsByClassName("module-content")[0];
var contentWrapper = moduleWrapper.getElementsByClassName("module-content");
var headerWrapper = moduleWrapper.getElementsByClassName("module-header");
var tempWrapper = document.createElement("div");
tempWrapper.appendChild(newContent);
var headerNeedsUpdate = false;
var contentNeedsUpdate = false;
return tempWrapper.innerHTML !== contentWrapper.innerHTML;
if (headerWrapper.length > 0) {
headerNeedsUpdate = newHeader !== headerWrapper[0].innerHTML;
}
var tempContentWrapper = document.createElement("div");
tempContentWrapper.appendChild(newContent);
contentNeedsUpdate = tempContentWrapper.innerHTML !== contentWrapper[0].innerHTML;
return headerNeedsUpdate || contentNeedsUpdate;
};
/* moduleNeedsUpdate(module, newContent)
* Update the content of a module on screen.
*
* argument module Module - The module to check.
* argument newHeader String - The new header that is generated.
* argument newContent Domobject - The new content that is generated.
*/
var updateModuleContent = function(module, content) {
var updateModuleContent = function(module, newHeader, newContent) {
var moduleWrapper = document.getElementById(module.identifier);
var contentWrapper = moduleWrapper.getElementsByClassName("module-content")[0];
var headerWrapper = moduleWrapper.getElementsByClassName("module-header");
var contentWrapper = moduleWrapper.getElementsByClassName("module-content");
contentWrapper.innerHTML = "";
contentWrapper.appendChild(content);
contentWrapper[0].innerHTML = "";
contentWrapper[0].appendChild(newContent);
if( headerWrapper.length > 0 && newHeader) {
headerWrapper[0].innerHTML = newHeader;
}
};
/* hideModule(module, speed, callback)
@@ -156,7 +217,17 @@ var MM = (function() {
* argument speed Number - The speed of the hide animation.
* argument callback function - Called when the animation is done.
*/
var hideModule = function(module, speed, callback) {
var hideModule = function(module, speed, callback, options) {
options = options || {};
// set lockString if set in options.
if (options.lockString) {
// Log.log("Has lockstring: " + options.lockString);
if (module.lockStrings.indexOf(options.lockString) === -1) {
module.lockStrings.push(options.lockString);
}
}
var moduleWrapper = document.getElementById(module.identifier);
if (moduleWrapper !== null) {
moduleWrapper.style.transition = "opacity " + speed / 1000 + "s";
@@ -165,13 +236,18 @@ var MM = (function() {
clearTimeout(module.showHideTimer);
module.showHideTimer = setTimeout(function() {
// To not take up any space, we just make the position absolute.
// since it"s fade out anyway, we can see it lay above or
// since it's fade out anyway, we can see it lay above or
// below other modules. This works way better than adjusting
// the .display property.
moduleWrapper.style.position = "absolute";
moduleWrapper.style.position = "fixed";
updateWrapperStates();
if (typeof callback === "function") { callback(); }
}, speed);
} else {
// invoke callback even if no content, issue 1308
if (typeof callback === "function") { callback(); }
}
};
@@ -182,12 +258,42 @@ var MM = (function() {
* argument speed Number - The speed of the show animation.
* argument callback function - Called when the animation is done.
*/
var showModule = function(module, speed, callback) {
var showModule = function(module, speed, callback, options) {
options = options || {};
// remove lockString if set in options.
if (options.lockString) {
var index = module.lockStrings.indexOf(options.lockString);
if ( index !== -1) {
module.lockStrings.splice(index, 1);
}
}
// Check if there are no more lockstrings set, or the force option is set.
// Otherwise cancel show action.
if (module.lockStrings.length !== 0 && options.force !== true) {
Log.log("Will not show " + module.name + ". LockStrings active: " + module.lockStrings.join(","));
return;
}
module.hidden = false;
// If forced show, clean current lockstrings.
if (module.lockStrings.length !== 0 && options.force === true) {
Log.log("Force show of module: " + module.name);
module.lockStrings = [];
}
var moduleWrapper = document.getElementById(module.identifier);
if (moduleWrapper !== null) {
moduleWrapper.style.transition = "opacity " + speed / 1000 + "s";
// Restore the postition. See hideModule() for more info.
moduleWrapper.style.position = "static";
updateWrapperStates();
// Waiting for DOM-changes done in updateWrapperStates before we can start the animation.
var dummy = moduleWrapper.parentElement.parentElement.offsetHeight;
moduleWrapper.style.opacity = 1;
clearTimeout(module.showHideTimer);
@@ -198,6 +304,36 @@ var MM = (function() {
}
};
/* updateWrapperStates()
* Checks for all positions if it has visible content.
* If not, if will hide the position to prevent unwanted margins.
* This method schould be called by the show and hide methods.
*
* Example:
* If the top_bar only contains the update notification. And no update is available,
* the update notification is hidden. The top bar still occupies space making for
* an ugly top margin. By using this function, the top bar will be hidden if the
* update notification is not visible.
*/
var updateWrapperStates = function() {
var positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third", "middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right", "bottom_bar", "fullscreen_above", "fullscreen_below"];
positions.forEach(function(position) {
var wrapper = selectWrapper(position);
var moduleWrappers = wrapper.getElementsByClassName("module");
var showWrapper = false;
Array.prototype.forEach.call(moduleWrappers, function(moduleWrapper) {
if (moduleWrapper.style.position == "" || moduleWrapper.style.position == "static") {
showWrapper = true;
}
});
wrapper.style.display = showWrapper ? "block" : "none";
});
};
/* loadConfig()
* Loads the core config and combines it with de system defaults.
*/
@@ -208,7 +344,7 @@ var MM = (function() {
return;
}
config = Object.assign(defaults, config);
config = Object.assign({}, defaults, config);
};
/* setSelectionMethodsForModules()
@@ -219,43 +355,36 @@ var MM = (function() {
var setSelectionMethodsForModules = function(modules) {
/* withClass(className)
* filters a collection of modules based on classname(s).
* calls modulesByClass to filter modules with the specified classes.
*
* argument className string/array - one or multiple classnames. (array or space devided)
* argument className string/array - one or multiple classnames. (array or space divided)
*
* return array - Filtered collection of modules.
*/
var withClass = function(className) {
var searchClasses = className;
if (typeof className === "string") {
searchClasses = className.split(" ");
}
var newModules = modules.filter(function(module) {
var classes = module.data.classes.toLowerCase().split(" ");
for (var c in searchClasses) {
var searchClass = searchClasses[c];
if (classes.indexOf(searchClass.toLowerCase()) !== -1) {
return true;
}
}
return false;
});
setSelectionMethodsForModules(newModules);
return newModules;
return modulesByClass(className, true);
};
/* exceptWithClass(className)
* filters a collection of modules based on classname(s). (NOT)
* calls modulesByClass to filter modules without the specified classes.
*
* argument className string/array - one or multiple classnames. (array or space devided)
* argument className string/array - one or multiple classnames. (array or space divided)
*
* return array - Filtered collection of modules.
*/
var exceptWithClass = function(className) {
return modulesByClass(className, false);
};
/* modulesByClass(className, include)
* filters a collection of modules based on classname(s).
*
* argument className string/array - one or multiple classnames. (array or space divided)
* argument include boolean - if the filter should include or exclude the modules with the specific classes.
*
* return array - Filtered collection of modules.
*/
var modulesByClass = function(className, include) {
var searchClasses = className;
if (typeof className === "string") {
searchClasses = className.split(" ");
@@ -267,11 +396,11 @@ var MM = (function() {
for (var c in searchClasses) {
var searchClass = searchClasses[c];
if (classes.indexOf(searchClass.toLowerCase()) !== -1) {
return false;
return include;
}
}
return true;
return !include;
});
setSelectionMethodsForModules(newModules);
@@ -401,10 +530,11 @@ var MM = (function() {
* argument module Module - The module hide.
* argument speed Number - The speed of the hide animation.
* argument callback function - Called when the animation is done.
* argument options object - Optional settings for the hide method.
*/
hideModule: function(module, speed, callback) {
hideModule: function(module, speed, callback, options) {
module.hidden = true;
hideModule(module, speed, callback);
hideModule(module, speed, callback, options);
},
/* showModule(module, speed, callback)
@@ -413,10 +543,11 @@ var MM = (function() {
* argument module Module - The module show.
* argument speed Number - The speed of the show animation.
* argument callback function - Called when the animation is done.
* argument options object - Optional settings for the hide method.
*/
showModule: function(module, speed, callback) {
module.hidden = false;
showModule(module, speed, callback);
showModule: function(module, speed, callback, options) {
// do not change module.hidden yet, only if we really show it later
showModule(module, speed, callback, options);
}
};

View File

@@ -14,23 +14,35 @@ var Module = Class.extend({
* All methods (and properties) below can be subclassed. *
*********************************************************/
// Set the minimum MagicMirror module version for this module.
requiresVersion: "2.0.0",
// Module config defaults.
defaults: {},
// Timer reference used for showHide animation callbacks.
showHideTimer: null,
// Array to store lockStrings. These strings are used to lock
// visibility when hiding and showing module.
lockStrings: [],
// Storage of the nunjuck Environment,
// This should not be referenced directly.
// Use the nunjucksEnvironment() to get it.
_nunjucksEnvironment: null,
/* init()
* Is called when the module is instantiated.
*/
init: function() {
init: function () {
//Log.log(this.defaults);
},
/* start()
* Is called when the module is started.
*/
start: function() {
start: function () {
Log.info("Starting module: " + this.name);
},
@@ -39,7 +51,7 @@ var Module = Class.extend({
*
* return Array<String> - An array with filenames.
*/
getScripts: function() {
getScripts: function () {
return [];
},
@@ -48,7 +60,7 @@ var Module = Class.extend({
*
* return Array<String> - An array with filenames.
*/
getStyles: function() {
getStyles: function () {
return [];
},
@@ -57,42 +69,87 @@ var Module = Class.extend({
*
* return Map<String, String> - A map with langKeys and filenames.
*/
getTranslations: function() {
getTranslations: function () {
return false;
},
/* getDom()
* This method generates the dom which needs to be displayed. This method is called by the Magic Mirror core.
* This method needs to be subclassed if the module wants to display info on the mirror.
* This method can to be subclassed if the module wants to display info on the mirror.
* Alternatively, the getTemplete method could be subclassed.
*
* return domobject - The dom to display.
* return DomObject | Promise - The dom or a promise with the dom to display.
*/
getDom: function() {
var nameWrapper = document.createElement("div");
var name = document.createTextNode(this.name);
nameWrapper.appendChild(name);
getDom: function () {
var self = this;
return new Promise(function(resolve) {
var div = document.createElement("div");
var template = self.getTemplate();
var templateData = self.getTemplateData();
var identifierWrapper = document.createElement("div");
var identifier = document.createTextNode(this.identifier);
identifierWrapper.appendChild(identifier);
identifierWrapper.className = "small dimmed";
// Check to see if we need to render a template string or a file.
if (/^.*((\.html)|(\.njk))$/.test(template)) {
// the template is a filename
self.nunjucksEnvironment().render(template, templateData, function (err, res) {
if (err) {
Log.error(err)
}
var div = document.createElement("div");
div.appendChild(nameWrapper);
div.appendChild(identifierWrapper);
div.innerHTML = res;
return div;
resolve(div);
});
} else {
// the template is a template string.
div.innerHTML = self.nunjucksEnvironment().renderString(template, templateData);
resolve(div);
}
});
},
/* getHeader()
* This method generates the header string which needs to be displayed if a user has a header configured for this module.
* This method is called by the Magic Mirror core, but only if the user has configured a default header for the module.
* This method needs to be subclassed if the module wants to display modified headers on the mirror.
*
* return string - The header to display above the header.
*/
getHeader: function () {
return this.data.header;
},
/* getTemplate()
* This method returns the template for the module which is used by the default getDom implementation.
* This method needs to be subclassed if the module wants to use a tempate.
* It can either return a template sting, or a template filename.
* If the string ends with '.html' it's considered a file from within the module's folder.
*
* return string - The template string of filename.
*/
getTemplate: function () {
return "<div class=\"normal\">" + this.name + "</div><div class=\"small dimmed\">" + this.identifier + "</div>";
},
/* getTemplateData()
* This method returns the data to be used in the template.
* This method needs to be subclassed if the module wants to use a custom data.
*
* return Object
*/
getTemplateData: function () {
return {}
},
/* notificationReceived(notification, payload, sender)
* This method is called when a notification arrives.
* This method is called by the Magic Mirror core.
*
* argument notification string - The identifier of the noitication.
* argument notification string - The identifier of the notification.
* argument payload mixed - The payload of the notification.
* argument sender Module - The module that sent the notification.
*/
notificationReceived: function(notification, payload, sender) {
notificationReceived: function (notification, payload, sender) {
if (sender) {
Log.log(this.name + " received a module notification: " + notification + " from sender: " + sender.name);
} else {
@@ -100,27 +157,51 @@ var Module = Class.extend({
}
},
/** nunjucksEnvironment()
* Returns the nunjucks environment for the current module.
* The environment is checked in the _nunjucksEnvironment instance variable.
* @returns Nunjucks Environment
*/
nunjucksEnvironment: function() {
if (this._nunjucksEnvironment != null) {
return this._nunjucksEnvironment;
}
var self = this;
this._nunjucksEnvironment = new nunjucks.Environment(new nunjucks.WebLoader(this.file(""), {async: true}), {
trimBlocks: true,
lstripBlocks: true
});
this._nunjucksEnvironment.addFilter("translate", function(str) {
return self.translate(str)
});
return this._nunjucksEnvironment;
},
/* socketNotificationReceived(notification, payload)
* This method is called when a socket notification arrives.
*
* argument notification string - The identifier of the noitication.
* argument notification string - The identifier of the notification.
* argument payload mixed - The payload of the notification.
*/
socketNotificationReceived: function(notification, payload) {
socketNotificationReceived: function (notification, payload) {
Log.log(this.name + " received a socket notification: " + notification + " - Payload: " + payload);
},
/* suspend()
* This method is called when a module is hidden.
*/
suspend: function() {
suspend: function () {
Log.log(this.name + " is suspended.");
},
/* resume()
* This method is called when a module is shown.
*/
resume: function() {
resume: function () {
Log.log(this.name + " is resumed.");
},
@@ -133,7 +214,7 @@ var Module = Class.extend({
*
* argument data obejct - Module data.
*/
setData: function(data) {
setData: function (data) {
this.data = data;
this.name = data.name;
this.identifier = data.identifier;
@@ -147,21 +228,21 @@ var Module = Class.extend({
*
* argument config obejct - Module config.
*/
setConfig: function(config) {
this.config = Object.assign(this.defaults, config);
setConfig: function (config) {
this.config = Object.assign({}, this.defaults, config);
},
/* socket()
* Returns a socket object. If it doesn"t exist, it"s created.
* It also registers the notification callback.
*/
socket: function() {
socket: function () {
if (typeof this._socket === "undefined") {
this._socket = this._socket = new MMSocket(this.name);
}
var self = this;
this._socket.setNotificationCallback(function(notification, payload) {
this._socket.setNotificationCallback(function (notification, payload) {
self.socketNotificationReceived(notification, payload);
});
@@ -175,8 +256,8 @@ var Module = Class.extend({
*
* return string - File path.
*/
file: function(file) {
return this.data.path + "/" + file;
file: function (file) {
return (this.data.path + "/" + file).replace("//", "/");
},
/* loadStyles()
@@ -184,23 +265,8 @@ var Module = Class.extend({
*
* argument callback function - Function called when done.
*/
loadStyles: function(callback) {
var self = this;
var styles = this.getStyles();
var loadNextStyle = function() {
if (styles.length > 0) {
var nextStyle = styles[0];
Loader.loadFile(nextStyle, self, function() {
styles = styles.slice(1);
loadNextStyle();
});
} else {
callback();
}
};
loadNextStyle();
loadStyles: function (callback) {
this.loadDependencies("getStyles", callback);
},
/* loadScripts()
@@ -208,23 +274,33 @@ var Module = Class.extend({
*
* argument callback function - Function called when done.
*/
loadScripts: function(callback) {
var self = this;
var scripts = this.getScripts();
loadScripts: function (callback) {
this.loadDependencies("getScripts", callback);
},
var loadNextScript = function() {
if (scripts.length > 0) {
var nextScript = scripts[0];
Loader.loadFile(nextScript, self, function() {
scripts = scripts.slice(1);
loadNextScript();
/* loadDependencies(funcName, callback)
* Helper method to load all dependencies.
*
* argument funcName string - Function name to call to get scripts or styles.
* argument callback function - Function called when done.
*/
loadDependencies: function (funcName, callback) {
var self = this;
var dependencies = this[funcName]();
var loadNextDependency = function () {
if (dependencies.length > 0) {
var nextDependency = dependencies[0];
Loader.loadFile(nextDependency, self, function () {
dependencies = dependencies.slice(1);
loadNextDependency();
});
} else {
callback();
}
};
loadNextScript();
loadNextDependency();
},
/* loadScripts()
@@ -232,14 +308,14 @@ var Module = Class.extend({
*
* argument callback function - Function called when done.
*/
loadTranslations: function(callback) {
loadTranslations: function (callback) {
var self = this;
var translations = this.getTranslations();
var lang = config.language.toLowerCase();
// The variable `first` will contain the first
// defined translation after the following line.
for (var first in translations) {break;}
for (var first in translations) { break; }
if (translations) {
var translationFile = translations[lang] || undefined;
@@ -248,7 +324,7 @@ var Module = Class.extend({
// If a translation file is set, load it and then also load the fallback translation file.
// Otherwise only load the fallback translation file.
if (translationFile !== undefined && translationFile !== translationsFallbackFile) {
Translator.load(self, translationFile, false, function() {
Translator.load(self, translationFile, false, function () {
Translator.load(self, translationsFallbackFile, true, callback);
});
} else {
@@ -259,14 +335,18 @@ var Module = Class.extend({
}
},
/* translate(key, defaultValue)
* Request the translation for a given key.
*
* argument key string - The key of the string to translage
* argument defaultValue string - The default value if no translation was found. (Optional)
*/
translate: function(key, defaultValue) {
return Translator.translate(this, key) || defaultValue || "";
/* translate(key, defaultValueOrVariables, defaultValue)
* Request the translation for a given key with optional variables and default value.
*
* argument key string - The key of the string to translate
* argument defaultValueOrVariables string/object - The default value or variables for translating. (Optional)
* argument defaultValue string - The default value with variables. (Optional)
*/
translate: function (key, defaultValueOrVariables, defaultValue) {
if(typeof defaultValueOrVariables === "object") {
return Translator.translate(this, key, defaultValueOrVariables) || defaultValue || "";
}
return Translator.translate(this, key) || defaultValueOrVariables || "";
},
/* updateDom(speed)
@@ -274,27 +354,27 @@ var Module = Class.extend({
*
* argument speed Number - The speed of the animation. (Optional)
*/
updateDom: function(speed) {
updateDom: function (speed) {
MM.updateDom(this, speed);
},
/* sendNotification(notification, payload)
* Send a notification to all modules.
*
* argument notification string - The identifier of the noitication.
* argument notification string - The identifier of the notification.
* argument payload mixed - The payload of the notification.
*/
sendNotification: function(notification, payload) {
sendNotification: function (notification, payload) {
MM.sendNotification(notification, payload, this);
},
/* sendSocketNotification(notification, payload)
* Send a socket notification to the node helper.
*
* argument notification string - The identifier of the noitication.
* argument notification string - The identifier of the notification.
* argument payload mixed - The payload of the notification.
*/
sendSocketNotification: function(notification, payload) {
sendSocketNotification: function (notification, payload) {
this.socket().sendNotification(notification, payload);
},
@@ -303,15 +383,22 @@ var Module = Class.extend({
*
* argument speed Number - The speed of the hide animation.
* argument callback function - Called when the animation is done.
* argument options object - Optional settings for the hide method.
*/
hide: function(speed, callback) {
callback = callback || function() {};
hide: function (speed, callback, options) {
if (typeof callback === "object") {
options = callback;
callback = function () { };
}
callback = callback || function () { };
options = options || {};
var self = this;
MM.hideModule(self, speed, function() {
MM.hideModule(self, speed, function () {
self.suspend();
callback();
});
}, options);
},
/* showModule(module, speed, callback)
@@ -319,29 +406,29 @@ var Module = Class.extend({
*
* argument speed Number - The speed of the show animation.
* argument callback function - Called when the animation is done.
* argument options object - Optional settings for the hide method.
*/
show: function(speed, callback) {
show: function (speed, callback, options) {
if (typeof callback === "object") {
options = callback;
callback = function () { };
}
callback = callback || function () { };
options = options || {};
this.resume();
MM.showModule(this, speed, callback);
MM.showModule(this, speed, callback, options);
}
});
Module.definitions = {};
Module.create = function(name) {
Module.create = function (name) {
//Define the clone method for later use.
function cloneObject(obj) {
if (obj === null || typeof obj !== "object") {
return obj;
}
var temp = obj.constructor(); // give temp the original obj"s constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
}
return temp;
// Make sure module definition is available.
if (!Module.definitions[name]) {
return;
}
var moduleDefinition = Module.definitions[name];
@@ -354,7 +441,39 @@ Module.create = function(name) {
};
Module.register = function(name, moduleDefinition) {
/* cmpVersions(a,b)
* Compare two symantic version numbers and return the difference.
*
* argument a string - Version number a.
* argument a string - Version number b.
*/
function cmpVersions(a, b) {
var i, diff;
var regExStrip0 = /(\.0+)+$/;
var segmentsA = a.replace(regExStrip0, "").split(".");
var segmentsB = b.replace(regExStrip0, "").split(".");
var l = Math.min(segmentsA.length, segmentsB.length);
for (i = 0; i < l; i++) {
diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10);
if (diff) {
return diff;
}
}
return segmentsA.length - segmentsB.length;
}
Module.register = function (name, moduleDefinition) {
if (moduleDefinition.requiresVersion) {
Log.log("Check MagicMirror version for module '" + name + "' - Minimum version: " + moduleDefinition.requiresVersion + " - Current version: " + version);
if (cmpVersions(version, moduleDefinition.requiresVersion) >= 0) {
Log.log("Version is ok!");
} else {
Log.log("Version is incorrect. Skip module: '" + name + "'");
return;
}
}
Log.log("Module registered: " + name);
Module.definitions[name] = moduleDefinition;
};

View File

@@ -10,21 +10,64 @@ var app = require("express")();
var server = require("http").Server(app);
var io = require("socket.io")(server);
var path = require("path");
var ipfilter = require("express-ipfilter").IpFilter;
var fs = require("fs");
var helmet = require("helmet");
var Utils = require(__dirname + "/utils.js");
var Server = function(config, callback) {
console.log("Starting server op port " + config.port + " ... ");
server.listen(config.port);
var port = config.port;
if (process.env.MM_PORT) {
port = process.env.MM_PORT;
}
console.log("Starting server on port " + port + " ... ");
server.listen(port, config.address ? config.address : null);
if (config.ipWhitelist instanceof Array && config.ipWhitelist.length == 0) {
console.info(Utils.colors.warn("You're using a full whitelist configuration to allow for all IPs"))
}
app.use(function(req, res, next) {
var result = ipfilter(config.ipWhitelist, {mode: config.ipWhitelist.length === 0 ? "deny" : "allow", log: false})(req, res, function(err) {
if (err === undefined) {
return next();
}
console.log(err.message);
res.status(403).send("This device is not allowed to access your mirror. <br> Please check your config.js or config.js.sample to change this.");
});
});
app.use(helmet());
app.use("/js", express.static(__dirname));
app.use("/config", express.static(path.resolve(__dirname + "/../config")));
app.use("/css", express.static(path.resolve(__dirname + "/../css")));
app.use("/fonts", express.static(path.resolve(__dirname + "/../fonts")));
app.use("/modules", express.static(path.resolve(__dirname + "/../modules")));
app.use("/vendor", express.static(path.resolve(__dirname + "/../vendor")));
app.use("/translations", express.static(path.resolve(__dirname + "/../translations")));
var directories = ["/config", "/css", "/fonts", "/modules", "/vendor", "/translations", "/tests/configs"];
var directory;
for (var i in directories) {
directory = directories[i];
app.use(directory, express.static(path.resolve(global.root_path + directory)));
}
app.get("/version", function(req,res) {
res.send(global.version);
});
app.get("/config", function(req,res) {
res.send(config);
});
app.get("/", function(req, res) {
res.sendFile(path.resolve(__dirname + "/../index.html"));
var html = fs.readFileSync(path.resolve(global.root_path + "/index.html"), {encoding: "utf8"});
html = html.replace("#VERSION#", global.version);
configFile = "config/config.js";
if (typeof(global.configuration_file) !== "undefined") {
configFile = global.configuration_file;
}
html = html.replace("#CONFIG_FILE#", configFile);
res.send(html);
});
if (typeof callback === "function") {

View File

@@ -22,7 +22,6 @@ var MMSocket = function(moduleName) {
// register catch all.
self.socket.on("*", function(notification, payload) {
if (notification !== "*") {
//console.log('Received notification: ' + notification +', payload: ' + payload);
notificationCallback(notification, payload);
}
});

View File

@@ -111,41 +111,60 @@ var Translator = (function() {
translations: {},
translationsFallback: {},
/* translate(module, key)
/* translate(module, key, variables)
* Load a translation for a given key for a given module.
*
* argument module Module - The module to load the translation for.
* argument key string - The key of the text to translate.
* argument variables - The variables to use within the translation template (optional)
*/
translate: function(module, key) {
translate: function(module, key, variables) {
variables = variables || {}; //Empty object by default
// Combines template and variables like:
// template: "Please wait for {timeToWait} before continuing with {work}."
// variables: {timeToWait: "2 hours", work: "painting"}
// to: "Please wait for 2 hours before continuing with painting."
function createStringFromTemplate(template, variables) {
if(Object.prototype.toString.call(template) !== "[object String]") {
return template;
}
if(variables.fallback && !template.match(new RegExp("\{.+\}"))) {
template = variables.fallback;
}
return template.replace(new RegExp("\{([^\}]+)\}", "g"), function(_unused, varName){
return variables[varName] || "{"+varName+"}";
});
}
if(this.translations[module.name] && key in this.translations[module.name]) {
// Log.log("Got translation for " + key + " from module translation: ");
return this.translations[module.name][key];
return createStringFromTemplate(this.translations[module.name][key], variables);
}
if (key in this.coreTranslations) {
// Log.log("Got translation for " + key + " from core translation.");
return this.coreTranslations[key];
return createStringFromTemplate(this.coreTranslations[key], variables);
}
if (this.translationsFallback[module.name] && key in this.translationsFallback[module.name]) {
// Log.log("Got translation for " + key + " from module translation fallback.");
return this.translationsFallback[module.name][key];
return createStringFromTemplate(this.translationsFallback[module.name][key], variables);
}
if (key in this.coreTranslationsFallback) {
// Log.log("Got translation for " + key + " from core translation fallback.");
return this.coreTranslationsFallback[key];
return createStringFromTemplate(this.coreTranslationsFallback[key], variables);
}
return key;
},
/* load(module, file, callback)
/* load(module, file, isFallback, callback)
* Load a translation file (json) and remember the data.
*
* argument module Module - The module to load the translation file for.
* argument file string - Path of the file we want to load.
* argument isFallback boolean - Flag to indicate fallback translations.
* argument callback function - Function called when done.
*/
load: function(module, file, isFallback, callback) {
@@ -201,10 +220,12 @@ var Translator = (function() {
// defined translation after the following line.
for (var first in translations) {break;}
Log.log("Loading core translation fallback file: " + translations[first]);
loadJSON(translations[first], function(translations) {
self.coreTranslationsFallback = translations;
});
if (first) {
Log.log("Loading core translation fallback file: " + translations[first]);
loadJSON(translations[first], function(translations) {
self.coreTranslationsFallback = translations;
});
}
},
};
})();

19
js/utils.js Normal file
View File

@@ -0,0 +1,19 @@
/* exported Utils */
/* Magic Mirror
* Utils
*
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
* MIT Licensed.
*/
var colors = require("colors/safe");
var Utils = {
colors: {
warn: colors.yellow,
error: colors.red,
info: colors.blue
}
};
if (typeof module !== "undefined") {module.exports = Utils;}

13
jsconfig.json Normal file
View File

@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=759670
// for the documentation about the jsconfig.json format
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"modules",
"node_modules"
]
}

31
module-types.ts Normal file
View File

@@ -0,0 +1,31 @@
type ModuleProperties = {
defaults?: object,
start?(): void,
getHeader?(): string,
getTemplate?(): string,
getTemplateData?(): object,
notificationReceived?(notification: string, payload: any, sender: object): void,
socketNotificationReceived?(notification: string, payload: any): void,
suspend?(): void,
resume?(): void,
getDom?(): HTMLElement,
getStyles?(): string[],
[key: string]: any,
};
export declare const Module: {
register(moduleName: string, moduleProperties: ModuleProperties): void;
};
export declare const Log: {
info(message?: any, ...optionalParams: any[]): void,
log(message?: any, ...optionalParams: any[]): void,
error(message?: any, ...optionalParams: any[]): void,
warn(message?: any, ...optionalParams: any[]): void,
group(groupTitle?: string, ...optionalParams: any[]): void,
groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void,
groupEnd(): void,
time(timerName?: string): void,
timeEnd(timerName?: string): void,
timeStamp(timerName?: string): void,
};

View File

@@ -2,19 +2,55 @@
This document describes the way to develop your own MagicMirror² modules.
Table of Contents:
- Module structure
- Files
- The Core module file: modulename.js
- Available module instance properties
- Subclassable module methods
- Module instance methods
- Visibility locking
- The Node Helper: node_helper.js
- Available module instance properties
- Subclassable module methods
- Module instance methods
- MagicMirror Helper Methods
- Module Selection
- MagicMirror Logger
---
## General Advice
As MagicMirror has gained huge popularity, so has the number of available modules. For new users and developers alike, it is very time consuming to navigate around the various repositories in order to find out what exactly a certain modules does, how it looks and what it depends on. Unfortunately, this information is rarely available, nor easily obtained without having to install it first.
Therefore **we highly recommend you to include the following information in your README file.**
- A high quality screenshot of your working module
- A short, one sentence, clear description what it does (duh!)
- What external API's it depend on, including web links to those
- Wheteher the API/request require a key and the user limitations of those. (Is it free?)
Surely this also help you get better recognition and feedback for your work.
## Module structure
All modules are loaded in de `modules` folder. The default modules are grouped together in the `modules/default` folder. Your module should be placed in a subfolder of `modules`. Note that any file or folder your create in the `modules` folder will be ignored by git, allowing you to upgrade the MagicMirror² without the loss of your files.
All modules are loaded in the `modules` folder. The default modules are grouped together in the `modules/default` folder. Your module should be placed in a subfolder of `modules`. Note that any file or folder your create in the `modules` folder will be ignored by git, allowing you to upgrade the MagicMirror² without the loss of your files.
A module can be placed in one single folder. Or multiple modules can be grouped in a subfoler. Note that name of the module must be unique. Even when a module with a similar name is placed in a different folder, they can't be loaded at the same time.
A module can be placed in one single folder. Or multiple modules can be grouped in a subfolder. Note that name of the module must be unique. Even when a module with a similar name is placed in a different folder, they can't be loaded at the same time.
### Files
- **modulename/modulename.js** - This is your core module script.
- **modulename/node_helper.js** - This is an optional helper that whill be loaded by the node script. The node helper and module script can communicate with each other using an intergrated socket system.
- **modulename/node_helper.js** - This is an optional helper that will be loaded by the node script. The node helper and module script can communicate with each other using an intergrated socket system.
- **modulename/public** - Any files in this folder can be accesed via the browser on `/modulename/filename.ext`.
- **modulename/anyfileorfolder** Any other file or folder in the module folder can be used by the core module script. For example: *modulename/css/modulename.css* would be a good path for your additional module styles.
## Core module file: modulename.js
## The Core module file: modulename.js
This is the script in which the module will be defined. This script is required in order for the module to be used. In it's most simple form, the core module file must contain:
````javascript
Module.register("modulename",{});
@@ -44,30 +80,16 @@ As you can see, the `Module.register()` method takes two arguments: the name of
### Available module instance properties
After the module is initialized, the module instance has a few available module properties:
####`this.name`
**String**
| Instance Property | Type | Description |
|:----------------- |:---- |:----------- |
| `this.name` | String | The name of the module. |
| `this.identifier` | String | This is a unique identifier for the module instance. |
| `this.hidden` | Boolean | This represents if the module is currently hidden (faded away). |
| `this.config` | Boolean | The configuration of the module instance as set in the user's `config.js` file. This config will also contain the module's defaults if these properties are not over-written by the user config. |
| `this.data` | Object | The data object contain additional metadata about the module instance. (See below) |
The name of the module.
####`this.identifier`
**String**
This is a unique identifier for the module instance.
####`this.hidden`
**Boolean**
This represents if the module is currently hidden (faded away).
####`this.config`
**Boolean**
The configuration of the module instance as set in the user's config.js file. This config will also contain the module's defaults if these properties are not over written by the user config.
####`this.data`
**Object**
The data object contains additional metadata about the module instance:
The `this.data` data object contain the follwoing metadata:
- `data.classes` - The classes which are added to the module dom wrapper.
- `data.file` - The filename of the core module file.
- `data.path` - The path of the module folder.
@@ -75,15 +97,43 @@ The data object contains additional metadata about the module instance:
- `data.position` - The position in which the instance will be shown.
####`defaults: {}`
#### `defaults: {}`
Any properties defined in the defaults object, will be merged with the module config as defined in the user's config.js file. This is the best place to set your modules's configuration defaults. Any of the module configuration properties can be accessed using `this.config.propertyName`, but more about that later.
#### `requiresVersion:`
*Introduced in version: 2.1.0.*
A string that defines the minimum version of the MagicMirror framework. If it is set, the system compares the required version with the users version. If the version of the user is out of date, it won't run the module. Make sure to also set this value in the Node helper.
**Note:** Since this check is introduced in version 2.1.0, this check will not be run in older versions. Keep this in mind if you get issue reports on your module.
Example:
````javascript
requiresVersion: "2.1.0",
````
### Subclassable module methods
####`init()`
#### `init()`
This method is called when a module gets instantiated. In most cases you do not need to subclass this method.
####`start()`
#### `loaded(callback)`
*Introduced in version: 2.1.1.*
This method is called when a module is loaded. Subsequent modules in the config are not yet loaded. The `callback` function MUST be called when the module is done loading. In most cases you do not need to subclass this method.
**Example:**
````javascript
loaded: function(callback) {
this.finishLoading();
Log.log(this.name + ' is loaded!');
callback();
}
````
#### `start()`
This method is called when all modules are loaded an the system is ready to boot up. Keep in mind that the dom object for the module is not yet created. The start method is a perfect place to define any additional module properties:
**Example:**
@@ -94,7 +144,7 @@ start: function() {
}
````
####`getScripts()`
#### `getScripts()`
**Should return: Array**
The getScripts method is called to request any additional scripts that need to be loaded. This method should therefore return an array with strings. If you want to return a full path to a file in the module folder, use the `this.file('filename.js')` method. In all cases the loader will only load a file once. It even checks if the file is available in the default vendor folder.
@@ -104,7 +154,7 @@ The getScripts method is called to request any additional scripts that need to b
getScripts: function() {
return [
'script.js', // will try to load it from the vendor folder, otherwise it will load is from the module folder.
'moment.js', // this file is available in the vendor folder, so it doesn't need to be avialable in the module folder.
'moment.js', // this file is available in the vendor folder, so it doesn't need to be available in the module folder.
this.file('anotherfile.js'), // this file will be loaded straight from the module folder.
'https://code.jquery.com/jquery-2.2.3.min.js', // this file will be loaded from the jquery servers.
]
@@ -114,7 +164,7 @@ getScripts: function() {
**Note:** If a file can not be loaded, the boot up of the mirror will stall. Therefore it's advised not to use any external urls.
####`getStyles()`
#### `getStyles()`
**Should return: Array**
The getStyles method is called to request any additional stylesheets that need to be loaded. This method should therefore return an array with strings. If you want to return a full path to a file in the module folder, use the `this.file('filename.css')` method. In all cases the loader will only load a file once. It even checks if the file is available in the default vendor folder.
@@ -133,7 +183,7 @@ getStyles: function() {
````
**Note:** If a file can not be loaded, the boot up of the mirror will stall. Therefore it's advised not to use any external urls.
####`getTranslations()`
#### `getTranslations()`
**Should return: Dictionary**
The getTranslations method is called to request translation files that need to be loaded. This method should therefore return a dictionary with the files to load, identified by the country's short name.
@@ -151,10 +201,10 @@ getTranslations: function() {
````
####`getDom()`
#### `getDom()`
**Should return:** Dom Object
Whenever the MagicMirror needs to update the information on screen (because it starts, or because your module asked a refresh using `this.updateDom()`), the system calls the getDom method. This method should therefor return a dom object.
Whenever the MagicMirror needs to update the information on screen (because it starts, or because your module asked a refresh using `this.updateDom()`), the system calls the getDom method. This method should therefore return a dom object.
**Example:**
````javascript
@@ -166,7 +216,24 @@ getDom: function() {
````
####`notificationReceived(notification, payload, sender)`
#### `getHeader()`
**Should return:** String
Whenever the MagicMirror needs to update the information on screen (because it starts, or because your module asked a refresh using `this.updateDom()`), the system calls the getHeader method to retrieve the module's header. This method should therefor return a string. If this method is not subclassed, this function will return the user's configured header.
If you want to use the original user's configured header, reference `this.data.header`.
**NOTE:** If the user did not configure a default header, no header will be displayed and thus this method will not be called.
**Example:**
````javascript
getHeader: function() {
return this.data.header + ' Foo Bar';
}
````
#### `notificationReceived(notification, payload, sender)`
That MagicMirror core has the ability to send notifications to modules. Or even better: the modules have the possibility to send notifications to other modules. When this module is called, it has 3 arguments:
@@ -185,21 +252,22 @@ notificationReceived: function(notification, payload, sender) {
}
````
**Note:** the system sends two notifiations when starting up. These notifications could come in handy!
**Note:** the system sends three notifications when starting up. These notifications could come in handy!
- `ALL_MODULES_STARTED` - All modules are started. You can now send notifications to other modules.
- `DOM_OBJECTS_CREATED` - All dom objects are created. The system is now ready to perform visual changes.
- `MODULE_DOM_CREATED` - This module's dom has been fully loaded. You can now access your module's dom objects.
####`socketNotificationReceived: function(notification, payload)`
#### `socketNotificationReceived: function(notification, payload)`
When using a node_helper, the node helper can send your module notifications. When this module is called, it has 2 arguments:
- `notification` - String - The notification identifier.
- `payload` - AnyType - The payload of a notification.
**Note 1:** When a node helper send a notification, all modules of that module type receive the same notifications. <br>
**Note 2:** The socket connection is established as soon as the module sends it's first message using [sendSocketNotification](thissendsocketnotificationnotification-payload).
**Note 1:** When a node helper sends a notification, all modules of that module type receive the same notifications. <br>
**Note 2:** The socket connection is established as soon as the module sends its first message using [sendSocketNotification](thissendsocketnotificationnotification-payload).
**Example:**
````javascript
@@ -208,28 +276,28 @@ socketNotificationReceived: function(notification, payload) {
},
````
####`suspend()`
#### `suspend()`
When a module is hidden (using the `module.hide()` method), the `suspend()` method will be called. By subclassing this method you can perform tasks like halting the update timers.
####`resume()`
When a module will be shown after it was previously hidden (using the `module.show()` method), the `resume()` method will be called. By subclassing this method you can perform tasks restarting the update timers.
#### `resume()`
When a module is requested to be shown (using the `module.show()` method), the `resume()` method will be called. By subclassing this method you can perform tasks restarting the update timers.
### Module instance methods
Each module instance has some handy methods which can be helpfull building your module.
Each module instance has some handy methods which can be helpful building your module.
####`this.file(filename)`
#### `this.file(filename)`
***filename* String** - The name of the file you want to create the path for.<br>
**Returns String**
If you want to create a path to a file in your module folder, use the `file()` method. It returns the path to the filename given as the attribute. Is method comes in handy when configuring the [getScripts](#getscripts) and [getStyles](#getstyles) methods.
####`this.updateDom(speed)`
#### `this.updateDom(speed)`
***speed* Number** - Optional. Animation speed in milliseconds.<br>
Whenever your module need to be updated, call the `updateDom(speed)` method. It requests the MagicMirror core to update it's dom object. If you define the speed, the content update will be animated, but only if the content will realy change.
Whenever your module need to be updated, call the `updateDom(speed)` method. It requests the MagicMirror core to update its dom object. If you define the speed, the content update will be animated, but only if the content will really change.
As an example: the clock modules calls this method every second:
@@ -244,49 +312,119 @@ start: function() {
...
````
####`this.sendNotification(notification, payload)`
#### `this.sendNotification(notification, payload)`
***notification* String** - The notification identifier.<br>
***payload* AnyType** - Optional. A notification payload.<br>
If you want to send a notification to all other modules, use the `sendNotification(notification, payload)`. All other modules will receive the message via the [notificationReceived](#notificationreceivednotification-payload-sender) method. In that case, the sender is automaticly set to the instance calling the sendNotification method.
If you want to send a notification to all other modules, use the `sendNotification(notification, payload)`. All other modules will receive the message via the [notificationReceived](#notificationreceivednotification-payload-sender) method. In that case, the sender is automatically set to the instance calling the sendNotification method.
**Example:**
````javascript
this.sendNotification('MYMODULE_READY_FOR_ACTION', {foo:bar});
````
####`this.sendSocketNotification(notification, payload)`
#### `this.sendSocketNotification(notification, payload)`
***notification* String** - The notification identifier.<br>
***payload* AnyType** - Optional. A notification payload.<br>
If you want to send a notification to the node_helper, use the `sendSocketNotification(notification, payload)`. Only the node_helper of this module will recieve the socket notification.
If you want to send a notification to the node_helper, use the `sendSocketNotification(notification, payload)`. Only the node_helper of this module will receive the socket notification.
**Example:**
````javascript
this.sendSocketNotification('SET_CONFIG', this.config);
````
####`this.hide(speed, callback)`
***speed* Number** - Optional, The speed of the hide animation in milliseconds.
#### `this.hide(speed, callback, options)`
***speed* Number** - Optional (Required when setting callback or options), The speed of the hide animation in milliseconds.
***callback* Function** - Optional, The callback after the hide animation is finished.
***options* Function** - Optional, Object with additional options for the hide action (see below). (*Introduced in version: 2.1.0.*)
To hide a module, you can call the `hide(speed, callback)` method. You can call the hide method on the module instance itself using `this.hide()`, but of course you can also hide another module using `anOtherModule.hide()`.
Possible configurable options:
- `lockString` - String - When setting lock string, the module can not be shown without passing the correct lockstring. This way (multiple) modules can prevent a module from showing. It's considered best practice to use your modules identifier as the locksString: `this.identifier`. See *visibility locking* below.
To hide a module, you can call the `hide(speed, callback)` method. You can call the hide method on the module instance itselve using `this.hide()`, but of course you can also hide an other module using `anOtherModule.hide()`.
**Note 1:** If the hide animation is canceled, for instance because the show method is called before the hide animation was finished, the callback will not be called.<br>
**Note 2:** If the hide animation is hijacked (an other method calls hide on the same module), the callback will not be called.<br>
**Note 3:** If the dom is not yet created, the hide method won't work. Wait for the `DOM_OBJECTS_CREATED` [notification](#notificationreceivednotification-payload-sender).
####`this.show(speed, callback)`
***speed* Number** - Optional, The speed of the show animation in milliseconds.
***callback* Function** - Optional, The callback after the show animation is finished.
To show a module, you can call the `show(speed, callback)` method. You can call the show method on the module instance itselve using `this.show()`, but of course you can also show an other module using `anOtherModule.show()`.
#### `this.show(speed, callback, options)`
***speed* Number** - Optional (Required when setting callback or options), The speed of the show animation in milliseconds.
***callback* Function** - Optional, The callback after the show animation is finished.
***options* Function** - Optional, Object with additional options for the show action (see below). (*Introduced in version: 2.1.0.*)
To show a module, you can call the `show(speed, callback)` method. You can call the show method on the module instance itself using `this.show()`, but of course you can also show another module using `anOtherModule.show()`.
Possible configurable options:
- `lockString` - String - When setting lock string, the module can not be shown without passing the correct lockstring. This way (multiple) modules can prevent a module from showing. See *visibility locking* below.
- `force` - Boolean - When setting the force tag to `true`, the locking mechanism will be overwritten. Use this option with caution. It's considered best practice to let the usage of the force option be use- configurable. See *visibility locking* below.
**Note 1:** If the show animation is canceled, for instance because the hide method is called before the show animation was finished, the callback will not be called.<br>
**Note 2:** If the show animation is hijacked (an other method calls show on the same module), the callback will not be called.<br>
**Note 3:** If the dom is not yet created, the show method won't work. Wait for the `DOM_OBJECTS_CREATED` [notification](#notificationreceivednotification-payload-sender).
####`this.translate(identifier)`
#### Visibility locking
(*Introduced in version: 2.1.0.*)
Visiblity locking helps the module system to prevent unwanted hide/show actions. The following scenario explains the concept:
**Module B asks module A to hide:**
````javascript
moduleA.hide(0, {lockString: "module_b_identifier"});
````
Module A is now hidden, and has an lock array with the following strings:
````javascript
moduleA.lockStrings == ["module_b_identifier"]
moduleA.hidden == true
````
**Module C asks module A to hide:**
````javascript
moduleA.hide(0, {lockString: "module_c_identifier"});
````
Module A is now hidden, and has an lock array with the following strings:
````javascript
moduleA.lockStrings == ["module_b_identifier", "module_c_identifier"]
moduleA.hidden == true
````
**Module B asks module A to show:**
````javascript
moduleA.show(0, {lockString: "module_b_identifier"});
````
The lockString will be removed from moduleAs locks array, but since there still is an other lock string available, the module remains hidden:
````javascript
moduleA.lockStrings == ["module_c_identifier"]
moduleA.hidden == true
````
**Module C asks module A to show:**
````javascript
moduleA.show(0, {lockString: "module_c_identifier"});
````
The lockString will be removed from moduleAs locks array, and since this will result in an empty lock array, the module will be visible:
````javascript
moduleA.lockStrings == []
moduleA.hidden == false
````
**Note:** The locking mechanism can be overwritten by using the force tag:
````javascript
moduleA.show(0, {force: true});
````
This will reset the lockstring array, and will show the module.
````javascript
moduleA.lockStrings == []
moduleA.hidden == false
````
Use this `force` method with caution. See `show()` method for more information.
#### `this.translate(identifier)`
***identifier* String** - Identifier of the string that should be translated.
The Magic Mirror contains a convenience wrapper for `l18n`. You can use this to automatically serve different translations for your modules based on the user's `language` configuration.
@@ -314,6 +452,51 @@ this.translate("INFO") //Will return a translated string for the identifier INFO
**Note:** although comments are officially not supported in JSON files, MagicMirror allows it by stripping the comments before parsing the JSON file. Comments in translation files could help other translators.
##### `this.translate(identifier, variables)`
***identifier* String** - Identifier of the string that should be translated.
***variables* Object** - Object of variables to be used in translation.
This improved and backwards compatible way to handle translations behaves like the normal translation function and follows the rules described above. It's recommended to use this new format for translating everywhere. It allows translator to change the word order in the sentence to be translated.
**Example:**
````javascript
var timeUntilEnd = moment(event.endDate, "x").fromNow(true);
this.translate("RUNNING", { "timeUntilEnd": timeUntilEnd) }); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended.
````
**Example English .json file:**
````javascript
{
"RUNNING": "Ends in {timeUntilEnd}",
}
````
**Example Finnish .json file:**
````javascript
{
"RUNNING": "Päättyy {timeUntilEnd} päästä",
}
````
**Note:** The *variables* Object has an special case called `fallback`. It's used to support old translations in translation files that do not have the variables in them. If you are upgrading an old module that had translations that did not support the word order, it is recommended to have the fallback layout.
**Example:**
````javascript
var timeUntilEnd = moment(event.endDate, "x").fromNow(true);
this.translate("RUNNING", {
"fallback": this.translate("RUNNING") + " {timeUntilEnd}"
"timeUntilEnd": timeUntilEnd
)}); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended. (has a fallback)
````
**Example swedish .json file that does not have the variable in it:**
````javascript
{
"RUNNING": "Slutar",
}
````
In this case the `translate`-function will not find any variables in the translation, will look for `fallback` variable and use that if possible to create the translation.
## The Node Helper: node_helper.js
@@ -328,21 +511,21 @@ var NodeHelper = require("node_helper");
module.exports = NodeHelper.create({});
````
Of course, the above helper would not do anything usefull. So with the information above, you should be able to make it a bit more sophisticated.
Of course, the above helper would not do anything useful. So with the information above, you should be able to make it a bit more sophisticated.
### Available module instance properties
####`this.name`
#### `this.name`
**String**
The name of the module
####`this.path`
#### `this.path`
**String**
The path of the module
####`this.expressApp`
#### `this.expressApp`
**Express App Instance**
This is a link to the express instance. It will allow you to define extra routes.
@@ -356,23 +539,36 @@ start: function() {
}
````
**Note: ** By default, a public path to your module's public folder will be created:
**Note:** By default, a public path to your module's public folder will be created:
````javascript
this.expressApp.use("/" + this.name, express.static(this.path + "/public"));
````
####`this.io`
#### `this.io`
**Socket IO Instance**
This is a link to the IO instance. It will allow you to do some Socket.IO magic. In most cases you won't need this, since the Node Helper has a few convenience methods to make this simple.
#### `requiresVersion:`
*Introduced in version: 2.1.0.*
A string that defines the minimum version of the MagicMirror framework. If it is set, the system compares the required version with the users version. If the version of the user is out of date, it won't run the module.
**Note:** Since this check is introduced in version 2.1.0, this check will not be run in older versions. Keep this in mind if you get issue reports on your module.
Example:
````javascript
requiresVersion: "2.1.0",
````
### Subclassable module methods
####`init()`
#### `init()`
This method is called when a node helper gets instantiated. In most cases you do not need to subclass this method.
####`start()`
This method is called when all node helper are loaded an the system is ready to boot up. The start method is a perfect place to define any additional module properties:
#### `start()`
This method is called when all node helpers are loaded and the system is ready to boot up. The start method is a perfect place to define any additional module properties:
**Example:**
````javascript
@@ -382,13 +578,24 @@ start: function() {
}
````
####`socketNotificationReceived: function(notification, payload)`
With this method, your node helper can receive notifications form your modules. When this method is called, it has 2 arguments:
#### `stop()`
This method is called when the MagicMirror server receives a `SIGINT` command and is shutting down. This method should include any commands needed to close any open connections, stop any sub-processes and gracefully exit the module.
**Example:**
````javascript
stop: function() {
console.log("Shutting down MyModule");
this.connection.close();
}
````
#### `socketNotificationReceived: function(notification, payload)`
With this method, your node helper can receive notifications from your modules. When this method is called, it has 2 arguments:
- `notification` - String - The notification identifier.
- `payload` - AnyType - The payload of a notification.
**Note:** The socket connection is established as soon as the module sends it's first message using [sendSocketNotification](thissendsocketnotificationnotification-payload).
**Note:** The socket connection is established as soon as the module sends its first message using [sendSocketNotification](thissendsocketnotificationnotification-payload).
**Example:**
````javascript
@@ -399,15 +606,15 @@ socketNotificationReceived: function(notification, payload) {
### Module instance methods
Each node helper has some handy methods which can be helpfull building your module.
Each node helper has some handy methods which can be helpful building your module.
####`this.sendSocketNotification(notification, payload)`
#### `this.sendSocketNotification(notification, payload)`
***notification* String** - The notification identifier.<br>
***payload* AnyType** - Optional. A notification payload.<br>
If you want to send a notification to all your modules, use the `sendSocketNotification(notification, payload)`. Only the module of your module type will recieve the socket notification.
If you want to send a notification to all your modules, use the `sendSocketNotification(notification, payload)`. Only the module of your module type will receive the socket notification.
**Note:** Since all instances of you module will receive the notifications, it's your task to make sure the right module responds to your messages.
**Note:** Since all instances of your module will receive the notifications, it's your task to make sure the right module responds to your messages.
**Example:**
````javascript
@@ -421,7 +628,7 @@ The core Magic Mirror object: `MM` has some handy method that will help you in c
### Module selection
The only additional method available for your module, is the feature to retrieve references to other modules. This can be used to hide and show other modules.
####`MM.getModules()`
#### `MM.getModules()`
**Returns Array** - An array with module instances.<br>
To make a selection of all currently loaded module instances, run the `MM.getModules()` method. It will return an array with all currently loaded module instances. The returned array has a lot of filtering methods. See below for more info.
@@ -429,11 +636,11 @@ To make a selection of all currently loaded module instances, run the `MM.getMod
**Note:** This method returns an empty array if not all modules are started yet. Wait for the `ALL_MODULES_STARTED` [notification](#notificationreceivednotification-payload-sender).
#####`.withClass(classnames)`
***classnames* String or Array** - The class names on which you want to filer.
##### `.withClass(classnames)`
***classnames* String or Array** - The class names on which you want to filter.
**Returns Array** - An array with module instances.<br>
If you want to make a selection based on one ore more class names, use the withClass method on a result of the `MM.getModules()` method. The argument of the `withClass(classname)` method can be an array, or space separated string.
If you want to make a selection based on one or more class names, use the withClass method on a result of the `MM.getModules()` method. The argument of the `withClass(classname)` method can be an array, or space separated string.
**Examples:**
````javascript
@@ -442,7 +649,7 @@ var modules = MM.getModules().withClass('classname1 classname2');
var modules = MM.getModules().withClass(['classname1','classname2']);
````
#####`.exceptWithClass(classnames)`
##### `.exceptWithClass(classnames)`
***classnames* String or Array** - The class names of the modules you want to remove from the results.
**Returns Array** - An array with module instances.<br>
@@ -455,11 +662,11 @@ var modules = MM.getModules().exceptWithClass('classname1 classname2');
var modules = MM.getModules().exceptWithClass(['classname1','classname2']);
````
#####`.exceptModule(module)`
##### `.exceptModule(module)`
***module* Module Object** - The reference to a module you want to remove from the results.
**Returns Array** - An array with module instances.<br>
If you to remove a specific module instance from a selection based on a classname, use the exceptWithClass method on a result of the `MM.getModules()` method. This can be helpfull if you want to select all module instances except the instance of your module.
If you to remove a specific module instance from a selection based on a classname, use the exceptWithClass method on a result of the `MM.getModules()` method. This can be helpful if you want to select all module instances except the instance of your module.
**Examples:**
````javascript
@@ -473,7 +680,7 @@ Of course, you can combine all of the above filters:
var modules = MM.getModules().withClass('classname1').exceptwithClass('classname2').exceptModule(aModule);
````
#####`.enumerate(callback)`
##### `.enumerate(callback)`
***callback* Function(module)** - The callback run on every instance.
If you want to perform an action on all selected modules, you can use the `enumerate` function:

View File

@@ -7,10 +7,10 @@ To use this module, add it to the modules array in the config/config.js file:
```
modules: [
{
module: 'alert',
module: "alert",
config: {
// The config property is optional.
// See 'Configuration options' for more information.
// See 'Configuration options' for more information.
}
}
]
@@ -21,145 +21,44 @@ modules: [
The following properties can be configured:
<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>effect</code></td>
<td>The animation effect to use for notifications.<br>
<br><b>Possible values:</b> <code>scale</code> <code>slide</code> <code>genie</code> <code>jelly</code> <code>flip</code> <code>exploader</code> <code>bouncyflip</code>
<br><b>Default value:</b> <code>slide</code>
</td>
</tr>
<td><code>alert_effect</code></td>
<td>The animation effect to use for alerts.<br>
<br><b>Possible values:</b> <code>scale</code> <code>slide</code> <code>genie</code> <code>jelly</code> <code>flip</code> <code>exploader</code> <code>bouncyflip</code>
<br><b>Default value:</b> <code>jelly</code>
</td>
</tr>
<tr>
<td><code>display_time</code></td>
<td>Time a notification is displayed in seconds.<br>
<br><b>Possible values:</b> <code>float</code> <code>int</code>
<br><b>Default value:</b> <code>3.5</code>
</td>
</tr>
<tr>
<tr>
<td><code>position</code></td>
<td>Position where the notifications should be displayed.<br>
<br><b>Possible values:</b> <code>left</code> <code>center</code> <code>right</code>
<br><b>Default value:</b> <code>center</code>
</td>
</tr>
<tr>
<td><code>welcome_message</code></td>
<td>Message shown at startup.<br>
<br><b>Possible values:</b> <code>string</code> <code>false</code>
<br><b>Default value:</b> <code>Welcome, start was successfull!</code>
</td>
</tr>
</tbody>
</table>
| Option | Description
| ----------------- | -----------
| `effect` | The animation effect to use for notifications. <br><br> **Possible values:** `scale` `slide` `genie` `jelly` `flip` `exploader` `bouncyflip` <br> **Default value:** `slide`
| `alert_effect` | The animation effect to use for alerts. <br><br> **Possible values:** `scale` `slide` `genie` `jelly` `flip` `exploader` `bouncyflip` <br> **Default value:** `jelly`
| `display_time` | Time a notification is displayed in milliseconds. <br><br> **Possible values:** `int` <br> **Default value:** `3500`
| `position` | Position where the notifications should be displayed. <br><br> **Possible values:** `left` `center` `right` <br> **Default value:** `center`
| `welcome_message` | Message shown at startup. <br><br> **Possible values:** `string` `false` <br> **Default value:** `false` (no message at startup)
## Developer notes
For notifications use:
```
self.sendNotification("SHOW_ALERT", {type: "notification"});
self.sendNotification("SHOW_ALERT", {type: "notification"});
```
For alerts use:
```
self.sendNotification("SHOW_ALERT", {});
self.sendNotification("SHOW_ALERT", {});
```
### Notification params
<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>title</code></td>
<td>The title of the notification.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
<tr>
<td><code>message</code></td>
<td>The message of the notification.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
</tbody>
</table>
| Option | Description
| --------- | -----------
| `title` | The title of the notification. <br><br> **Possible values:** `text` or `html`
| `message` | The message of the notification. <br><br> **Possible values:** `text` or `html`
### Alert params
<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>title</code></td>
<td>The title of the alert.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
<tr>
<td><code>message</code></td>
<td>The message of the alert.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
<tr>
<td><code>imageUrl</code> (optional)</td>
<td>Image to show in the alert<br>
<br><b>Possible values:</b> <code>url</code> <code>path</code>
<br><b>Default value:</b> <code>none</code>
</td>
</tr>
<tr>
<td><code>imageFA</code> (optional)</td>
<td>Font Awesome icon to show in the alert<br>
<br><b>Possible values:</b> See <a href="http://fontawesome.io/icons/" target="_blank">Font Awsome</a> website.
<br><b>Default value:</b> <code>none</code>
</td>
</tr>
<tr>
<td><code>imageHeight</code> (optional even with imageUrl set)</td>
<td>Height of the image<br>
<br><b>Possible values:</b> <code>intpx</code>
<br><b>Default value:</b> <code>80px</code>
</td>
</tr>
<tr>
<td><code>timer</code> (optional)</td>
<td>How long the alert should stay visible in ms.
<br><b>Important:</b> If you do not use the <code>timer</code>, it is your duty to hide the alert by using <code>self.sendNotification("HIDE_ALERT");</code>!<br>
<br><b>Possible values:</b> <code>int</code> <code>float</code>
<br><b>Default value:</b> <code>none</code>
</td>
</tr>
</tbody>
</table>
| Option | Description
| ----------------------------------------------- | -----------
| `title` | The title of the alert. <br><br> **Possible values:** `text` or `html`
| `message` | The message of the alert. <br><br> **Possible values:** `text` or `html`
| `imageUrl` (optional) | Image to show in the alert <br><br> **Possible values:** `url` `path` <br> **Default value:** `none`
| `imageFA` (optional) | Font Awesome icon to show in the alert <br><br> **Possible values:** See [Font Awsome](http://fontawesome.io/icons/) website. <br> **Default value:** `none`
| `imageHeight` (optional even with imageUrl set) | Height of the image <br><br> **Possible values:** `intpx` <br> **Default value:** `80px`
| `timer` (optional) | How long the alert should stay visible in ms. <br> **Important:** If you do not use the `timer`, it is your duty to hide the alert by using `self.sendNotification("HIDE_ALERT");`! <br><br>**Possible values:** `int` `float` <br> **Default value:** `none`
## Open Source Licenses
###[NotificationStyles](https://github.com/codrops/NotificationStyles)
See [ympanus.net](http://tympanus.net/codrops/licensing/) for license.
### [NotificationStyles](https://github.com/codrops/NotificationStyles)
See [ympanus.net](http://tympanus.net/codrops/licensing/) for license.

View File

@@ -30,12 +30,12 @@ Module.register("alert",{
getTranslations: function() {
return {
en: "translations/en.json",
de: "translations/de.json"
de: "translations/de.json",
nl: "translations/nl.json",
};
},
show_notification: function(message) {
if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;}
msg = "";
if (message.title) {
msg += "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span>";
@@ -46,7 +46,7 @@ Module.register("alert",{
}
msg += "<span class='light' style='font-size:28px;line-height: 30px;'>" + message.message + "</span>";
}
new NotificationFx({
message: msg,
layout: "growl",
@@ -110,11 +110,13 @@ Module.register("alert",{
},
hide_alert: function(sender) {
//Dismiss alert and remove from this.alerts
this.alerts[sender.name].dismiss();
this.alerts[sender.name] = null;
//Remove overlay
var overlay = document.getElementById("overlay");
overlay.parentNode.removeChild(overlay);
if (this.alerts[sender.name]) {
this.alerts[sender.name].dismiss();
this.alerts[sender.name] = null;
//Remove overlay
var overlay = document.getElementById("overlay");
overlay.parentNode.removeChild(overlay);
}
},
setPosition: function(pos) {
//Add css to body depending on the set position for notifications

View File

@@ -0,0 +1,4 @@
{
"sysTitle": "MagicMirror нотификация",
"welcome": "Добре дошли, стартирането беше успешно"
}

View File

@@ -0,0 +1,4 @@
{
"sysTitle": "MagicMirror Notifikation",
"welcome": "Velkommen, modulet er succesfuldt startet!"
}

Some files were not shown because too many files have changed in this diff Show More