fix: Cleanup mobile
All checks were successful
Build Docker / BuildImage (push) Successful in 1m3s
Check Code Quality / RuffCheck (push) Successful in 1m14s

This commit is contained in:
2026-04-04 19:39:08 +11:00
parent 17d2f20b61
commit 74a93877b9
2 changed files with 221 additions and 80 deletions

View File

@@ -37,7 +37,16 @@
</div>
</header>
<section class="stats-grid" id="poolSummary"></section>
<details class="panel mobile-accordion stats-accordion" data-accordion="summary" open>
<summary>Pool Stats</summary>
<div class="accordion-content">
<div class="panel-head">
<h2>Pool Stats</h2>
<p>Live network and reward snapshot</p>
</div>
<section class="stats-grid" id="poolSummary"></section>
</div>
</details>
<section class="panel search-panel">
<div class="panel-head">
@@ -52,89 +61,101 @@
<div class="stats-grid compact" id="minerSummary"></div>
</section>
<section class="panel">
<div class="panel-head">
<h2>Workers</h2>
<p id="workerCountLabel">Pool workers</p>
<details class="panel mobile-accordion" data-accordion="workers" open>
<summary>Workers</summary>
<div class="accordion-content">
<div class="panel-head">
<h2>Workers</h2>
<p id="workerCountLabel">Pool workers</p>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Username</th>
<th>Hashrate</th>
<th>Accepted</th>
<th>Rejected</th>
<th>Stale</th>
<th>Blocks</th>
<th>Est. Daily (FBC)</th>
</tr>
</thead>
<tbody id="workersBody"></tbody>
</table>
</div>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Username</th>
<th>Hashrate</th>
<th>Accepted</th>
<th>Rejected</th>
<th>Stale</th>
<th>Blocks</th>
<th>Est. Daily (FBC)</th>
</tr>
</thead>
<tbody id="workersBody"></tbody>
</table>
</div>
</section>
</details>
<section class="panel">
<div class="panel-head">
<h2>Blocks</h2>
<p id="blockCountLabel">Recent block history</p>
<details class="panel mobile-accordion" data-accordion="blocks" open>
<summary>Blocks</summary>
<div class="accordion-content">
<div class="panel-head">
<h2>Blocks</h2>
<p id="blockCountLabel">Recent block history</p>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Height</th>
<th>Status</th>
<th>Reward (FBC)</th>
<th>Found By</th>
<th>Confirmations</th>
<th>Time</th>
</tr>
</thead>
<tbody id="blocksBody"></tbody>
</table>
</div>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Height</th>
<th>Status</th>
<th>Reward (FBC)</th>
<th>Found By</th>
<th>Confirmations</th>
<th>Time</th>
</tr>
</thead>
<tbody id="blocksBody"></tbody>
</table>
</div>
</section>
</details>
<section class="panel">
<div class="panel-head">
<h2>Balances</h2>
<details class="panel mobile-accordion" data-accordion="balances" open>
<summary>Balances</summary>
<div class="accordion-content">
<div class="panel-head">
<h2>Balances</h2>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Address</th>
<th>Balance (FBC)</th>
<th>Total Earned (FBC)</th>
<th>Total Paid (FBC)</th>
</tr>
</thead>
<tbody id="balancesBody"></tbody>
</table>
</div>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Address</th>
<th>Balance (FBC)</th>
<th>Total Earned (FBC)</th>
<th>Total Paid (FBC)</th>
</tr>
</thead>
<tbody id="balancesBody"></tbody>
</table>
</div>
</section>
</details>
<section class="panel">
<div class="panel-head">
<h2>Payouts</h2>
<details class="panel mobile-accordion" data-accordion="payouts" open>
<summary>Payouts</summary>
<div class="accordion-content">
<div class="panel-head">
<h2>Payouts</h2>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Address</th>
<th>Amount (FBC)</th>
<th>Status</th>
<th>TXID</th>
<th>Time</th>
</tr>
</thead>
<tbody id="payoutsBody"></tbody>
</table>
</div>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Address</th>
<th>Amount (FBC)</th>
<th>Status</th>
<th>TXID</th>
<th>Time</th>
</tr>
</thead>
<tbody id="payoutsBody"></tbody>
</table>
</div>
</section>
</details>
<section class="panel setup-panel">
<div class="panel-head">
@@ -144,7 +165,7 @@
<a class="setup-link" href="/setup-miner">Open Miner Setup Guide</a>
</section>
<footer class="footer">
<p>Powered by <a href="https://nathan.woodburn.au" target="_blank" rel="noopener">Nathan.Woodburn/</a>
<p>Powered by <a href="https://nathan.woodburn.au" target="_blank" rel="noopener">Nathan.Woodburn/</a></p>
</footer>
</main>
@@ -211,6 +232,17 @@
stamp.textContent = `Last update: ${new Date().toLocaleString()}`;
}
function initMobileAccordions() {
const accordions = document.querySelectorAll('.mobile-accordion');
if (!accordions.length) return;
const isCompact = window.matchMedia('(max-width: 720px)').matches;
accordions.forEach((accordion, idx) => {
accordion.open = !isCompact || idx === 0;
});
}
async function loadOverview() {
const res = await fetch("/api/v1/pool/overview");
if (!res.ok) {
@@ -424,6 +456,7 @@
}
});
initMobileAccordions();
refreshAll();
setInterval(refreshAll, refreshMs);
</script>