Simple layout extended and trying load data
parent
8f9e965dd4
commit
d0d86988cb
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue