From c7242674f27f4be0d0ab2576a855169a2d6ba6fe Mon Sep 17 00:00:00 2001 From: KungPhoo Date: Wed, 23 Mar 2022 09:20:59 +0100 Subject: [PATCH] Update widget.js Typos --- apps/widbt/widget.js | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/apps/widbt/widget.js b/apps/widbt/widget.js index a6c15a97f..246b8d65b 100644 --- a/apps/widbt/widget.js +++ b/apps/widbt/widget.js @@ -1,15 +1,23 @@ -WIDGETS["bluetooth"]={area:"tr",width:15,draw:function() { - g.reset(); - if (NRF.getSecurityStatus().connected) - g.setColor((g.getBPP()>8) ? "#07f" : (g.theme.dark ? "#0ff" : "#00f")); - else - g.setColor(g.theme.dark ? "#666" : "#999"); - g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),2+this.x,2+this.y); -},connect:function() { - WIDGETS["bluetooth"].draw(); -},dicconnect:function() { - Bangle.buzz(1000,1); // buzz on connection loss - WIDGETS["bluetooth"].draw(); -}}; -NRF.on('connect',WIDGETS["bluetooth"].connect); -NRF.on('disconnect',WIDGETS["bluetooth"].disconnect); +WIDGETS.bluetooth = { + area: "tr", + width: 15, + draw: function() { + g.reset(); + if (NRF.getSecurityStatus().connected) { + g.setColor((g.getBPP() > 8) ? "#07f" : (g.theme.dark ? "#0ff" : "#00f")); + } else { + g.setColor(g.theme.dark ? "#666" : "#999"); + } + g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="), 2 + this.x, 2 + this.y); + }, + connect: function() { + WIDGETS.bluetooth.draw(); + }, + diconnect: function() { + Bangle.buzz(1000, 1); // buzz on connection loss + WIDGETS.bluetooth.draw(); + } +}; + +NRF.on('connect', WIDGETS.bluetooth.connect); +NRF.on('disconnect', WIDGETS.bluetooth.diconnect);