mirror of https://github.com/espruino/BangleApps
widlockunlock: disable tap-to-lock if back button is present
parent
04057c4018
commit
fa11b76da2
|
@ -1,2 +1,3 @@
|
||||||
0.01: First commit
|
0.01: First commit
|
||||||
0.02: Add tap-to-lock functionality
|
0.02: Add tap-to-lock functionality
|
||||||
|
0.03: Disable tap-to-lock if back button is present
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "widlockunlock",
|
"id": "widlockunlock",
|
||||||
"name": "Lock/Unlock Widget",
|
"name": "Lock/Unlock Widget",
|
||||||
"version": "0.02",
|
"version": "0.03",
|
||||||
"description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked, or an unlock icon otherwise. Tap to lock the lcd",
|
"description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked, or an unlock icon otherwise. Tap to lock the lcd",
|
||||||
"icon": "widget.png",
|
"icon": "widget.png",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Bangle.on("lock", () => Bangle.drawWidgets());
|
Bangle.on("lock", () => Bangle.drawWidgets());
|
||||||
|
|
||||||
Bangle.on('touch', (_btn, xy) => {
|
Bangle.on('touch', (_btn, xy) => {
|
||||||
|
if (WIDGETS["back"]) return;
|
||||||
|
|
||||||
const oversize = 5;
|
const oversize = 5;
|
||||||
|
|
||||||
const w = WIDGETS.lockunlock;
|
const w = WIDGETS.lockunlock;
|
||||||
|
|
Loading…
Reference in New Issue