mirror of https://github.com/espruino/BangleApps
run 0.10: Don't allow the same setting to be chosen for 2 boxes (fix #1578)
parent
04c2e6bb80
commit
ead79d9feb
|
@ -8,3 +8,4 @@
|
||||||
0.07: Fix crash if an odd number of active boxes are configured (fix #1473)
|
0.07: Fix crash if an odd number of active boxes are configured (fix #1473)
|
||||||
0.08: Added support for notifications from exstats. Support all stats from exstats
|
0.08: Added support for notifications from exstats. Support all stats from exstats
|
||||||
0.09: Fix broken start/stop if recording not enabled (fix #1561)
|
0.09: Fix broken start/stop if recording not enabled (fix #1561)
|
||||||
|
0.10: Don't allow the same setting to be chosen for 2 boxes (fix #1578)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ "id": "run",
|
{ "id": "run",
|
||||||
"name": "Run",
|
"name": "Run",
|
||||||
"version":"0.09",
|
"version":"0.10",
|
||||||
"description": "Displays distance, time, steps, cadence, pace and more for runners.",
|
"description": "Displays distance, time, steps, cadence, pace and more for runners.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "run,running,fitness,outdoors,gps",
|
"tags": "run,running,fitness,outdoors,gps",
|
||||||
|
|
|
@ -42,6 +42,11 @@
|
||||||
value: Math.max(statsIDs.indexOf(settings[boxID]),0),
|
value: Math.max(statsIDs.indexOf(settings[boxID]),0),
|
||||||
format: v => statsList[v].name,
|
format: v => statsList[v].name,
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
|
for (var i=1;i<=6;i++)
|
||||||
|
if (settings["B"+i]==statsIDs[v]) {
|
||||||
|
settings["B"+i]="";
|
||||||
|
boxMenu["Box "+i].value=0;
|
||||||
|
}
|
||||||
settings[boxID] = statsIDs[v];
|
settings[boxID] = statsIDs[v];
|
||||||
saveSettings();
|
saveSettings();
|
||||||
},
|
},
|
||||||
|
@ -60,7 +65,7 @@
|
||||||
'': { 'title': 'Run' },
|
'': { 'title': 'Run' },
|
||||||
'< Back': back,
|
'< Back': back,
|
||||||
};
|
};
|
||||||
if (WIDGETS["recorder"])
|
if (global.WIDGETS&&WIDGETS["recorder"])
|
||||||
menu[/*LANG*/"Record Run"] = {
|
menu[/*LANG*/"Record Run"] = {
|
||||||
value : !!settings.record,
|
value : !!settings.record,
|
||||||
format : v => v?/*LANG*/"Yes":/*LANG*/"No",
|
format : v => v?/*LANG*/"Yes":/*LANG*/"No",
|
||||||
|
@ -87,7 +92,7 @@
|
||||||
notificationsMenu[/*LANG*/"Dist Pattern"] = {
|
notificationsMenu[/*LANG*/"Dist Pattern"] = {
|
||||||
value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.dist.notifications))),
|
value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.dist.notifications))),
|
||||||
min: 0, max: vibPatterns.length,
|
min: 0, max: vibPatterns.length,
|
||||||
format: v => vibPatterns[v]||"Off",
|
format: v => vibPatterns[v]||/*LANG*/"Off",
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
settings.notify.dist.notifications = vibTimes[v];
|
settings.notify.dist.notifications = vibTimes[v];
|
||||||
sampleBuzz(vibTimes[v]);
|
sampleBuzz(vibTimes[v]);
|
||||||
|
@ -97,7 +102,7 @@
|
||||||
notificationsMenu[/*LANG*/"Step Pattern"] = {
|
notificationsMenu[/*LANG*/"Step Pattern"] = {
|
||||||
value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.step.notifications))),
|
value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.step.notifications))),
|
||||||
min: 0, max: vibPatterns.length,
|
min: 0, max: vibPatterns.length,
|
||||||
format: v => vibPatterns[v]||"Off",
|
format: v => vibPatterns[v]||/*LANG*/"Off",
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
settings.notify.step.notifications = vibTimes[v];
|
settings.notify.step.notifications = vibTimes[v];
|
||||||
sampleBuzz(vibTimes[v]);
|
sampleBuzz(vibTimes[v]);
|
||||||
|
@ -107,7 +112,7 @@
|
||||||
notificationsMenu[/*LANG*/"Time Pattern"] = {
|
notificationsMenu[/*LANG*/"Time Pattern"] = {
|
||||||
value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.time.notifications))),
|
value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.time.notifications))),
|
||||||
min: 0, max: vibPatterns.length,
|
min: 0, max: vibPatterns.length,
|
||||||
format: v => vibPatterns[v]||"Off",
|
format: v => vibPatterns[v]||/*LANG*/"Off",
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
settings.notify.time.notifications = vibTimes[v];
|
settings.notify.time.notifications = vibTimes[v];
|
||||||
sampleBuzz(vibTimes[v]);
|
sampleBuzz(vibTimes[v]);
|
||||||
|
|
Loading…
Reference in New Issue