Hide single-coin pool page tabs
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 30s

This commit is contained in:
Codex Bot
2026-03-24 14:46:14 +01:00
parent de44ffdae8
commit 8f6cd66e36

View File

@@ -93,6 +93,12 @@ function renderLucideIcons(root) {
}
}
function toggleSingleTabNav(selector) {
const $tabs = $(selector);
if (!$tabs.length) return;
$tabs.toggle($tabs.children('li').length > 1);
}
let lucideRenderScheduled = false;
function scheduleLucideRender() {
if (lucideRenderScheduled) return;
@@ -839,7 +845,7 @@ function poolBlocks_InitTemplate(ranOnce, displayedChart, xhrGetBlocks) {
poolBlocks_RenderBlocks(lastStats.pool.blocks, lastStats);
toggleSingleTabNav('#blocksTabs');
renderLucideIcons(document.body);
if (!ranOnce)
@@ -1235,6 +1241,7 @@ function payments_InitTemplate(xhrGetPayments, ranOnce) {
updateText(`paymentsMinimum${coin}`, getReadableCoin(lastStats, lastStats.config.minPaymentThreshold));
updateText(`paymentsDenomination${coin}`, getReadableCoin(lastStats, lastStats.config.denominationUnit, 3));
payments_renderPayments(lastStats.pool.payments, lastStats);
toggleSingleTabNav('#blocksTabs');
if (!ranOnce)
ranOnce = RunOnce()
}
@@ -2172,6 +2179,7 @@ function workerstats_InitTemplate(ranOnce, addressTimeout, xhrAddressPoll, xhrGe
settings_Setup(api, lastStats)
}
toggleSingleTabNav('#blocksTabs');
if (!ranOnce)
ranOnce = RunOnce()
}