weatherclock v0.06
parent
85692d5476
commit
a66e433ebe
|
|
@ -3,4 +3,4 @@
|
||||||
0.03: Minor layout extra spaces.
|
0.03: Minor layout extra spaces.
|
||||||
0.04: Layout now compatible with Bangle.js 2.
|
0.04: Layout now compatible with Bangle.js 2.
|
||||||
0.05: Use weather condition code for icon selection.
|
0.05: Use weather condition code for icon selection.
|
||||||
0.06: Dev1-New settings to (un)hide day of week, date and wind speed.
|
0.07: Dev2-New settings to hide day of week, date and wind speed.
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ function chooseIconByCode(code) {
|
||||||
case 800: return sunIcon;
|
case 800: return sunIcon;
|
||||||
case 801: return partSunIcon;
|
case 801: return partSunIcon;
|
||||||
default: return cloudIcon;
|
default: return cloudIcon;
|
||||||
}
|
} break;
|
||||||
default: return cloudIcon;
|
default: return cloudIcon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -91,12 +91,16 @@ function getWeather() {
|
||||||
|
|
||||||
let fontTemp = settings.wind ? "10%" : "20%";
|
let fontTemp = settings.wind ? "10%" : "20%";
|
||||||
let fontWind = settings.wind ? "10%" : "0%";
|
let fontWind = settings.wind ? "10%" : "0%";
|
||||||
|
let labelDay = settings.day ? "THU" : "";
|
||||||
|
let labelDate = settings.date ? "01/01/1970" : "";
|
||||||
var clockLayout = new Layout( {
|
var clockLayout = new Layout( {
|
||||||
type:"v", c: [
|
type:"v", c: [
|
||||||
{type:"txt", font:"35%", halign: 0, fillx:1, pad: 8, label:"00:00", id:"time" },
|
{type:"txt", font:"35%", halign: 0, fillx:1, pad: 8, label:"00:00", id:"time" },
|
||||||
{type: "h", fillx: 1, c: [
|
{type: "h", fillx: 1, c: [
|
||||||
{type:"txt", font:"10%", label:"THU", id:"dow" },
|
{type: "h", c: [
|
||||||
{type:"txt", font:"10%", label:"01/01/1970", id:"date" }
|
{type:"txt", font:"10%", label:labelDay, id:"dow" },
|
||||||
|
{type:"txt", font:"10%", label:labelDate, id:"date" }
|
||||||
|
]},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{type: "h", valign : 1, fillx:1, c: [
|
{type: "h", valign : 1, fillx:1, c: [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue