Add new default config to 'current weather' module

This commit is contained in:
Jose Forte 2020-02-21 10:17:05 -03:00 committed by GitHub
parent 5bf90ae31d
commit c877b5fc70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,7 @@ Module.register("currentweather",{
appendLocationNameToHeader: true, appendLocationNameToHeader: true,
calendarClass: "calendar", calendarClass: "calendar",
tableClass: "large",
onlyTemp: false, onlyTemp: false,
roundTemp: false, roundTemp: false,
@ -174,6 +175,7 @@ Module.register("currentweather",{
// Override dom generator. // Override dom generator.
getDom: function() { getDom: function() {
var wrapper = document.createElement("div"); var wrapper = document.createElement("div");
wrapper.className = this.config.tableClass;
if (this.config.appid === "") { if (this.config.appid === "") {
wrapper.innerHTML = "Please set the correct openweather <i>appid</i> in the config for module: " + this.name + "."; wrapper.innerHTML = "Please set the correct openweather <i>appid</i> in the config for module: " + this.name + ".";
@ -192,7 +194,7 @@ Module.register("currentweather",{
} }
var large = document.createElement("div"); var large = document.createElement("div");
large.className = "large light"; large.className = "light";
var weatherIcon = document.createElement("span"); var weatherIcon = document.createElement("span");
weatherIcon.className = "wi weathericon " + this.weatherType; weatherIcon.className = "wi weathericon " + this.weatherType;