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
node_js:
- "7"
- "8"
before_script:
- yarn danger ci
- 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.*
**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
### 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 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).
## [2.6.0] - 2019-01-01

View File

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

View File

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

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",
"body-parser": "^1.18.2",
"colors": "^1.1.2",
"electron": "^2.0.16",
"electron": "^3.0.13",
"express": "^4.16.2",
"express-ipfilter": "0.3.1",
"feedme": "latest",

View File

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