From 1962c9345e5aa9dbc87205c2cb7b7d5969c989cb Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 29 Jan 2025 22:50:41 +1100 Subject: [PATCH] fix: Only refresh plugins on plugin page. Also added link to auction from bids --- main.py | 2 +- plugin.py | 5 ++--- render.py | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index e1e593b..de66604 100644 --- a/main.py +++ b/main.py @@ -1298,7 +1298,7 @@ def plugins_index(): if not account: return redirect("/logout") - plugins = render.plugins(plugins_module.listPlugins()) + plugins = render.plugins(plugins_module.listPlugins(True)) return render_template("plugins.html", account=account, sync=account_module.getNodeSync(), wallet_status=account_module.getWalletStatus(), diff --git a/plugin.py b/plugin.py index ced95b7..7baf594 100644 --- a/plugin.py +++ b/plugin.py @@ -6,9 +6,8 @@ import hashlib import subprocess -def listPlugins(): +def listPlugins(update=False): plugins = [] - customPlugins = [] for file in os.listdir("plugins"): if file.endswith(".py"): if file != "main.py": @@ -36,7 +35,7 @@ def listPlugins(): if not os.path.exists(f"customPlugins/{importPath}"): if os.system(f"git clone {importurl} customPlugins/{importPath}") != 0: continue - else: + elif update: if os.system(f"cd customPlugins/{importPath} && git pull") != 0: continue diff --git a/render.py b/render.py index 033e52c..5b98f27 100644 --- a/render.py +++ b/render.py @@ -196,7 +196,7 @@ def bidDomains(bids,domains, sortState=False): html += "" - html += f"{domain['name']}" + html += f"{domain['name']}" html += f"{domain['state']}" html += f"{bidDisplay}" html += f"{bid['height']}" @@ -216,9 +216,10 @@ def bidDomains(bids,domains, sortState=False): bidDisplay = f'{bidValue} HNS + {blind} HNS blind' html += "" - html += f"{domain['name']}" + html += f"{domain['name']}" html += f"{domain['state']}" html += f"{bidDisplay}" + html += f"{domain['height']}" html += "" return html