Merge pull request #1941 from bibaldo/bibaldo-currentweather

Add new default config to 'current weather' module
This commit is contained in:
Michael Teeuw 2020-02-27 16:34:26 +01:00 committed by GitHub
commit daa13b4b30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -41,6 +41,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Timestamp in log output now also contains the date
- Turkish translation.
## [2.10.2] - 2020-02-21
### Added
- Option to configure the size of the currentweather module.
## [2.10.1] - 2020-01-10
### Changed

View File

@ -42,6 +42,7 @@ Module.register("currentweather",{
appendLocationNameToHeader: true,
calendarClass: "calendar",
tableClass: "large",
onlyTemp: false,
hideTemp: false,
@ -175,6 +176,7 @@ Module.register("currentweather",{
// Override dom generator.
getDom: function() {
var wrapper = document.createElement("div");
wrapper.className = this.config.tableClass;
if (this.config.appid === "") {
wrapper.innerHTML = "Please set the correct openweather <i>appid</i> in the config for module: " + this.name + ".";
@ -193,7 +195,7 @@ Module.register("currentweather",{
}
var large = document.createElement("div");
large.className = "large light";
large.className = "light";
var degreeLabel = "";
if (this.config.units === "metric" || this.config.units === "imperial") {