From d4ec4795c3ad2e8cdbf539917f85764082de8ce0 Mon Sep 17 00:00:00 2001 From: Elan Trybuch Date: Thu, 16 Aug 2018 11:45:34 -0400 Subject: [PATCH 01/11] Fix ES6 syntax bug on RaspberryPi Zero W Following this issue https://github.com/MichMich/MagicMirror/issues/694 it seems that the Midori Browser does not recoginize ES6 syntax. Further, the use of 'var' is seen throughout the calendar module excpet on line 439, where the error is reported --- 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 0780fb5c..71a68efa 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -436,7 +436,7 @@ Module.register("calendar", { listContainsEvent: function(eventList, event){ - for(let evt of eventList){ + for(var evt of eventList){ if(evt.title === event.title && parseInt(evt.startDate) === parseInt(event.startDate)){ return true; } From 0ef4a86d426b23b9cf2fb224ea0da28178d27192 Mon Sep 17 00:00:00 2001 From: Elan Trybuch Date: Thu, 16 Aug 2018 11:51:10 -0400 Subject: [PATCH 02/11] Add patch note to CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c242e50..891a4bd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). --- +## [2.4.2] - 2018-08-16 + +### Fixed + +- Fix calendar parsing issue for Midori on RasperryPi Zero w, realted to issue #694. ## [2.4.1] - 2018-07-04 From 0b9d4f17ab70f4329ff3cd789f9b766d1bf7b7f6 Mon Sep 17 00:00:00 2001 From: Vincent Yang Date: Tue, 21 Aug 2018 01:04:58 -0700 Subject: [PATCH 03/11] Fix link for finding cities in OpenWeather --- config/config.js.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.js.sample b/config/config.js.sample index a427a548..9ef8780b 100644 --- a/config/config.js.sample +++ b/config/config.js.sample @@ -59,7 +59,7 @@ var config = { position: "top_right", config: { location: "New York", - locationID: "", //ID from http://www.openweathermap.org/help/city_list.txt + locationID: "", //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city appid: "YOUR_OPENWEATHER_API_KEY" } }, From 217034c4a7930b53b9d9a2f0298fdb85b52c8a80 Mon Sep 17 00:00:00 2001 From: Vincent Yang Date: Tue, 21 Aug 2018 01:06:12 -0700 Subject: [PATCH 04/11] Update Changelog for weather city link --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1d1f00b..728ec743 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed -- Fix calendar parsing issue for Midori on RasperryPi Zero w, realted to issue #694. +- Fix calendar parsing issue for Midori on RasperryPi Zero w, related to issue #694. +- Fix weather city ID link in sample config ## [2.5.0] - Unreleased From fa1f35a89e1fb967c16511658fbf0ff21b43ac79 Mon Sep 17 00:00:00 2001 From: ccrlawrence Date: Sun, 26 Aug 2018 15:53:01 +0100 Subject: [PATCH 05/11] ClientOnly: Global variable name used in callback function. The global 'config' variable is used in the callback function, changed to local one. Unwanted behaviour when accessing server on docker or if using 0.0.0.0 or blank address in config file as it just passes this to electron to display. --- clientonly/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clientonly/index.js b/clientonly/index.js index 28a45029..957ee114 100644 --- a/clientonly/index.js +++ b/clientonly/index.js @@ -62,13 +62,13 @@ // 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) { + .then(function (configReturn) { // 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); + configReturn.address = config.address; + configReturn.port = config.port; + env.config = JSON.stringify(configReturn); // Spawn electron application const electron = require("electron"); From c9293327ce292664816846b74779a871abccf31c Mon Sep 17 00:00:00 2001 From: ccrlawrence Date: Sun, 26 Aug 2018 16:01:41 +0100 Subject: [PATCH 06/11] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c242e50..f4c30462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ This project adheres to [Semantic Versioning](http://semver.org/). --- +## [2.4.2] - 2018-08-26 + +### Fixed + +- Fixed issue with clientonly not updating with IP address and port provided on command line. + ## [2.4.1] - 2018-07-04 ### Fixed From 7ba88a83f047046c038322e3ea25c227a2b2e3a9 Mon Sep 17 00:00:00 2001 From: vlb Date: Tue, 28 Aug 2018 13:05:06 +0200 Subject: [PATCH 07/11] consider events lasting several full days as full day events --- modules/default/calendar/calendarfetcher.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index ccd1f6c8..e3b53b0b 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -273,8 +273,7 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri var start = event.start || 0; var startDate = new Date(start); var end = event.end || 0; - - if (end - start === 24 * 60 * 60 * 1000 && startDate.getHours() === 0 && startDate.getMinutes() === 0) { + if (end - start >= 24 * 60 * 60 * 1000 && startDate.getHours() === 0 && startDate.getMinutes() === 0) { // Is 24 hours, and starts on the middle of the night. return true; } From c4e8cc1641b1be02592e6254ed06ed49f78998ed Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Tue, 28 Aug 2018 15:33:53 +0200 Subject: [PATCH 08/11] Correct changelog entry. --- CHANGELOG.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 728ec743..bc2d1525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). --- -## [2.5.1] - 2018-08-16 - -### Fixed - -- Fix calendar parsing issue for Midori on RasperryPi Zero w, related to issue #694. -- Fix weather city ID link in sample config - ## [2.5.0] - Unreleased *This release is scheduled to be released on 2018-10-01.* @@ -23,11 +16,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Hungarian translation for "Feels" and "Week" - Spanish translation for "Feels" - Add classes instead of inline style to the message from the module Alert -- Fix for weatherforecast rainfall rounding [#1374](https://github.com/MichMich/MagicMirror/issues/1374) ### Fixed - Mixup between german and spanish translation for newsfeed. - Fixed close dates to be absolute, if no configured in the config.js - module Calendar +- Fix for weatherforecast rainfall rounding [#1374](https://github.com/MichMich/MagicMirror/issues/1374) +- Fix calendar parsing issue for Midori on RasperryPi Zero w, related to issue #694. +- Fix weather city ID link in sample config ### Updated From c755c823facd697def2f7f2643b055108fe105be Mon Sep 17 00:00:00 2001 From: vlb Date: Tue, 28 Aug 2018 17:29:42 +0200 Subject: [PATCH 09/11] added support for events having a duration instead of an end --- CHANGELOG.md | 4 ++++ modules/default/calendar/calendarfetcher.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c242e50..c8cac15b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). --- +## Current - 2018-08-28 + +- Added support for events having a duration instead of an end. + ## [2.4.1] - 2018-07-04 ### Fixed diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index e3b53b0b..e8db5a95 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -90,6 +90,9 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri var endDate; if (typeof event.end !== "undefined") { endDate = eventDate(event, "end"); + } else if(typeof event.duration !== "undefined") { + dur=moment.duration(event.duration); + endDate = startDate.clone().add(dur); } else { if (!isFacebookBirthday) { endDate = startDate; @@ -273,7 +276,7 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri var start = event.start || 0; var startDate = new Date(start); var end = event.end || 0; - if (end - start >= 24 * 60 * 60 * 1000 && startDate.getHours() === 0 && startDate.getMinutes() === 0) { + if (((end - start) % (24 * 60 * 60 * 1000)) === 0 && startDate.getHours() === 0 && startDate.getMinutes() === 0) { // Is 24 hours, and starts on the middle of the night. return true; } From 7c579cf7b7af6b9f87a38b05ee78b432d0de5091 Mon Sep 17 00:00:00 2001 From: vlb Date: Tue, 28 Aug 2018 17:35:53 +0200 Subject: [PATCH 10/11] added support for showing end of events through config parameters showEnd and dateEndFormat --- modules/default/calendar/calendar.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 0780fb5c..d566e6c5 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -25,7 +25,9 @@ Module.register("calendar", { urgency: 7, timeFormat: "relative", dateFormat: "MMM Do", + dateEndFormat: "HH:mm", fullDayEventDateFormat: "MMM Do", + showEnd: true, getRelative: 6, fadePoint: 0.25, // Start on 1/4th of the list. hidePrivate: false, @@ -287,6 +289,10 @@ Module.register("calendar", { timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()); } } + if(this.config.showEnd){ + timeWrapper.innerHTML += "-" ; + timeWrapper.innerHTML += this.capFirst(moment(event.endDate , "x").format(this.config.fullDayEventDateFormat)); + } } else { if (event.startDate >= new Date()) { if (event.startDate - now < 2 * oneDay) { @@ -325,6 +331,11 @@ Module.register("calendar", { }) ); } + if (this.config.showEnd) { + timeWrapper.innerHTML += "-"; + timeWrapper.innerHTML += this.capFirst(moment(event.endDate, "x").format(this.config.dateEndFormat)); + + } } //timeWrapper.innerHTML += ' - '+ moment(event.startDate,'x').format('lll'); //console.log(event); From 5c25dd5b6df3bfca7317dac9d21f06d32dda00d5 Mon Sep 17 00:00:00 2001 From: Vincent Le Bourlot Date: Tue, 28 Aug 2018 18:00:13 +0200 Subject: [PATCH 11/11] Update CHANGELOG.md --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8cac15b..bcc063b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,35 @@ This project adheres to [Semantic Versioning](http://semver.org/). --- -## Current - 2018-08-28 +## [2.5.0] - Unreleased -- Added support for events having a duration instead of an end. +*This release is scheduled to be released on 2018-10-01.* + +### Added +- French translate for "Feels" +- Translations for newsfeed module +- Support for toggling news article in fullscreen +- Hungarian translation for "Feels" and "Week" +- Spanish translation for "Feels" +- Add classes instead of inline style to the message from the module Alert +- Support for events having a duration instead of an end +- Support for showing end of events through config parameters showEnd and dateEndFormat + +### Fixed +- Mixup between german and spanish translation for newsfeed. +- Fixed close dates to be absolute, if no configured in the config.js - module Calendar +- Fix for weatherforecast rainfall rounding [#1374](https://github.com/MichMich/MagicMirror/issues/1374) +- Fix calendar parsing issue for Midori on RasperryPi Zero w, related to issue #694. +- Fix weather city ID link in sample config +- Fixed issue with clientonly not updating with IP address and port provided on command line. + +### Updated + +- Swedish translations +- Hungarian translations for the updatenotification module +- Updated Norsk bokmål translation +- Updated Norsk nynorsk translation +- Consider multi days event as full day events ## [2.4.1] - 2018-07-04