mirror of https://github.com/espruino/BangleApps
Change product list style
parent
595fc18ea6
commit
770e6e2eda
|
@ -126,8 +126,12 @@ function updateSettings() {
|
|||
require("Storage").writeJSON(filename, settings);
|
||||
Bangle.buzz();
|
||||
}
|
||||
function twoChat(n){
|
||||
if(n<10) return '0'+n;
|
||||
return ''+n;
|
||||
}
|
||||
const mainMenu = settings.products.reduce(function(m, p, i){
|
||||
const name = '( '+p.quantity+' ) '+p.name;
|
||||
const name = twoChat(p.quantity)+' '+p.name;
|
||||
m[name] = {
|
||||
value: p.ok,
|
||||
format: v => v?'[x]':'[ ]',
|
||||
|
|
Loading…
Reference in New Issue