Fix merge issue.

This commit is contained in:
Michael Teeuw 2019-06-27 09:29:01 +02:00
commit f90bec985a
2 changed files with 10 additions and 9 deletions

View File

@ -20,14 +20,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added feature to broadcast news feed items `NEWS_FEED` and updated news items `NEWS_FEED_UPDATED` in default [newsfeed](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/newsfeed) module (when news is updated) with documented default and `config.js` options in [README.md](https://github.com/MichMich/MagicMirror/blob/develop/modules/default/newsfeed/README.md) - Added feature to broadcast news feed items `NEWS_FEED` and updated news items `NEWS_FEED_UPDATED` in default [newsfeed](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/newsfeed) module (when news is updated) with documented default and `config.js` options in [README.md](https://github.com/MichMich/MagicMirror/blob/develop/modules/default/newsfeed/README.md)
- Added notifications to default `clock` module broadcasting `CLOCK_SECOND` and `CLOCK_MINUTE` for the respective time elapsed. - Added notifications to default `clock` module broadcasting `CLOCK_SECOND` and `CLOCK_MINUTE` for the respective time elapsed.
- Added UK Met Office Datapoint feed as a provider in the default weather module. - Added UK Met Office Datapoint feed as a provider in the default weather module.
- added new provider class - Added new provider class
- added suncalc.js dependency to calculate sun times (not provided in UK Met Office feed) - Added suncalc.js dependency to calculate sun times (not provided in UK Met Office feed)
- added "tempUnits" and "windUnits" to allow, for example, temp in metric (i.e. celsius) and wind in imperial (i.e. mph). These will override "units" if specified, otherwise the "units" value will be used. - Added "tempUnits" and "windUnits" to allow, for example, temp in metric (i.e. celsius) and wind in imperial (i.e. mph). These will override "units" if specified, otherwise the "units" value will be used.
- use Feels Like temp from feed if present - Use Feels Like temp from feed if present
- optionally display probability of precipitation (PoP) in current weather (UK Met Office data) - Optionally display probability of precipitation (PoP) in current weather (UK Met Office data)
- automatically try to fix eslint errors by passing `--fix` option to it - Automatically try to fix eslint errors by passing `--fix` option to it
- Added sunrise and sunset times to weathergov weather provider [#1705](https://github.com/MichMich/MagicMirror/issues/1705) - Added sunrise and sunset times to weathergov weather provider [#1705](https://github.com/MichMich/MagicMirror/issues/1705)
- Added "useLocationAsHeader" to display "location" in `config.js` as header when location name is not returned - Added "useLocationAsHeader" to display "location" in `config.js` as header when location name is not returned
- Added to `newsfeed.js`: in order to design the news article better with css, three more class-names were introduced: newsfeed-desc, newsfeed-desc, newsfeed-desc
### Updated ### Updated
- English translation for "Feels" to "Feels like" - English translation for "Feels" to "Feels like"

View File

@ -105,7 +105,7 @@ Module.register("newsfeed",{
// this.config.showFullArticle is a run-time configuration, triggered by optional notifications // this.config.showFullArticle is a run-time configuration, triggered by optional notifications
if (!this.config.showFullArticle && (this.config.showSourceTitle || this.config.showPublishDate)) { if (!this.config.showFullArticle && (this.config.showSourceTitle || this.config.showPublishDate)) {
var sourceAndTimestamp = document.createElement("div"); var sourceAndTimestamp = document.createElement("div");
sourceAndTimestamp.className = "light small dimmed"; sourceAndTimestamp.className = "newsfeed-source light small dimmed";
if (this.config.showSourceTitle && this.newsItems[this.activeItem].sourceTitle !== "") { if (this.config.showSourceTitle && this.newsItems[this.activeItem].sourceTitle !== "") {
sourceAndTimestamp.innerHTML = this.newsItems[this.activeItem].sourceTitle; sourceAndTimestamp.innerHTML = this.newsItems[this.activeItem].sourceTitle;
@ -168,14 +168,14 @@ Module.register("newsfeed",{
if(!this.config.showFullArticle){ if(!this.config.showFullArticle){
var title = document.createElement("div"); var title = document.createElement("div");
title.className = "bright medium light" + (!this.config.wrapTitle ? " no-wrap" : ""); title.className = "newsfeed-title bright medium light" + (!this.config.wrapTitle ? " no-wrap" : "");
title.innerHTML = this.newsItems[this.activeItem].title; title.innerHTML = this.newsItems[this.activeItem].title;
wrapper.appendChild(title); wrapper.appendChild(title);
} }
if (this.isShowingDescription) { if (this.isShowingDescription) {
var description = document.createElement("div"); var description = document.createElement("div");
description.className = "small light" + (!this.config.wrapDescription ? " no-wrap" : ""); description.className = "newsfeed-desc small light" + (!this.config.wrapDescription ? " no-wrap" : "");
var txtDesc = this.newsItems[this.activeItem].description; var txtDesc = this.newsItems[this.activeItem].description;
description.innerHTML = (this.config.truncDescription ? (txtDesc.length > this.config.lengthDescription ? txtDesc.substring(0, this.config.lengthDescription) + "..." : txtDesc) : txtDesc); description.innerHTML = (this.config.truncDescription ? (txtDesc.length > this.config.lengthDescription ? txtDesc.substring(0, this.config.lengthDescription) + "..." : txtDesc) : txtDesc);
wrapper.appendChild(description); wrapper.appendChild(description);