Better log-output; try to call from button

master
Martin Zwigl 2025-03-19 22:35:46 +01:00
parent e2003cdd29
commit e4c1824774
2 changed files with 6 additions and 6 deletions

View File

@ -61,8 +61,8 @@ var layout = new Layout({
{type:"custom", render:renderGraph, id:"tknGraph", bgCol:g.theme.bg, fillx:1, filly:1 },
{type:"h", valign:1,
c: [
{type:"btn", label:"24h", cb: d=>setLoadMsg("24h")},
{type:"btn", label:"1w", cb: d=>setLoadMsg("1w")},
{type:"btn", label:"24h", cb: d=>getChart("24h")},
{type:"btn", label:"1w", cb: d=>getChart("1w")},
{type:"btn", label:"1m", cb: d=>setLoadMsg("1m")},
{type:"btn", label:"3m", cb: d=>setLoadMsg("3m")}
]
@ -76,12 +76,12 @@ layout.update();
//
var updateTimeout;
function getChart(period) {
//
const date = new Date();
logFile.write("Called:" + date.toString());
//
timePeriod = period;
currLoadMsg = `Load... ${period}`;
//
const date = new Date();
logFile.write("Called:" + date.toISOString() + " -- " + timePeriod + " -- " + csTokens[ticker] + "\n");
const url = `https://openapiv1.coinstats.app/coins/${csTokens[ticker]}/charts?period=${timePeriod}`;
Bangle

View File

@ -1,7 +1,7 @@
{ "id": "coin_info",
"name": "Crypto-Coins Info",
"shortName":"Coins Info",
"version": "0.06.52",
"version": "0.06.53",
"description": "Crypto-Coins Infos with the help of the Binance API",
"icon": "app.png",
"tags": "clkinfo",