fix: Only refresh plugins on plugin page.
All checks were successful
Build Docker / Build Image (push) Successful in 49s

Also added link to auction from bids
This commit is contained in:
Nathan Woodburn 2025-01-29 22:50:41 +11:00
parent 76dd5a429b
commit 1962c9345e
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
3 changed files with 6 additions and 6 deletions

View File

@ -1298,7 +1298,7 @@ def plugins_index():
if not account: if not account:
return redirect("/logout") 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(), return render_template("plugins.html", account=account, sync=account_module.getNodeSync(),
wallet_status=account_module.getWalletStatus(), wallet_status=account_module.getWalletStatus(),

View File

@ -6,9 +6,8 @@ import hashlib
import subprocess import subprocess
def listPlugins(): def listPlugins(update=False):
plugins = [] plugins = []
customPlugins = []
for file in os.listdir("plugins"): for file in os.listdir("plugins"):
if file.endswith(".py"): if file.endswith(".py"):
if file != "main.py": if file != "main.py":
@ -36,7 +35,7 @@ def listPlugins():
if not os.path.exists(f"customPlugins/{importPath}"): if not os.path.exists(f"customPlugins/{importPath}"):
if os.system(f"git clone {importurl} customPlugins/{importPath}") != 0: if os.system(f"git clone {importurl} customPlugins/{importPath}") != 0:
continue continue
else: elif update:
if os.system(f"cd customPlugins/{importPath} && git pull") != 0: if os.system(f"cd customPlugins/{importPath} && git pull") != 0:
continue continue

View File

@ -196,7 +196,7 @@ def bidDomains(bids,domains, sortState=False):
html += "<tr>" html += "<tr>"
html += f"<td>{domain['name']}</td>" html += f"<td><a class='text-decoration-none' style='color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));' href='/auction/{domain['name']}'>{domain['name']}</a></td>"
html += f"<td>{domain['state']}</td>" html += f"<td>{domain['state']}</td>"
html += f"<td>{bidDisplay}</td>" html += f"<td>{bidDisplay}</td>"
html += f"<td>{bid['height']}</td>" html += f"<td>{bid['height']}</td>"
@ -216,9 +216,10 @@ def bidDomains(bids,domains, sortState=False):
bidDisplay = f'<b>{bidValue} HNS</b> + {blind} HNS blind' bidDisplay = f'<b>{bidValue} HNS</b> + {blind} HNS blind'
html += "<tr>" html += "<tr>"
html += f"<td>{domain['name']}</td>" html += f"<td><a class='text-decoration-none' style='color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));' href='/auction/{domain['name']}'>{domain['name']}</a></td>"
html += f"<td>{domain['state']}</td>" html += f"<td>{domain['state']}</td>"
html += f"<td>{bidDisplay}</td>" html += f"<td>{bidDisplay}</td>"
html += f"<td>{domain['height']}</td>"
html += "</tr>" html += "</tr>"
return html return html