Change product list style

pull/153/head
Dimitri Gigot 2020-03-26 17:20:23 +00:00
parent 595fc18ea6
commit 770e6e2eda
1 changed files with 5 additions and 1 deletions

View File

@ -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]':'[ ]',