add widget version
parent
f42d5ee570
commit
f746b0c67c
11
apps.json
11
apps.json
|
|
@ -836,5 +836,16 @@
|
||||||
{"name":"marioclock.app.js","url":"marioclock-app.js"},
|
{"name":"marioclock.app.js","url":"marioclock-app.js"},
|
||||||
{"name":"marioclock.img","url":"marioclock-icon.js","evaluate":true}
|
{"name":"marioclock.img","url":"marioclock-icon.js","evaluate":true}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{ "id": "widver",
|
||||||
|
"name": "Firmware Version Widget",
|
||||||
|
"icon": "widget.png",
|
||||||
|
"version":"0.01",
|
||||||
|
"description": "Display the version of the installed firmware in the top widget section.",
|
||||||
|
"tags": "widget,tool,system",
|
||||||
|
"type":"widget",
|
||||||
|
"storage": [
|
||||||
|
{"name":"widver.wid.js","url":"widget.js"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
0.01: New Widget
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/* jshint esversion: 6 */
|
||||||
|
(() => {
|
||||||
|
var width = 28,
|
||||||
|
ver = process.env.VERSION.split('.');
|
||||||
|
function draw() {
|
||||||
|
g.reset().setColor(0, 0.5, 1).setFont("6x8", 1);
|
||||||
|
g.drawString(ver[0], this.x + 2, this.y + 4, true);
|
||||||
|
g.setFontAlign(0, -1, 0).drawString(ver[1], this.x + width / 2, this.y + 14, true);
|
||||||
|
}
|
||||||
|
WIDGETS["version"] = { area: "tr", width: width, draw: draw };
|
||||||
|
})();
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 344 B |
Loading…
Reference in New Issue