1
0
Fork 0

dtlaunch, make left to right swipe exit optional

master
hughbarney 2022-04-22 00:34:04 +01:00
parent b7b64c2cfe
commit 51c1e86d49
4 changed files with 17 additions and 6 deletions

View File

@ -10,3 +10,4 @@
0.10: added "one click exit" setting for Bangle 2
0.11: Fix bangle.js 1 white icons not displaying
0.12: On Bangle 2 change to swiping up/down to move between pages as to match page indicator. Swiping from left to right now loads the clock.
0.13: Added swipeExit setting so that left-right to exit is an option

View File

@ -6,7 +6,8 @@ var settings = Object.assign({
showClocks: true,
showLaunchers: true,
direct: false,
oneClickExit:false
oneClickExit:false,
swipeExit: false
}, require('Storage').readJSON("dtlaunch.json", true) || {});
if( settings.oneClickExit)
@ -88,14 +89,14 @@ function drawPage(p){
Bangle.on("swipe",(dirLeftRight, dirUpDown)=>{
selected = 0;
oldselected=-1;
if (dirUpDown==-1){
if(settings.swipeExit && dirLeftRight==1) showClock();
if (dirUpDown==-1||dirLeftRight==-1){
++page; if (page>maxPage) page=0;
drawPage(page);
} else if (dirUpDown==1){
} else if (dirUpDown==1||dirLeftRight==1){
--page; if (page<0) page=maxPage;
drawPage(page);
}
if (dirLeftRight==1) showClock();
});
function showClock(){

View File

@ -1,7 +1,7 @@
{
"id": "dtlaunch",
"name": "Desktop Launcher",
"version": "0.12",
"version": "0.13",
"description": "Desktop style App Launcher with six (four for Bangle 2) apps per page - fast access if you have lots of apps installed.",
"screenshots": [{"url":"shot1.png"},{"url":"shot2.png"},{"url":"shot3.png"}],
"icon": "icon.png",

View File

@ -5,7 +5,8 @@
showClocks: true,
showLaunchers: true,
direct: false,
oneClickExit:false
oneClickExit:false,
swipeExit: false
}, require('Storage').readJSON(FILE, true) || {});
function writeSettings() {
@ -39,6 +40,14 @@
writeSettings();
}
},
'Swipe Exit': {
value: settings.swipeExit,
format: v => v?"On":"Off",
onchange: v => {
settings.swipeExit = v;
writeSettings();
}
},
'One click exit': {
value: settings.oneClickExit,
format: v => v?"On":"Off",