forked from FOSS/BangleApps
commit
810b419abf
|
@ -9,3 +9,4 @@
|
||||||
0.09: Do not react if clkinfo is focused
|
0.09: Do not react if clkinfo is focused
|
||||||
0.10: Extend the functionality via a quicklaunch.app.js file that can be launched
|
0.10: Extend the functionality via a quicklaunch.app.js file that can be launched
|
||||||
with quicklaunch itself.
|
with quicklaunch itself.
|
||||||
|
0.11: Add hints to the extension app. Tweak remove function.
|
||||||
|
|
|
@ -21,11 +21,13 @@
|
||||||
if (ud == 1 && settings.extdownapp && settings.extdownapp.src){ if (settings.extdownapp.name == "Show Launcher") Bangle.showLauncher(); else if (!storage.read(settings.extdownapp.src)) reset("extdownapp"); else load(settings.extdownapp.src); }
|
if (ud == 1 && settings.extdownapp && settings.extdownapp.src){ if (settings.extdownapp.name == "Show Launcher") Bangle.showLauncher(); else if (!storage.read(settings.extdownapp.src)) reset("extdownapp"); else load(settings.extdownapp.src); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let removeUI = ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);}
|
||||||
|
|
||||||
Bangle.setUI({
|
Bangle.setUI({
|
||||||
mode: "custom",
|
mode: "custom",
|
||||||
touch: touchHandler,
|
touch: touchHandler,
|
||||||
swipe : swipeHandler,
|
swipe : swipeHandler,
|
||||||
remove: ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);} // Compatability with Fastload Utils.
|
remove: removeUI // Compatability with Fastload Utils.
|
||||||
});
|
});
|
||||||
|
|
||||||
g.clearRect(Bangle.appRect);
|
g.clearRect(Bangle.appRect);
|
||||||
|
@ -36,7 +38,14 @@
|
||||||
const updateTimeoutToClock = function(){
|
const updateTimeoutToClock = function(){
|
||||||
let time = 1000; // milliseconds
|
let time = 1000; // milliseconds
|
||||||
if (timeoutToClock) clearTimeout(timeoutToClock);
|
if (timeoutToClock) clearTimeout(timeoutToClock);
|
||||||
timeoutToClock = setTimeout(load,time);
|
timeoutToClock = setTimeout(load,time);
|
||||||
};
|
};
|
||||||
updateTimeoutToClock();
|
updateTimeoutToClock();
|
||||||
|
|
||||||
|
let R = Bangle.appRect;
|
||||||
|
g.setFont("Vector", 11)
|
||||||
|
.setFontAlign(0,1,0).drawString(settings.extupapp.name, R.x+R.w/2, R.y2)
|
||||||
|
.setFontAlign(0,1,1).drawString(settings.extrightapp.name, R.x, R.y+R.h/2)
|
||||||
|
.setFontAlign(0,-1,0).drawString(settings.extdownapp.name, R.x+R.w/2, R.y)
|
||||||
|
.setFontAlign(0,1,3).drawString(settings.extleftapp.name, R.x2, R.y+R.h/2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,31 @@
|
||||||
"id": "quicklaunch",
|
"id": "quicklaunch",
|
||||||
"name": "Quick Launch",
|
"name": "Quick Launch",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"version": "0.10",
|
"version": "0.11",
|
||||||
"description": "Tap or swipe left/right/up/down on your clock face to launch up to five apps of your choice. Configurations can be accessed through Settings->Apps.",
|
"description": "Tap or swipe left/right/up/down on your clock face to launch up to five apps of your choice. Configurations can be accessed through Settings->Apps.",
|
||||||
"type": "bootloader",
|
"type": "bootloader",
|
||||||
"tags": "tools, system",
|
"tags": "tools, system",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"supports": ["BANGLEJS2"],
|
"supports": [
|
||||||
"storage": [
|
"BANGLEJS2"
|
||||||
{"name": "quicklaunch.settings.js", "url": "settings.js"},
|
|
||||||
{"name": "quicklaunch.boot.js", "url": "boot.js"},
|
|
||||||
{"name": "quicklaunch.app.js", "url": "app.js"}
|
|
||||||
],
|
],
|
||||||
"data": [{"name": "quicklaunch.json"}]
|
"storage": [
|
||||||
|
{
|
||||||
|
"name": "quicklaunch.settings.js",
|
||||||
|
"url": "settings.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "quicklaunch.boot.js",
|
||||||
|
"url": "boot.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "quicklaunch.app.js",
|
||||||
|
"url": "app.js"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"name": "quicklaunch.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue