diff --git a/apps/lift/app-icon.js b/apps/lift/app-icon.js deleted file mode 100644 index f335b8cb2..000000000 --- a/apps/lift/app-icon.js +++ /dev/null @@ -1 +0,0 @@ -require("heatshrink").decompress(atob("mEwgf/ABH7tu27YCCCBP+BwYCCv4RI+wRGt4RQtoLCgEPCIYLCLIUWCOO0gEtI5wR/COoABj6hOAAMDCL4AFCIQCFCJH2CLFvCJH+CKH/CI1/CJI/OBAX0yVJkgCBl///pgF24IBBwQCD3/tQ43/9IRGy4RH74RISwwRBBwgCDBwTOChoRDyAICgIRQhIRXmxHGpEAiRHGCKI1GCNxZjCP4RGAQgRDAQoRI9IRH9oRPy/9CI3//oRG3//CIoHB//0CIkl/4=")) diff --git a/apps/lift/app.png b/apps/lift/app.png deleted file mode 100644 index c87417289..000000000 Binary files a/apps/lift/app.png and /dev/null differ diff --git a/apps/lift/metadata.json b/apps/lift/metadata.json deleted file mode 100644 index 0c14df0c1..000000000 --- a/apps/lift/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ "id": "lift", - "name": "Lift - Workout Timer App", - "shortName":"Lift", - "version": "0.01", - "description": "Rest and Set counter for workout, fitness and lifting things.", - "icon": "app.png", - "screenshots": [{"url": "screenshot.png"}, {"url": "screenshot2.png"}, {"url": "screenshot3.png"}, {"url": "screenshot4.png"}], - "tags": "workout,weight lifting,rest,fitness,timer", - "supports" : ["BANGLEJS2"], - "readme": "README.md", - "storage": [ - {"name":"lift.app.js","url":"lift.app.js"}, - {"name":"lift.img","url":"app-icon.js","evaluate":true} - ] -} diff --git a/apps/lift/screenshot.png b/apps/lift/screenshot.png deleted file mode 100644 index 891dce5e5..000000000 Binary files a/apps/lift/screenshot.png and /dev/null differ diff --git a/apps/lift/screenshot2.png b/apps/lift/screenshot2.png deleted file mode 100644 index e9779b94e..000000000 Binary files a/apps/lift/screenshot2.png and /dev/null differ diff --git a/apps/lift/screenshot3.png b/apps/lift/screenshot3.png deleted file mode 100644 index 33087c807..000000000 Binary files a/apps/lift/screenshot3.png and /dev/null differ diff --git a/apps/lift/screenshot4.png b/apps/lift/screenshot4.png deleted file mode 100644 index a3d655d09..000000000 Binary files a/apps/lift/screenshot4.png and /dev/null differ diff --git a/apps/lift/ChangeLog b/apps/rest/ChangeLog similarity index 100% rename from apps/lift/ChangeLog rename to apps/rest/ChangeLog diff --git a/apps/lift/README.md b/apps/rest/README.md similarity index 66% rename from apps/lift/README.md rename to apps/rest/README.md index b9e3e7a5d..59f031cc3 100644 --- a/apps/lift/README.md +++ b/apps/rest/README.md @@ -1,8 +1,8 @@ -# Lift +# Rest - Workout Timer -An app to keep track of your sets when lifting things and to keep track of your rest when not lifting things. +An app to keep track of time when not lifting things and keep track of your sets when lifting things. -![screenshot](screenshot.png) +![screenshot](screenshot1.png) ## Usage diff --git a/apps/rest/app-icon.js b/apps/rest/app-icon.js new file mode 100644 index 000000000..fcc93857f --- /dev/null +++ b/apps/rest/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwwkA///+czAAk/BIILM+eIAAwMCme7AAwLCCw4ABEQIWHAAIuJGAX7C5M//AXJx87C5O/nAXJwYXK2YXax6UGC4e/UIYXJ/42DC6B7BwYwDC4iTGI44vJYgpHSC5JEBI5LzGL7gXjU64XKAA4XDAA4XYIYIAIx4XKV4IXJn6LGAAc//4XJOAgAGPoQuIBYMzFxIYCmYAEBQYLMABQWGDAgLLm93AA1zKYQAIEQIWHAAM/FxAwCFxAABl4XWuYXzUIQXHRAX/+QXGYoYXIEgMzmQXHco5HEn8nI6YXMJAQXUJQwXPCgQXsO8szd5IAGC4oAFC/4AHl5xEAAv/+YXJRQIwISoUyCw8jXQQALHRH/")) diff --git a/apps/rest/app.png b/apps/rest/app.png new file mode 100644 index 000000000..c04ed7831 Binary files /dev/null and b/apps/rest/app.png differ diff --git a/apps/rest/metadata.json b/apps/rest/metadata.json new file mode 100644 index 000000000..bdce75cd6 --- /dev/null +++ b/apps/rest/metadata.json @@ -0,0 +1,15 @@ +{ "id": "rest", + "name": "Rest - Workout Timer App", + "shortName":"Rest", + "version": "0.01", + "description": "Rest timer and Set counter for workout, fitness and lifting things.", + "icon": "app.png", + "screenshots": [{"url": "screenshot1.png"}, {"url": "screenshot2.png"}, {"url": "screenshot3.png"}], + "tags": "workout,weight lifting,rest,fitness,timer", + "supports" : ["BANGLEJS2"], + "readme": "README.md", + "storage": [ + {"name":"rest.app.js","url":"rest.app.js"}, + {"name":"rest.img","url":"app-icon.js","evaluate":true} + ] +} diff --git a/apps/lift/lift.app.js b/apps/rest/rest.app.js similarity index 79% rename from apps/lift/lift.app.js rename to apps/rest/rest.app.js index e779a2908..4c4c5f434 100644 --- a/apps/lift/lift.app.js +++ b/apps/rest/rest.app.js @@ -50,14 +50,17 @@ const c4 = center(q4) const GREY_COLOR = '#CCCCCC'; const SET_COLOR = '#FF00FF'; +const SET_COLOR_MUTED = '#FF88FF'; const REST_COLOR = '#00FFFF'; -const REST_COLOR_MUTED = '#008888'; +const REST_COLOR_MUTED = '#88FFFF'; const RED_COLOR = '#FF0000'; const GREEN_COLOR = '#00FF00'; -const GREEN_COLOR_MUTED = '#008800'; +const GREEN_COLOR_MUTED = '#88FF88'; const BIG_FONT = "6x8:2x2"; +const HUGE_FONT = "6x8:3x3"; +const BIGHUGE_FONT = "6x8:6x6"; -function drawMainMenu() { +function drawMainMenu(splash) { g.setColor(REST_COLOR); roundRect(q1.x, q1.y, q1.x2, q1.y2, 20); g.setColor(SET_COLOR); @@ -67,12 +70,24 @@ function drawMainMenu() { g.setColor(GREEN_COLOR); roundRect(q4.x, q4.y, q4.x2, q4.y2, 20); g.setColor(-1) - g.setFont("6x8").setFontAlign(0,0).drawString("Tap to\nConfigure", c1.x, c1.y-25) - g.setFont(BIG_FONT).setFontAlign(0,0).drawString("REST\n" +restSeconds+ "s", c1.x, c1.y + 10) - g.setFont("6x8").setFontAlign(0,0).drawString("Tap to\nConfigure", c2.x, c2.y-25) - g.setFont(BIG_FONT).setFontAlign(0,0).drawString("SETS\n" + setsCount, c2.x, c2.y + 10) - g.setFont(BIG_FONT).setFontAlign(0,0).drawString("Lift", c3.x, c3.y) - g.setFont(BIG_FONT).setFontAlign(0,0).drawString("GO", c4.x, c4.y) + + if (splash) { + g.setFont(BIGHUGE_FONT).setFontAlign(0,0).drawString("R", c1.x, c1.y) + g.setFont(BIGHUGE_FONT).setFontAlign(0,0).drawString("E", c2.x, c2.y) + g.setFont(BIGHUGE_FONT).setFontAlign(0,0).drawString("S", c3.x, c3.y) + g.setFont(BIGHUGE_FONT).setFontAlign(0,0).drawString("T", c4.x, c4.y) + } else { + g.setFont("6x8").setFontAlign(0,0).drawString("Tap to\nConfigure", c1.x, c1.y-25) + g.setFont(HUGE_FONT).setFontAlign(0,0).drawString(restSeconds+ "s", c1.x, c1.y) + g.setFont(BIG_FONT).setFontAlign(0,0).drawString("REST", c1.x, c1.y + 25) + + g.setFont("6x8").setFontAlign(0,0).drawString("Tap to\nConfigure", c2.x, c2.y-25) + g.setFont(HUGE_FONT).setFontAlign(0,0).drawString(setsCount, c2.x, c2.y) + g.setFont(BIG_FONT).setFontAlign(0,0).drawString("SETS", c2.x, c2.y + 25) + + g.setFont(BIG_FONT).setFontAlign(0,0).drawString("JUST\nDO\nIT", c3.x, c3.y) + g.setFont(HUGE_FONT).setFontAlign(0,0).drawString("GO", c4.x, c4.y) + } } function drawSetRest() { @@ -83,7 +98,9 @@ function drawSetRest() { g.setColor(GREEN_COLOR); roundRect(q4.x, q4.y, q4.x2, q4.y2, 20); g.setColor(-1) - g.setFont(BIG_FONT).setFontAlign(0,0).drawString("REST\n" +restSeconds+ "s", c1.x, c1.y) + g.setFont("6x8").setFontAlign(0,0).drawString("Tap to\nConfirm", c1.x, c1.y-25) + g.setFont(HUGE_FONT).setFontAlign(0,0).drawString(restSeconds+ "s", c1.x, c1.y) + g.setFont(BIG_FONT).setFontAlign(0,0).drawString("REST", c1.x, c1.y + 25) // g.setFont(BIG_FONT).setFontAlign(0,0).drawString("OK", c2.x, c2.y) g.setFont(BIG_FONT).setFontAlign(0,0).drawString("-", c3.x, c3.y) g.setFont(BIG_FONT).setFontAlign(0,0).drawString("+", c4.x, c4.y) @@ -97,7 +114,9 @@ function drawSetSets() { g.setColor(GREEN_COLOR); roundRect(q4.x, q4.y, q4.x2, q4.y2, 20); g.setColor(-1) - g.setFont(BIG_FONT).setFontAlign(0,0).drawString("SETS\n" +setsCount, c2.x, c2.y) + g.setFont("6x8").setFontAlign(0,0).drawString("Tap to\nConfirm", c2.x, c2.y-25) + g.setFont(HUGE_FONT).setFontAlign(0,0).drawString(setsCount, c2.x, c2.y) + g.setFont(BIG_FONT).setFontAlign(0,0).drawString("SETS", c2.x, c2.y + 25) g.setFont(BIG_FONT).setFontAlign(0,0).drawString("-", c3.x, c3.y) g.setFont(BIG_FONT).setFontAlign(0,0).drawString("+", c4.x, c4.y) } @@ -110,7 +129,8 @@ function drawExercise() { g.setColor(GREEN_COLOR_MUTED); roundRect(q4.x, q4.y, q4.x2, q4.y2, 20); g.setColor(-1); - g.setFont(BIG_FONT).setFontAlign(0,0).drawString("SET\n#"+currentSet, c2.x, c2.y) + g.setFont(BIG_FONT).setFontAlign(0,0).drawString("SET", c2.x, c2.y-25) + g.setFont(HUGE_FONT).setFontAlign(0,0).drawString("#"+currentSet, c2.x, c2.y) g.setFont(BIG_FONT).setFontAlign(0,0).drawString("PUSH >\nBUTTON\nWHEN\nDONE", c4.x, c4.y) } @@ -123,7 +143,7 @@ function circlePoints (cx, cy, r, points) { return circlePoints; } -const smallQ3Circle = [c2.x, c2.y].concat(circlePoints(c2.x, c2.y, (q2.y - q2.y2)/2, 60)); +const smallQ3Circle = [c2.x, c2.y].concat(circlePoints(c2.x, c2.y, ((q2.y - q2.y2)/2) + 10, 60)); function drawRest() { @@ -132,8 +152,10 @@ function drawRest() { g.setColor(REST_COLOR); roundRect(q1.x, q1.y, q1.x2, q1.y2, 20); - g.setColor(-1).setFont(BIG_FONT).setFontAlign(0,0).drawString(secondsRemaining, c1.x, c1.y) + g.setColor(-1).setFont(HUGE_FONT).setFontAlign(0,0).drawString(secondsRemaining, c1.x, c1.y) + g.setColor(SET_COLOR_MUTED); + roundRect(q2.x, q2.y, q2.x2, q2.y2, 20); const factor = 1 - secondsRemaining / restSeconds; const circleParts = (((factor * smallQ3Circle.length) | 0) >> 1) << 1 const poly = smallQ3Circle.slice(0, circleParts + 2) @@ -175,18 +197,19 @@ function drawDoIt() { g.setFont(BIG_FONT) g.setColor(0); setTimeout(() => { - g.drawString('just', 40, 20); + g.setFontAlign(0, 0) + g.drawString('just ', R.x2/2, 20); Bangle.buzz(150, 0.5); }, 200); setTimeout(() => { g.drawImage(getImg(), 22, 44, {scale: 1.5}); - g.drawString('DO', 100, 20); + g.drawString(' DO ', R.x2/2, 20); Bangle.buzz(200); }, 1000); setTimeout(() => { - g.drawString('IT', 150, 20); + g.drawString(' IT', R.x2/2, 20); Bangle.buzz(200); - }, 1300); + }, 1400); setTimeout(() => { setMode(MAIN_MENU); redrawApp(); @@ -293,5 +316,7 @@ Bangle.on('touch', (button, xy) => { } }); -redrawApp(); +g.clear(); +drawMainMenu(true); +setTimeout(redrawApp, 1000); diff --git a/apps/rest/screenshot2.png b/apps/rest/screenshot2.png new file mode 100644 index 000000000..e878fea96 Binary files /dev/null and b/apps/rest/screenshot2.png differ diff --git a/apps/rest/screenshot3.png b/apps/rest/screenshot3.png new file mode 100644 index 000000000..28d94eb91 Binary files /dev/null and b/apps/rest/screenshot3.png differ