Merge branch 'develop' into fwitte/weather_forecast_daily_openweather

This commit is contained in:
Michael Teeuw 2019-01-04 13:04:02 +01:00 committed by GitHub
commit a70cc53d82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 357 additions and 384 deletions

View File

@ -1,6 +1,6 @@
language: node_js language: node_js
node_js: node_js:
- "7" - "8"
before_script: before_script:
- yarn danger ci - yarn danger ci
- npm install grunt-cli -g - npm install grunt-cli -g

View File

@ -9,11 +9,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
*This release is scheduled to be released on 2019-04-01.* *This release is scheduled to be released on 2019-04-01.*
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues running Electron, make sure your [Raspbian is up to date](https://www.raspberrypi.org/documentation/raspbian/updating.md).
### Added ### Added
### Updated ### Updated
- Bumped the Electron dependency to v3.0.13 to support the most recent Raspbian. [#1500](https://github.com/MichMich/MagicMirror/issues/1500)
### Fixed ### Fixed
- Fixed temperature displays in currentweather and weatherforecast modules [#1503](https://github.com/MichMich/MagicMirror/issues/1503).
- Weather forecast now works with openweathermap in new weather module. Daily data are displayed, see issue [#1504](https://github.com/MichMich/MagicMirror/issues/1504). - Weather forecast now works with openweathermap in new weather module. Daily data are displayed, see issue [#1504](https://github.com/MichMich/MagicMirror/issues/1504).
## [2.6.0] - 2019-01-01 ## [2.6.0] - 2019-01-01

View File

@ -201,10 +201,10 @@ Module.register("currentweather",{
if (this.config.degreeLabel) { if (this.config.degreeLabel) {
switch (this.config.units ) { switch (this.config.units ) {
case "metric": case "metric":
degreeLabel = "C"; degreeLabel = " °C";
break; break;
case "imperial": case "imperial":
degreeLabel = "F"; degreeLabel = " °F";
break; break;
case "default": case "default":
degreeLabel = " K"; degreeLabel = " K";
@ -218,7 +218,7 @@ Module.register("currentweather",{
var temperature = document.createElement("span"); var temperature = document.createElement("span");
temperature.className = "bright"; temperature.className = "bright";
temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + "°" + degreeLabel; temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel;
large.appendChild(temperature); large.appendChild(temperature);
if (this.config.showIndoorTemperature && this.indoorTemperature) { if (this.config.showIndoorTemperature && this.indoorTemperature) {
@ -228,7 +228,7 @@ Module.register("currentweather",{
var indoorTemperatureElem = document.createElement("span"); var indoorTemperatureElem = document.createElement("span");
indoorTemperatureElem.className = "bright"; indoorTemperatureElem.className = "bright";
indoorTemperatureElem.innerHTML = " " + this.indoorTemperature.replace(".", this.config.decimalSymbol) + "°" + degreeLabel; indoorTemperatureElem.innerHTML = " " + this.indoorTemperature.replace(".", this.config.decimalSymbol) + degreeLabel;
large.appendChild(indoorTemperatureElem); large.appendChild(indoorTemperatureElem);
} }
@ -251,7 +251,7 @@ Module.register("currentweather",{
var feelsLike = document.createElement("span"); var feelsLike = document.createElement("span");
feelsLike.className = "dimmed"; feelsLike.className = "dimmed";
feelsLike.innerHTML = this.translate("FEELS") + " " + this.feelsLike + "°" + degreeLabel; feelsLike.innerHTML = this.translate("FEELS") + " " + this.feelsLike + degreeLabel;
small.appendChild(feelsLike); small.appendChild(feelsLike);
wrapper.appendChild(small); wrapper.appendChild(small);

View File

@ -142,14 +142,14 @@ Module.register("weatherforecast",{
icon.className = "wi weathericon " + forecast.icon; icon.className = "wi weathericon " + forecast.icon;
iconCell.appendChild(icon); iconCell.appendChild(icon);
var degreeLabel = "°"; var degreeLabel = "";
if(this.config.scale) { if(this.config.scale) {
switch(this.config.units) { switch(this.config.units) {
case "metric": case "metric":
degreeLabel += " C"; degreeLabel = " °C";
break; break;
case "imperial": case "imperial":
degreeLabel += " F"; degreeLabel = " °F";
break; break;
case "default": case "default":
degreeLabel = " K"; degreeLabel = " K";

705
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@
"ajv": "6.5.5", "ajv": "6.5.5",
"body-parser": "^1.18.2", "body-parser": "^1.18.2",
"colors": "^1.1.2", "colors": "^1.1.2",
"electron": "^2.0.16", "electron": "^3.0.13",
"express": "^4.16.2", "express": "^4.16.2",
"express-ipfilter": "0.3.1", "express-ipfilter": "0.3.1",
"feedme": "latest", "feedme": "latest",

View File

@ -36,7 +36,7 @@ describe("Electron app environment", function() {
it("should open a browserwindow", function() { it("should open a browserwindow", function() {
return app.client return app.client
.waitUntilWindowLoaded() .waitUntilWindowLoaded()
.browserWindow.focus() // .browserWindow.focus()
.getWindowCount() .getWindowCount()
.should.eventually.equal(1) .should.eventually.equal(1)
.browserWindow.isMinimized() .browserWindow.isMinimized()