feat: expand header stats with total funds and profit-loss ratio

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-07 02:14:18 +08:00
parent 659c0969fe
commit 814fe67a21
10 changed files with 138 additions and 10 deletions
@@ -1053,6 +1053,10 @@ function refreshAccountSnapshot(){
const el = document.getElementById("total-capital");
if(el) el.innerText = (data.funding_usdt === null || data.funding_usdt === undefined) ? "—" : `${Number(data.funding_usdt).toFixed(2)}U`;
}
if (typeof data.total_funds !== "undefined") {
const el = document.getElementById("total-funds");
if(el) el.innerText = (data.total_funds === null || data.total_funds === undefined) ? "—" : `${Number(data.total_funds).toFixed(2)}U`;
}
if (typeof data.current_capital !== "undefined") {
const el = document.getElementById("current-capital");
if(el) el.innerText = `${Number(data.current_capital).toFixed(2)}U`;