Merge pull request #2059 from bryanzzhu/bryanzzhu-currentweather

added config option to hide sunrise/sunset in Current Weather module
This commit is contained in:
Michael Teeuw 2020-07-01 13:16:48 +02:00 committed by GitHub
commit 6d829fa575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -14,6 +14,7 @@ _This release is scheduled to be released on 2020-07-01._
- Added option to config the level of logging
- Added prettier for an even cleaner codebase
- Hide Sunrise/Sunset in Weather module
- Hide Sunrise/Sunset in Current Weather module
- Added Met Office DataHub (UK) provider
### Updated

View File

@ -23,6 +23,7 @@ Module.register("currentweather", {
lang: config.language,
decimalSymbol: ".",
showHumidity: false,
showSun: true,
degreeLabel: false,
showIndoorTemperature: false,
showIndoorHumidity: false,
@ -155,6 +156,7 @@ Module.register("currentweather", {
small.appendChild(humidityIcon);
}
if (this.config.showSun) {
var sunriseSunsetIcon = document.createElement("span");
sunriseSunsetIcon.className = "wi dimmed " + this.sunriseSunsetIcon;
small.appendChild(sunriseSunsetIcon);
@ -162,6 +164,7 @@ Module.register("currentweather", {
var sunriseSunsetTime = document.createElement("span");
sunriseSunsetTime.innerHTML = " " + this.sunriseSunsetTime;
small.appendChild(sunriseSunsetTime);
}
wrapper.appendChild(small);
},