From 55de17973029444f27ecd176e2136d7e0d10f216 Mon Sep 17 00:00:00 2001 From: Black Coffee Date: Thu, 29 Sep 2022 15:08:01 +0100 Subject: [PATCH] Added refresh time to gerty settings --- lnbits/extensions/gerty/migrations.py | 1 + lnbits/extensions/gerty/models.py | 1 + .../gerty/templates/gerty/index.html | 21 +++-- lnbits/extensions/gerty/views_api.py | 80 +++++++++---------- 4 files changed, 58 insertions(+), 45 deletions(-) diff --git a/lnbits/extensions/gerty/migrations.py b/lnbits/extensions/gerty/migrations.py index be4a1cc2a..459fc8807 100644 --- a/lnbits/extensions/gerty/migrations.py +++ b/lnbits/extensions/gerty/migrations.py @@ -6,6 +6,7 @@ async def m001_initial(db): """ CREATE TABLE gerty.gertys ( id TEXT PRIMARY KEY, + refresh_time INT, name TEXT NOT NULL, wallet TEXT NOT NULL, lnbits_wallets TEXT, diff --git a/lnbits/extensions/gerty/models.py b/lnbits/extensions/gerty/models.py index 40185c92b..fc7a33774 100644 --- a/lnbits/extensions/gerty/models.py +++ b/lnbits/extensions/gerty/models.py @@ -8,6 +8,7 @@ class Gerty(BaseModel): id: str = Query(None) name: str wallet: str + refresh_time: int = Query(None) lnbits_wallets: str = Query(None) # Wallets to keep an eye on, {"wallet-id": "wallet-read-key, etc"} mempool_endpoint: str = Query(None) # Mempool endpoint to use exchange: str = Query(None) # BTC <-> Fiat exchange rate to pull ie "USD", in 0.0001 and sats diff --git a/lnbits/extensions/gerty/templates/gerty/index.html b/lnbits/extensions/gerty/templates/gerty/index.html index b211e57c8..a59bf15d8 100644 --- a/lnbits/extensions/gerty/templates/gerty/index.html +++ b/lnbits/extensions/gerty/templates/gerty/index.html @@ -164,6 +164,15 @@ Used for getting onchain/ln stats + + The amount of time in seconds between screen updates + +

Use the toggles below to control what your Gerty will display