forked from FOSS/BangleApps
feat: add app for navigate between clock and launcher with Swipe action
parent
e1c070ccfb
commit
1624bb5435
13
apps.json
13
apps.json
|
@ -4101,5 +4101,18 @@
|
|||
{"name":"gpstouch.app.js","url":"gpstouch.app.js"},
|
||||
{"name":"gpstouch.img","url":"gpstouch.icon.js","evaluate":true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "swiperclocklaunch",
|
||||
"name": "Swiper Clock Launch",
|
||||
"version": "0.01",
|
||||
"description": "Navigate between clock and launcher with Swipe action",
|
||||
"icon": "swiperclocklaunch.png",
|
||||
"type": "boot",
|
||||
"tags": "system",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"storage": [
|
||||
{"name":"swiperclocklaunch.boot.js","url":"boot.js"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
0.01: New App!
|
|
@ -0,0 +1,17 @@
|
|||
// clock -> launcher
|
||||
(function() {
|
||||
var sui = Bangle.setUI;
|
||||
Bangle.setUI = function(mode, cb) {
|
||||
sui(mode,cb);
|
||||
if (!mode.startsWith("clock")) return;
|
||||
Bangle.swipeHandler = dir => { if (dir<0) Bangle.showLauncher(); };
|
||||
Bangle.on("swipe", Bangle.swipeHandler);
|
||||
};
|
||||
})();
|
||||
// launcher -> clock
|
||||
setTimeout(function() {
|
||||
if (global.__FILE__ && __FILE__.endsWith(".app.js") && (require("Storage").readJSON(__FILE__.slice(0,-6)+"info",1)||{}).type=="launch") {
|
||||
Bangle.swipeHandler = dir => { if (dir>0) load(); };
|
||||
Bangle.on("swipe", Bangle.swipeHandler);
|
||||
}
|
||||
}, 10);
|
Binary file not shown.
After Width: | Height: | Size: 889 B |
Loading…
Reference in New Issue