mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Added the ability to hide the temp label and weather icon in the currentweather
module to allow showing only information such as wind and sunset/rise.
This commit is contained in:
parent
0ca00e5059
commit
81aab7e86f
@ -13,7 +13,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- cleanup installers folder, remove externalized scripts
|
||||
|
||||
### Added
|
||||
- Finnish translation for "PRECIP", "UPDATE_INFO_MULTIPLE" and "UPDATE_INFO_SINGLE".
|
||||
- Finish translation for "PRECIP", "UPDATE_INFO_MULTIPLE" and "UPDATE_INFO_SINGLE".
|
||||
- Added the ability to hide the temp label and weather icon in the `currentweather` module to allow showing only information such as wind and sunset/rise.
|
||||
|
||||
### Fixed
|
||||
- Force declaration of public ip adress in config file (ISSUE #1852)
|
||||
|
@ -44,6 +44,7 @@ Module.register("currentweather",{
|
||||
calendarClass: "calendar",
|
||||
|
||||
onlyTemp: false,
|
||||
hideTemp: false,
|
||||
roundTemp: false,
|
||||
|
||||
iconTable: {
|
||||
@ -194,36 +195,38 @@ Module.register("currentweather",{
|
||||
var large = document.createElement("div");
|
||||
large.className = "large light";
|
||||
|
||||
var weatherIcon = document.createElement("span");
|
||||
weatherIcon.className = "wi weathericon " + this.weatherType;
|
||||
large.appendChild(weatherIcon);
|
||||
if (this.config.hideTemp === true) {
|
||||
var weatherIcon = document.createElement("span");
|
||||
weatherIcon.className = "wi weathericon " + this.weatherType;
|
||||
large.appendChild(weatherIcon);
|
||||
|
||||
var degreeLabel = "";
|
||||
if (this.config.units === "metric" || this.config.units === "imperial") {
|
||||
degreeLabel += "°";
|
||||
}
|
||||
if(this.config.degreeLabel) {
|
||||
switch(this.config.units) {
|
||||
case "metric":
|
||||
degreeLabel += "C";
|
||||
break;
|
||||
case "imperial":
|
||||
degreeLabel += "F";
|
||||
break;
|
||||
case "default":
|
||||
degreeLabel += "K";
|
||||
break;
|
||||
var degreeLabel = "";
|
||||
if (this.config.units === "metric" || this.config.units === "imperial") {
|
||||
degreeLabel += "°";
|
||||
}
|
||||
if(this.config.degreeLabel) {
|
||||
switch(this.config.units) {
|
||||
case "metric":
|
||||
degreeLabel += "C";
|
||||
break;
|
||||
case "imperial":
|
||||
degreeLabel += "F";
|
||||
break;
|
||||
case "default":
|
||||
degreeLabel += "K";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.config.decimalSymbol === "") {
|
||||
this.config.decimalSymbol = ".";
|
||||
}
|
||||
if (this.config.decimalSymbol === "") {
|
||||
this.config.decimalSymbol = ".";
|
||||
}
|
||||
|
||||
var temperature = document.createElement("span");
|
||||
temperature.className = "bright";
|
||||
temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel;
|
||||
large.appendChild(temperature);
|
||||
var temperature = document.createElement("span");
|
||||
temperature.className = "bright";
|
||||
temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel;
|
||||
large.appendChild(temperature);
|
||||
}
|
||||
|
||||
if (this.config.showIndoorTemperature && this.indoorTemperature) {
|
||||
var indoorIcon = document.createElement("span");
|
||||
|
Loading…
x
Reference in New Issue
Block a user