mirror of https://github.com/espruino/BangleApps
add screenshot, minor tweaks
parent
12254e06f3
commit
910c3c0b5b
|
@ -2284,6 +2284,7 @@
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "run,running,fitness,outdoors,gps",
|
"tags": "run,running,fitness,outdoors,gps",
|
||||||
"supports" : ["BANGLEJS","BANGLEJS2"],
|
"supports" : ["BANGLEJS","BANGLEJS2"],
|
||||||
|
"screenshots": [{"url":"screenshot.png"}],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"run.app.js","url":"app.js"},
|
{"name":"run.app.js","url":"app.js"},
|
||||||
|
|
|
@ -51,18 +51,17 @@ function clearState() {
|
||||||
layout.steps.label=0;
|
layout.steps.label=0;
|
||||||
layout.cadence.label= "0";
|
layout.cadence.label= "0";
|
||||||
layout.status.bgCol = "#f00";
|
layout.status.bgCol = "#f00";
|
||||||
layout.gps.bgCol = "#f00";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStartStop() {
|
function onStartStop() {
|
||||||
running = !running;
|
running = !running;
|
||||||
layout.button.label = running ? "STOP" : "START";
|
|
||||||
layout.status.label = running ? "RUN" : "STOP";
|
|
||||||
layout.status.bgCol = running ? "#0f0" : "#f00";
|
|
||||||
if (running) {
|
if (running) {
|
||||||
clearState();
|
clearState();
|
||||||
startTime = Date.now();
|
startTime = Date.now();
|
||||||
}
|
}
|
||||||
|
layout.button.label = running ? "STOP" : "START";
|
||||||
|
layout.status.label = running ? "RUN" : "STOP";
|
||||||
|
layout.status.bgCol = running ? "#0f0" : "#f00";
|
||||||
// if stopping running, don't clear state
|
// if stopping running, don't clear state
|
||||||
// so we can at least refer to what we've done
|
// so we can at least refer to what we've done
|
||||||
layout.render();
|
layout.render();
|
||||||
|
@ -89,7 +88,7 @@ var layout = new Layout( {
|
||||||
{type:"txt", font:fontValue, label:"0", id:"steps", fillx:1 },
|
{type:"txt", font:fontValue, label:"0", id:"steps", fillx:1 },
|
||||||
{type:"txt", font:fontValue, label:"0", id:"cadence", fillx:1 }
|
{type:"txt", font:fontValue, label:"0", id:"cadence", fillx:1 }
|
||||||
]}, { type:"h", filly:1, c:[
|
]}, { type:"h", filly:1, c:[
|
||||||
{type:"txt", font:fontHeading, label:"GPS", id:"gps", fillx:1 },
|
{type:"txt", font:fontHeading, label:"GPS", id:"gps", fillx:1, bgCol:"#f00" },
|
||||||
{type:"txt", font:fontHeading, label:"00:00", id:"clock", fillx:1, bgCol:g.theme.fg, col:g.theme.bg },
|
{type:"txt", font:fontHeading, label:"00:00", id:"clock", fillx:1, bgCol:g.theme.fg, col:g.theme.bg },
|
||||||
{type:"txt", font:fontHeading, label:"STOP", id:"status", fillx:1 }
|
{type:"txt", font:fontHeading, label:"STOP", id:"status", fillx:1 }
|
||||||
]},
|
]},
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Loading…
Reference in New Issue