mirror of https://github.com/espruino/BangleApps
feat: reset with gesture
parent
c2f9e7bf6f
commit
511831fc46
12
apps.json
12
apps.json
|
@ -1604,7 +1604,7 @@
|
|||
"id": "simpletimer",
|
||||
"name": "Timer",
|
||||
"icon": "app.png",
|
||||
"version": "0.01",
|
||||
"version": "0.02",
|
||||
"description": "Simple timer, useful when playing board games or cooking",
|
||||
"tags": "timer",
|
||||
"readme": "README.md",
|
||||
|
@ -1614,6 +1614,16 @@
|
|||
"name": "simpletimer.app.js",
|
||||
"url": "app.js"
|
||||
},
|
||||
{
|
||||
"name": ".tfnames",
|
||||
"url": "gesture-tfnames.js",
|
||||
"evaluate": true
|
||||
},
|
||||
{
|
||||
"name": ".tfmodel",
|
||||
"url": "gesture-tfmodel.js",
|
||||
"evaluate": true
|
||||
},
|
||||
{
|
||||
"name": "simpletimer.img",
|
||||
"url": "app-icon.js",
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
0.01: Initial version
|
||||
0.02: Reset with gesture
|
||||
|
|
|
@ -7,6 +7,7 @@ Simple timer, useful when playing board games or cooking
|
|||
- When the time is up the timer can be reset to starting time, this is useful e.g. for playing board games
|
||||
- When the countdown is running the timer cannot be adjusted, this prevents accidental time variations
|
||||
- When the time is up the starting time is shown, as a reminder of the time elapsed
|
||||
- When the time is up the timer can be reset with a gesture, no need to use any button
|
||||
|
||||
## How to use it
|
||||
|
||||
|
@ -14,3 +15,4 @@ Simple timer, useful when playing board games or cooking
|
|||
- Tap on seconds to increase them one by one
|
||||
- Press BTN3 to reset time to 0
|
||||
- Press BTN1 to start the timer or reset to the original time
|
||||
- When the time is up use the [swipeleft](https://github.com/espruino/BangleApps/tree/master/apps/gesture) gesture to reset the timer
|
||||
|
|
|
@ -146,6 +146,9 @@ function addWatch() {
|
|||
edge: "falling"
|
||||
});
|
||||
}
|
||||
Bangle.on("aiGesture", gesture => {
|
||||
if (gesture === "swipeleft" && state === "stopped") reset(0);
|
||||
});
|
||||
|
||||
reset(0);
|
||||
addWatch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