Update widver to 0.02

Display "Rel" (Release) instead of 'undefined' when there is no Build number.
pull/864/head
David Skrabal 2021-10-27 13:25:22 -04:00
parent d10adb0684
commit 48ecdc5614
3 changed files with 6 additions and 1 deletions

View File

@ -1614,7 +1614,7 @@
{
"id": "widver",
"name": "Firmware Version Widget",
"version": "0.01",
"version": "0.02",
"description": "Display the version of the installed firmware in the top widget section.",
"icon": "widget.png",
"type": "widget",

View File

@ -1 +1,2 @@
0.01: New Widget
0.02: Display "Rel" (Release) instead of 'undefined' when there is no Build number.

View File

@ -2,6 +2,10 @@
(() => {
var width = 28,
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() {
g.reset().setColor(0, 0.5, 1).setFont("6x8", 1);
g.drawString(ver[0], this.x + 2, this.y + 4, true);