alarmeta widget renamed to widalarmeta

master
Erik Andresen 2022-05-03 07:25:20 +02:00
parent 4105f2a65d
commit f52ad2e834
4 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,5 @@
{ {
"id": "alarmeta", "id": "widalarmeta",
"name": "Alarm & Timer ETA", "name": "Alarm & Timer ETA",
"shortName": "Alarm ETA", "shortName": "Alarm ETA",
"version": "0.01", "version": "0.01",
@ -10,6 +10,6 @@
"supports": ["BANGLEJS","BANGLEJS2"], "supports": ["BANGLEJS","BANGLEJS2"],
"screenshots" : [ { "url":"screenshot.png" } ], "screenshots" : [ { "url":"screenshot.png" } ],
"storage": [ "storage": [
{"name":"alarmeta.wid.js","url":"widget.js"} {"name":"widalarmeta.wid.js","url":"widget.js"}
] ]
} }

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -12,8 +12,6 @@
g.setFontAlign(0,0); // center fonts g.setFontAlign(0,0); // center fonts
g.clearRect(this.x, this.y, this.x+this.width-1, this.y+23); g.clearRect(this.x, this.y, this.x+this.width-1, this.y+23);
// Use 'locale' module to get a shortened month name
// in the correct language
var text = hours.padStart(2, '0') + ":" + minutes.padStart(2, '0'); var text = hours.padStart(2, '0') + ":" + minutes.padStart(2, '0');
g.setFont("6x8:1x2"); g.setFont("6x8:1x2");
g.drawString(text, this.x+this.width/2, this.y+12); g.drawString(text, this.x+this.width/2, this.y+12);
@ -25,11 +23,11 @@
} }
setInterval(function() { setInterval(function() {
WIDGETS["alarmeta"].draw(WIDGETS["alarmeta"]); WIDGETS["widalarmeta"].draw(WIDGETS["widalarmeta"]);
}, 30000); // update every half minute }, 30000); // update every half minute
// add your widget // add your widget
WIDGETS["alarmeta"]={ WIDGETS["widalarmeta"]={
area:"tl", area:"tl",
width: 0, // hide by default = assume no timer width: 0, // hide by default = assume no timer
draw:draw draw:draw

View File

Before

Width:  |  Height:  |  Size: 1011 B

After

Width:  |  Height:  |  Size: 1011 B