Added feels like clockInfo
parent
873a19af81
commit
b8854ab20d
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var weather;
|
var weather;
|
||||||
var weatherLib = require("weather");
|
var weatherLib = require("weather");
|
||||||
|
|
@ -6,6 +7,7 @@
|
||||||
weather = weatherLib.get();
|
weather = weatherLib.get();
|
||||||
if(weather){
|
if(weather){
|
||||||
weather.temp = require("locale").temp(weather.temp-273.15);
|
weather.temp = require("locale").temp(weather.temp-273.15);
|
||||||
|
weather.feels = require("locale").temp(weather.feels-273.15);
|
||||||
weather.hum = weather.hum + "%";
|
weather.hum = weather.hum + "%";
|
||||||
weather.wind = require("locale").speed(weather.wind).match(/^(\D*\d*)(.*)$/);
|
weather.wind = require("locale").speed(weather.wind).match(/^(\D*\d*)(.*)$/);
|
||||||
weather.wind = Math.round(weather.wind[1]) + "kph";
|
weather.wind = Math.round(weather.wind[1]) + "kph";
|
||||||
|
|
@ -14,6 +16,7 @@
|
||||||
temp: "?",
|
temp: "?",
|
||||||
hum: "?",
|
hum: "?",
|
||||||
wind: "?",
|
wind: "?",
|
||||||
|
feels: "?",
|
||||||
txt: "?",
|
txt: "?",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -76,6 +79,18 @@
|
||||||
hide: function () { weatherLib.removeListener("update", this.updater); }
|
hide: function () { weatherLib.removeListener("update", this.updater); }
|
||||||
,run : function() {load("weather.app.js");}
|
,run : function() {load("weather.app.js");}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "feelsLike",
|
||||||
|
hasRange : true,
|
||||||
|
get: () => ({ text: weather.feels, img: atob("GBiBAAAAAAHAAAPgAAfgAAfgAAfg4APhsAfxEB/5EB/5ED/9ED/9ED/9ED/9ED/9EB/9UB/7UA/yyAf26Afk7AfmyAfjGAfh8AAAAA=="),
|
||||||
|
v: parseInt(weather.temp), min: -30, max: 55}),
|
||||||
|
show: function() {
|
||||||
|
this.updater = _updater.bind(this);
|
||||||
|
weatherLib.on("update", this.updater);
|
||||||
|
},
|
||||||
|
hide: function () { weatherLib.removeListener("update", this.updater); }
|
||||||
|
,run : function() {load("weather.app.js");}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "humidity",
|
name: "humidity",
|
||||||
hasRange : true,
|
hasRange : true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue