mirror of https://github.com/espruino/BangleApps
commit
c582e8dfc1
|
@ -1633,7 +1633,7 @@
|
||||||
{
|
{
|
||||||
"id": "widver",
|
"id": "widver",
|
||||||
"name": "Firmware Version Widget",
|
"name": "Firmware Version Widget",
|
||||||
"version": "0.01",
|
"version": "0.02",
|
||||||
"description": "Display the version of the installed firmware in the top widget section.",
|
"description": "Display the version of the installed firmware in the top widget section.",
|
||||||
"icon": "widget.png",
|
"icon": "widget.png",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
0.01: New Widget
|
0.01: New Widget
|
||||||
|
0.02: Display "Rel" (Release) instead of 'undefined' when there is no Build number.
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
(() => {
|
(() => {
|
||||||
var width = 28,
|
var width = 28,
|
||||||
ver = process.env.VERSION.split('.');
|
ver = process.env.VERSION.split('.');
|
||||||
|
|
||||||
|
// Example: if ver is 2v11 instead of 2v10.142 write "Rel" (Release) instead of Build number
|
||||||
|
if(typeof ver[1] === 'undefined'){ver[1] = "Rel";}
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
g.reset().setColor(0, 0.5, 1).setFont("6x8", 1);
|
g.reset().setColor(0, 0.5, 1).setFont("6x8", 1);
|
||||||
g.drawString(ver[0], this.x + 2, this.y + 4, true);
|
g.drawString(ver[0], this.x + 2, this.y + 4, true);
|
||||||
|
|
Loading…
Reference in New Issue