diff --git a/apps/weather/ChangeLog b/apps/weather/ChangeLog index d8a7440c5..aefb903b9 100644 --- a/apps/weather/ChangeLog +++ b/apps/weather/ChangeLog @@ -16,3 +16,4 @@ 0.17: Added clkinfo for clocks. 0.18: Added hasRange to clkinfo. 0.19: Added weather condition to clkinfo. +0.20: Added weather condition with temperature to clkinfo. diff --git a/apps/weather/clkinfo.js b/apps/weather/clkinfo.js index 8cdc37be0..339ff39c3 100644 --- a/apps/weather/clkinfo.js +++ b/apps/weather/clkinfo.js @@ -30,11 +30,18 @@ name: "Weather", img: atob("GBiBAf+///u5//n7//8f/9wHP8gDf/gB//AB/7AH/5AcP/AQH/DwD/uAD84AD/4AA/wAAfAAAfAAAfAAAfgAA/////+bP/+zf/+zfw=="), items: [ + { + name: "conditionWithTemperature", + get: () => ({ text: weather.temp, img: weatherIcon(weather.code), + v: parseInt(weather.temp), min: -30, max: 55}), + show: function() { this.emit("redraw"); }, + hide: function () {} + }, { name: "condition", get: () => ({ text: weather.txt, img: weatherIcon(weather.code), v: weather.code}), - show: function() { weatherItems.items[0].emit("redraw"); }, + show: function() { this.emit("redraw"); }, hide: function () {} }, { @@ -42,7 +49,7 @@ hasRange : true, get: () => ({ text: weather.temp, img: atob("GBiBAAA8AAB+AADnAADDAADDAADDAADDAADDAADbAADbAADbAADbAADbAADbAAHbgAGZgAM8wAN+wAN+wAM8wAGZgAHDgAD/AAA8AA=="), v: parseInt(weather.temp), min: -30, max: 55}), - show: function() { weatherItems.items[1].emit("redraw"); }, + show: function() { this.emit("redraw"); }, hide: function () {} }, { @@ -50,7 +57,7 @@ hasRange : true, get: () => ({ text: weather.hum, img: atob("GBiBAAAEAAAMAAAOAAAfAAAfAAA/gAA/gAI/gAY/AAcfAA+AQA+A4B/A4D/B8D/h+D/j+H/n/D/n/D/n/B/H/A+H/AAH/AAD+AAA8A=="), v: parseInt(weather.hum), min: 0, max: 100}), - show: function() { weatherItems.items[2].emit("redraw"); }, + show: function() { this.emit("redraw"); }, hide: function () {} }, { @@ -58,7 +65,7 @@ hasRange : true, get: () => ({ text: weather.wind, img: atob("GBiBAAHgAAPwAAYYAAwYAAwMfAAY/gAZh3/xg//hgwAAAwAABg///g//+AAAAAAAAP//wH//4AAAMAAAMAAYMAAYMAAMcAAP4AADwA=="), v: parseInt(weather.wind), min: 0, max: 118}), - show: function() { weatherItems.items[3].emit("redraw"); }, + show: function() { this.emit("redraw"); }, hide: function () {} }, ] diff --git a/apps/weather/metadata.json b/apps/weather/metadata.json index c679bdc2e..dd8b6c293 100644 --- a/apps/weather/metadata.json +++ b/apps/weather/metadata.json @@ -1,7 +1,7 @@ { "id": "weather", "name": "Weather", - "version": "0.19", + "version": "0.20", "description": "Show Gadgetbridge weather report", "icon": "icon.png", "screenshots": [{"url":"screenshot.png"}],