From b01b9758e0503755e97d805d13021be6acf32831 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 9 Jan 2019 21:24:14 +0000 Subject: [PATCH 01/11] remove Font Awesome 4 dependency --- vendor/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/vendor/package.json b/vendor/package.json index d14f8bcb..241374cb 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -11,7 +11,6 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^5.3.1", - "font-awesome": "^4.7.0", "moment": "^2.17.1", "moment-timezone": "^0.5.11", "nunjucks": "^3.0.1", From ef82039401b5122889fac0d8762a25440328b1e8 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 9 Jan 2019 21:29:49 +0000 Subject: [PATCH 02/11] Allow multiple css to be included for one vendor --- vendor/css/font-awesome.css | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 vendor/css/font-awesome.css diff --git a/vendor/css/font-awesome.css b/vendor/css/font-awesome.css new file mode 100644 index 00000000..2ba4a708 --- /dev/null +++ b/vendor/css/font-awesome.css @@ -0,0 +1,2 @@ +@import url("../node_modules/@fortawesome/fontawesome-free/css/all.min.css"); +@import url("../node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css"); \ No newline at end of file From 7c3923ad00b1e47b1992987a131d940ae7330fa6 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 9 Jan 2019 21:32:43 +0000 Subject: [PATCH 03/11] Use Font Awesome 5 (with backwards compatibility) for all modules --- vendor/vendor.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vendor/vendor.js b/vendor/vendor.js index abbf1423..6acf8427 100644 --- a/vendor/vendor.js +++ b/vendor/vendor.js @@ -12,9 +12,7 @@ var vendor = { "moment-timezone.js" : "node_modules/moment-timezone/builds/moment-timezone-with-data.js", "weather-icons.css": "node_modules/weathericons/css/weather-icons.css", "weather-icons-wind.css": "node_modules/weathericons/css/weather-icons-wind.css", - "font-awesome.css": "node_modules/font-awesome/css/font-awesome.min.css", - "font-awesome5.css": "node_modules/@fortawesome/fontawesome-free/css/all.min.css", - "font-awesome5.v4shims.css": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css", + "font-awesome.css": "css/font-awesome.css", "nunjucks.js": "node_modules/nunjucks/browser/nunjucks.min.js" }; From 00922891052041c2c9f02926d77ccd5114698bf0 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 9 Jan 2019 21:38:07 +0000 Subject: [PATCH 04/11] revert font awesome reference --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 38b04269..7b813809 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -51,7 +51,7 @@ Module.register("calendar", { // Define required scripts. getStyles: function () { - return ["calendar.css", "font-awesome5.css", "font-awesome5.v4shims.css"]; + return ["calendar.css", "font-awesome.css"]; }, // Define required scripts. From 8546d6730c98471d167c858555458720bf4dae29 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 10 Jan 2019 12:44:35 +0000 Subject: [PATCH 05/11] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d84620..387dcdb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixed unhandled error on bad git data in updatenotiifcation module [#1285](https://github.com/MichMich/MagicMirror/issues/1285). - Weather forecast now works with openweathermap in new weather module. Daily data are displayed, see issue [#1504](https://github.com/MichMich/MagicMirror/issues/1504). - Fixed analogue clock border display issue where non-black backgrounds used (previous fix for issue 611) +- Fixed compatibility issues caused when modules request different versions of Font Awesome, see issue [#1522](https://github.com/MichMich/MagicMirror/issues/1522). MagicMirror now uses [Font Awesome 5 with v4 shims included for backwards compatibility](https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#shims). ### New weather module - Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499). From 8f24cc8d137b508d10f61d8df8d70c9ad6c9a1ac Mon Sep 17 00:00:00 2001 From: fdahms Date: Sat, 12 Jan 2019 18:06:52 +0100 Subject: [PATCH 06/11] editing CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 387dcdb1..ad4336c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Italian translation for "Feels" +- Disabled the screensaver on raspbian with installation script + ### Updated - Bumped the Electron dependency to v3.0.13 to support the most recent Raspbian. [#1500](https://github.com/MichMich/MagicMirror/issues/1500) @@ -23,6 +25,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Weather forecast now works with openweathermap in new weather module. Daily data are displayed, see issue [#1504](https://github.com/MichMich/MagicMirror/issues/1504). - Fixed analogue clock border display issue where non-black backgrounds used (previous fix for issue 611) - Fixed compatibility issues caused when modules request different versions of Font Awesome, see issue [#1522](https://github.com/MichMich/MagicMirror/issues/1522). MagicMirror now uses [Font Awesome 5 with v4 shims included for backwards compatibility](https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#shims). +- Installation script problems with raspbian ### New weather module - Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499). From f87adebe41df0ea9a7fa600daa28dcd313fbdf27 Mon Sep 17 00:00:00 2001 From: fdahms Date: Sat, 12 Jan 2019 18:11:48 +0100 Subject: [PATCH 07/11] Fixing raspbian installer * fixing issue #1377 * fixing problem with old node installation from fresh raspbian * add feature for disable screen saver --- installers/raspberry.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/installers/raspberry.sh b/installers/raspberry.sh index 4e9c20d8..6e618c99 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -47,7 +47,7 @@ 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" NODE_INSTALL=false -if command_exists node; then +if command_exists node && command_exists npm; then echo -e "\e[0mNode currently installed. Checking version number."; NODE_CURRENT=$(node -v) echo -e "\e[0mMinimum Node version: \e[1m$NODE_TESTED\e[0m" @@ -152,9 +152,19 @@ fi 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 + if [[ "$(ps --no-headers -o comm 1)" =~ systemd ]]; then #Checking for systemd + sudo pm2 startup systemd -u pi --hp /home/pi + else + sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi" + fi + pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json + pm2 save +fi +# Disable Screensaver +read -p "Do you want to disable the screen saver? (y/N)?" choice +if [[ $choice =~ ^[Yy]$ ]]; then + su -c "echo -e '@xset s noblank\n@xset s off\n@xset -dpms' >> /etc/xdg/lxsession/LXDE-pi/autostart" + export DISPLAY=:0; xset s noblank;xset s off;xset -dpms fi echo " " From 90c96f7479444c6f77c52a953ba1aefb8a059d67 Mon Sep 17 00:00:00 2001 From: Yvonne Date: Sun, 13 Jan 2019 09:26:37 +1100 Subject: [PATCH 08/11] Update README.md --- modules/default/weather/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/weather/README.md b/modules/default/weather/README.md index 89e65de1..1bfa3aff 100644 --- a/modules/default/weather/README.md +++ b/modules/default/weather/README.md @@ -2,7 +2,7 @@ This module is aimed to be the replacement for the current `currentweather` and `weatherforcast` modules. The module will be configurable to be used as a current weather view, or to show the forecast. This way the module can be used twice to fullfil both purposes. -The biggest cange is the use of weather providers. This way we are not bound to one API source. And users can choose which API they want to use as their source. +The biggest change is the use of weather providers. This way we are not bound to one API source. And users can choose which API they want to use as their source. The module is in a very early stage, and needs a lot of work. It's API isn't set in stone, so keep that in mind when you want to contribute. From 1c830594829c6544f81230879a8b8f6614c4153d Mon Sep 17 00:00:00 2001 From: Jan Syring-Lingenfelder Date: Sun, 13 Jan 2019 16:07:02 +0100 Subject: [PATCH 09/11] fix: only show repeating count if the event is actually repeating --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 7b813809..d9cc8291 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -220,7 +220,7 @@ Module.register("calendar", { var titleWrapper = document.createElement("td"), repeatingCountTitle = ""; - if (this.config.displayRepeatingCountTitle) { + if (this.config.displayRepeatingCountTitle && event.firstYear !== undefined) { repeatingCountTitle = this.countTitleForUrl(event.url); From 06e641015f7853d7cb1dc52c8819befc1f2cc0f1 Mon Sep 17 00:00:00 2001 From: Jan Syring-Lingenfelder Date: Sun, 13 Jan 2019 16:25:57 +0100 Subject: [PATCH 10/11] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4336c8..0a1c4693 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixed analogue clock border display issue where non-black backgrounds used (previous fix for issue 611) - Fixed compatibility issues caused when modules request different versions of Font Awesome, see issue [#1522](https://github.com/MichMich/MagicMirror/issues/1522). MagicMirror now uses [Font Awesome 5 with v4 shims included for backwards compatibility](https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#shims). - Installation script problems with raspbian +- Calendar: only show repeating count if the event is actually repeating [#1534](https://github.com/MichMich/MagicMirror/pull/1534) ### New weather module - Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499). From 6d9675a299287a52430fc0bc1e59439f1ff12f09 Mon Sep 17 00:00:00 2001 From: fdahms Date: Sun, 13 Jan 2019 20:07:20 +0100 Subject: [PATCH 11/11] forgot one sudo --- installers/raspberry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/raspberry.sh b/installers/raspberry.sh index 6e618c99..1551b5fb 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -163,7 +163,7 @@ fi # Disable Screensaver read -p "Do you want to disable the screen saver? (y/N)?" choice if [[ $choice =~ ^[Yy]$ ]]; then - su -c "echo -e '@xset s noblank\n@xset s off\n@xset -dpms' >> /etc/xdg/lxsession/LXDE-pi/autostart" + sudo su -c "echo -e '@xset s noblank\n@xset s off\n@xset -dpms' >> /etc/xdg/lxsession/LXDE-pi/autostart" export DISPLAY=:0; xset s noblank;xset s off;xset -dpms fi