refactor: move fetch after terms accept, add donations/nextdep/unconfirmed balance, fix download blob

This commit is contained in:
2026-07-14 08:01:03 -04:00
parent f9ffc383a0
commit 74fe167137
2 changed files with 61 additions and 29 deletions

View File

@@ -49,6 +49,7 @@
</div>
<div style="border:1;margin-right:50px;">
<div><span>Balance:</span><span id="webalance">&nbsp;</span></div>
<div><span>Donations:</span><span id="wedonations">&nbsp;</span></div>
<div><span>Status:</span><span id="westatus">&nbsp;</span></div>
<div><span>Last Update:</span><span id="weupdate">&nbsp;</span></div>
</div>
@@ -89,7 +90,10 @@
document.getElementById('wepoints').innerHTML = data.points != null ? data.points : '—';
document.getElementById('wewin').innerHTML = data.count_win != null ? data.count_win : '—';
document.getElementById('wetld').innerHTML = DOMPurify.sanitize(data.tld||'—');
document.getElementById('webalance').innerHTML = data.balance != null ? data.balance : '—';
const bal = data.balance != null ? data.balance : null;
const unc = data.unconfirmed_balance != null ? data.unconfirmed_balance : null;
document.getElementById('webalance').innerHTML = bal ? (unc ? bal + ' (' + unc + ')' : bal) : '—';
document.getElementById('wedonations').innerHTML = data.donations != null ? data.donations : '—';
document.getElementById('weversion').innerHTML = data.version||'—';
const statusMap = {
'OK': 'Health check passed',