diff --git a/apps/qcenter/README.md b/apps/qcenter/README.md index eb40e63ed..4931b9c7f 100644 --- a/apps/qcenter/README.md +++ b/apps/qcenter/README.md @@ -1,20 +1,20 @@ # Quick Center -App with status bar showing various info, and up to six shortcuts for your favorite apps! -Meant to be used with any kind of quick launcher, such as Quick Launch or Pattern Launcher +An app with a status bar showing various information and up to six shortcuts for your favorite apps! +Designed for use with any kind of quick launcher, such as Quick Launch or Pattern Launcher. -Add screen shots (if possible) to the app folder and link then into this file with ![](.png) +![](screenshot.png) ## Usage -Pin apps using settings, and then run this using your favorite quick launcher to access them quickly -If you don't have any pinned apps, it shows setting and about app as an example +Pin your apps with settings, then launch them with your favorite quick launcher to access them quickly. +If you don't have any apps pinned, the settings and about apps will be shown as an example. ## Features -Showing battery and temperature (for now) +Battery and GPS status display (for now) Up to six shortcuts to your favorite apps ## Upcoming features -- Quick toggles for toggleable functions, such as Bluetooth, or it's HID mode -- Customizable status info \ No newline at end of file +- Quick switches for toggleable features such as Bluetooth or HID mode +- Customizable status information \ No newline at end of file diff --git a/apps/qcenter/app.js b/apps/qcenter/app.js index a6499f508..876d4aba9 100644 --- a/apps/qcenter/app.js +++ b/apps/qcenter/app.js @@ -76,14 +76,14 @@ var appButtons = groupBy3(pinnedApps).map((appGroup, i) => { }); }); -// create basic layout content with status info on top +// create basic layout content with status info and sensor status on top var layoutContent = [ { type: "h", pad: 5, c: [ { type: "txt", font: "8x12", scale: 2, label: E.getBattery() + "%" }, - { type: "txt", font: "8x12", scale: 2, label: " " + E.getTemperature() + "°C" }, + { type: "txt", font: "8x12", scale: 2, label: "GPS: " + (Bangle.isGPSOn() ? "ON" : "OFF") }, ], }, ]; diff --git a/apps/qcenter/metadata.json b/apps/qcenter/metadata.json index 736db2024..abef0fc36 100644 --- a/apps/qcenter/metadata.json +++ b/apps/qcenter/metadata.json @@ -1,15 +1,17 @@ -{ "id": "qcenter", - "name": "Quick Center", - "shortName":"QCenter", - "version":"0.01", - "description": "Shortcut for running your favorite apps & more", - "icon": "app.png", - "tags": "", - "supports" : ["BANGLEJS2"], - "readme": "README.md", - "storage": [ - {"name":"qcenter.app.js","url":"app.js"}, - {"name":"qcenter.settings.js","url":"settings.js"}, - {"name":"qcenter.img","url":"app-icon.js","evaluate":true} - ] +{ + "id": "qcenter", + "name": "Quick Center", + "shortName": "QCenter", + "version": "0.01", + "description": "Shortcut app for quickly running your favorite apps", + "icon": "app.png", + "tags": "", + "supports": ["BANGLEJS2"], + "readme": "README.md", + "screenshots": [{ "url": "screenshot.png" }], + "storage": [ + { "name": "qcenter.app.js", "url": "app.js" }, + { "name": "qcenter.settings.js", "url": "settings.js" }, + { "name": "qcenter.img", "url": "app-icon.js", "evaluate": true } + ] } diff --git a/apps/qcenter/screenshot.png b/apps/qcenter/screenshot.png new file mode 100644 index 000000000..8c0a335aa Binary files /dev/null and b/apps/qcenter/screenshot.png differ diff --git a/apps/qcenter/settings.js b/apps/qcenter/settings.js index 10484bc8f..544d85301 100644 --- a/apps/qcenter/settings.js +++ b/apps/qcenter/settings.js @@ -52,12 +52,34 @@ E.showMenu(exitGestureMenu); }; - //List all pinned apps + //List all pinned apps, redirecting to menu with options to unpin and reorder pinnedApps.forEach((app, i) => { - mainmenu["Remove " + app.name] = function () { - pinnedApps.splice(i, 1); - save("pinnedApps", pinnedApps); - showMainMenu(); + mainmenu[app.name] = function () { + E.showMenu({ + "": { title: app.name }, + "< Back": () => { + showMainMenu(); + }, + "Unpin": () => { + pinnedApps.splice(i, 1); + save("pinnedApps", pinnedApps); + showMainMenu(); + }, + "Move Up": () => { + if (i > 0) { + pinnedApps.splice(i - 1, 0, pinnedApps.splice(i, 1)[0]); + save("pinnedApps", pinnedApps); + showMainMenu(); + } + }, + "Move Down": () => { + if (i < pinnedApps.length - 1) { + pinnedApps.splice(i + 1, 0, pinnedApps.splice(i, 1)[0]); + save("pinnedApps", pinnedApps); + showMainMenu(); + } + }, + }); }; });