diff --git a/apps.json b/apps.json index 6f6ef1e35..840185fd8 100644 --- a/apps.json +++ b/apps.json @@ -995,6 +995,19 @@ {"name":"widhwt.wid.js","url":"widget.js"} ] }, + { "id": "toucher", + "name": "Touch Launcher", + "shortName":"Menu", + "icon": "app.png", + "version":"0.01", + "description": "Touch enable left to right launcher.", + "tags": "tool,system,launcher", + "type":"launch", + "storage": [ + {"name":"toucher.app.js","url":"app.js"} + ], + "sortorder" : -10 + }, { "id": "balltastic", "name": "Balltastic", diff --git a/apps/toucher/ChangeLog b/apps/toucher/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/toucher/ChangeLog @@ -0,0 +1 @@ +0.01: New App! diff --git a/apps/toucher/app.js b/apps/toucher/app.js new file mode 100644 index 000000000..1b5a9186c --- /dev/null +++ b/apps/toucher/app.js @@ -0,0 +1,112 @@ +g.clear(); + +const Storage = require("Storage"); + +function getApps(){ + return Storage.list(/\.info$/).filter(app => app.endsWith('.info')).map(app => Storage.readJSON(app,1) || { name: "DEAD: "+app.substr(1) }) + .filter(app=>app.type=="app" || app.type=="clock" || !app.type) + .sort((a,b)=>{ + var n=(0|a.sortorder)-(0|b.sortorder); + if (n) return n; // do sortorder first + if (a.nameb.name) return 1; + return 0; + }); +} + +const selected = 0; +const apps = getApps(); + +function prev(){ + if (selected>=0) { + selected--; + } + drawMenu(); +} + +function next() { + if (selected+1