Update setUI to work with new Bangle.js 2v13 menu style

pull/1509/head
Gordon Williams 2022-02-24 11:33:05 +00:00
parent c291229df5
commit 14b6004f1c
9 changed files with 11 additions and 6 deletions

View File

@ -5,3 +5,4 @@
0.11: Respect theme colors. Fix: Do not pollute global space with internal variables ans functions in boot.js
0.12: Improve pattern detection code readability by PaddeK http://forum.espruino.com/profiles/117930/
0.13: Improve pattern rendering by HughB http://forum.espruino.com/profiles/167235/
0.14: Update setUI to work with new Bangle.js 2v13 menu style

View File

@ -76,6 +76,7 @@
var sui = Bangle.setUI;
Bangle.setUI = function (mode, cb) {
sui(mode, cb);
if ("object"==typeof mode) mode = mode.mode;
if (!mode) {
Bangle.removeListener("drag", dragHandler);
storedPatterns = {};

View File

@ -2,7 +2,7 @@
"id": "ptlaunch",
"name": "Pattern Launcher",
"shortName": "Pattern Launcher",
"version": "0.13",
"version": "0.14",
"description": "Directly launch apps from the clock screen with custom patterns.",
"icon": "app.png",
"screenshots": [{"url":"manage_patterns_light.png"}],

View File

@ -1 +1,2 @@
0.01: New App!
0.02: Update setUI to work with new Bangle.js 2v13 menu style

View File

@ -1,6 +1,7 @@
(function() {
var sui = Bangle.setUI;
Bangle.setUI = function(mode, cb) {
if ("object"==typeof mode) mode = mode.mode;
if (mode!="clock") return sui(mode,cb);
return sui("clockupdown", (dir) => {
let settings = require("Storage").readJSON("shortcuts.json", 1)||{};
@ -12,4 +13,3 @@
});
};
})();

View File

@ -2,7 +2,7 @@
"id": "shortcuts",
"name": "Shortcuts",
"shortName": "Shortcuts",
"version": "0.01",
"version": "0.02",
"description": "Quickly load your favourite apps from (almost) any watch face.",
"icon": "app.png",
"type": "bootloader",

View File

@ -1,2 +1,3 @@
0.01: New App!
0.02: Fix issue with mode being undefined
0.03: Update setUI to work with new Bangle.js 2v13 menu style

View File

@ -4,6 +4,7 @@
Bangle.setUI = function(mode, cb) {
sui(mode,cb);
if(!mode) return;
if ("object"==typeof mode) mode = mode.mode;
if (!mode.startsWith("clock")) return;
Bangle.swipeHandler = dir => { if (dir<0) Bangle.showLauncher(); };
Bangle.on("swipe", Bangle.swipeHandler);

View File

@ -1,7 +1,7 @@
{
"id": "swiperclocklaunch",
"name": "Swiper Clock Launch",
"version": "0.02",
"version": "0.03",
"description": "Navigate between clock and launcher with Swipe action",
"icon": "swiperclocklaunch.png",
"type": "bootloader",