diff --git a/apps/coin_info/app.js b/apps/coin_info/app.js index ca8dda1cf..0fd680286 100644 --- a/apps/coin_info/app.js +++ b/apps/coin_info/app.js @@ -8,17 +8,17 @@ type:"v", c: [ {type:"h", c: [ - {type:"txt", id:"tknName", label:"Load...", halign:"left"}, - {type:"btn", label:"...", halign:"right", cb: l=>{}} + {type:"txt", id:"tknName", label:"Load...", halign:-1}, + {type:"btn", label:"...", halign:1, cb: d=>setDummy("dot-dot-dot")} ] }, - {type:"txt", id:"tknGraph", font:"20%", label:"12:00" }, + {type:"txt", id:"tknGraph", font:"20%", label:"graph..." }, {type:"h", c: [ - {type:"btn", label:"07", cb: l=>{}}, - {type:"btn", label:"14", cb: l=>{}}, - {type:"btn", label:"30", cb: l=>{}}, - {type:"btn", label:"60", cb: l=>{}} + {type:"btn", label:"07", cb: d=>setDummy("seven")}, + {type:"btn", label:"14", cb: d=>setDummy("fourteen")}, + {type:"btn", label:"30", cb: d=>setDummy("thirty")}, + {type:"btn", label:"60", cb: d=>setDummy("sixty")} ] } ] @@ -26,11 +26,18 @@ { lazy:true }); layout.update(); + // + var currentLabel = "loading..." + function setDummy(x) { + currentLabel = x; + } + // timeout used to update every minute var drawTimeout; // update the screen function draw() { // + layout.tknGraph.label = currentLabel; layout.tknName.label = settings.tokenSelected[ticker]; layout.render(); @@ -39,7 +46,7 @@ drawTimeout = setTimeout(function() { drawTimeout = undefined; draw(); - }, 60000 - (Date.now() % 60000)); + }, 15000 - (Date.now() % 15000)); } // update time and draw diff --git a/apps/coin_info/metadata.json b/apps/coin_info/metadata.json index 763c07b5b..de53f180a 100644 --- a/apps/coin_info/metadata.json +++ b/apps/coin_info/metadata.json @@ -1,7 +1,7 @@ { "id": "coin_info", "name": "Crypto-Coins Info", "shortName":"Coins Info", - "version": "0.06.02", + "version": "0.06.03", "description": "Crypto-Coins Infos with the help of the Binance API", "icon": "app.png", "tags": "clkinfo",