Simplify pool frontpage flow
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 26s
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 26s
This commit is contained in:
@@ -6,15 +6,23 @@
|
||||
This dashboard keeps the legacy pool API, but presents it in the same visual language as the explorer:
|
||||
clearer cards, calmer contrast, and direct paths to connect miners or inspect found blocks.
|
||||
</p>
|
||||
<div class="input-group hero-lookup-group">
|
||||
<input class="form-control" id="heroMinerAddress" type="text" placeholder="Enter wallet address to open worker statistics">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="heroMinerLookup">
|
||||
<i class="fa fa-search"></i> View Worker Statistics
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<a class="btn btn-default hot_link" data-page="getting_started.html" href="#getting_started">
|
||||
<a class="btn btn-default home-scroll" href="#overview-getting-started">
|
||||
<i class="fa fa-rocket"></i> <span data-tkey="gettingStarted">Getting Started</span>
|
||||
</a>
|
||||
<a class="btn btn-primary hot_link" data-page="pool_blocks.html" href="#pool_blocks">
|
||||
<a class="btn btn-primary home-scroll" href="#overview-pool-blocks">
|
||||
<i class="fa fa-cubes"></i> <span data-tkey="poolBlocks">Pool Blocks</span>
|
||||
</a>
|
||||
<a class="btn btn-primary hot_link" data-page="worker_stats.html" href="#worker_stats">
|
||||
<i class="fa fa-dashboard"></i> <span data-tkey="yourStats">Worker Statistics</span>
|
||||
<a class="btn btn-primary home-scroll" href="#overview-faq">
|
||||
<i class="fa fa-comments"></i> FAQ
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +46,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-block">
|
||||
<section class="section-block" id="overview-pool-blocks">
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<span class="eyebrow">Pool posture</span>
|
||||
@@ -210,6 +218,62 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-block" id="overview-getting-started">
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<span class="eyebrow">Getting started</span>
|
||||
<h4>Connect a miner fast</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="preview-grid">
|
||||
<div class="card getting-started-card">
|
||||
<div class="getting-started-inner">
|
||||
<h4>Connection details</h4>
|
||||
<div class="stats">
|
||||
<div><i class="fa fa-cloud"></i> Pool host: <span id="homeMiningPoolHost"></span></div>
|
||||
<div><i class="fa fa-cubes"></i> Algorithm: <span id="homeCnAlgorithm"></span></div>
|
||||
<div><i class="fa fa-key"></i> Username: your parent-chain wallet address</div>
|
||||
<div><i class="fa fa-server"></i> Password: optional worker name or miner-specific settings</div>
|
||||
<div><i class="fa fa-wrench"></i> Fixed diff: <code>wallet.diff</code> or worker naming via <code>@worker</code></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card getting-started-card">
|
||||
<div class="getting-started-inner">
|
||||
<h4>Mining ports</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Port</th>
|
||||
<th>Starting difficulty</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="homeMiningPortsRows">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-block" id="overview-faq">
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<span class="eyebrow">FAQ</span>
|
||||
<h4>Operational basics</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="preview-grid faq-grid">
|
||||
<div class="card faq-card"><div class="getting-started-inner"><h4>What is a share?</h4><p>A share proves your miner is doing useful work even when it does not find a full block.</p></div></div>
|
||||
<div class="card faq-card"><div class="getting-started-inner"><h4>What is luck?</h4><p>Luck compares actual effort to expected effort. Below 100% means the pool found a block faster than statistically expected.</p></div></div>
|
||||
<div class="card faq-card"><div class="getting-started-inner"><h4>Why no payout yet?</h4><p>Rewards must first mature on-chain and then exceed the configured payout threshold before they are sent.</p></div></div>
|
||||
<div class="card faq-card"><div class="getting-started-inner"><h4>What is solo mode?</h4><p>Solo mining uses the same pool infrastructure but aims for full-block wins instead of proportional round sharing.</p></div></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script id="mainPoolTemplate" type="text/x-handlebars-template">
|
||||
<!-- Pool Hash Rate -->
|
||||
<div class="col-lg-3 col-sm-4">
|
||||
@@ -559,12 +623,49 @@ function home_LoadDualMm() {
|
||||
});
|
||||
}
|
||||
|
||||
function home_RenderGettingStarted(stats) {
|
||||
updateText('homeMiningPoolHost', poolHost || window.location.hostname);
|
||||
updateText('homeCnAlgorithm', stats.config.cnAlgorithm || 'randomx');
|
||||
|
||||
let rows = $('#homeMiningPortsRows');
|
||||
rows.empty();
|
||||
let ports = (stats.config && stats.config.ports) ? stats.config.ports : [];
|
||||
if (!ports.length) {
|
||||
home_RenderEmptyRow(rows, 3, 'No mining ports configured.');
|
||||
return;
|
||||
}
|
||||
|
||||
ports.forEach(function(port) {
|
||||
rows.append(
|
||||
'<tr>' +
|
||||
'<td>' + port.port + '</td>' +
|
||||
'<td>' + formatNumber(String(port.difficulty), ' ') + '</td>' +
|
||||
'<td>' + (port.desc || '') + '</td>' +
|
||||
'</tr>'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function home_HandleHeroLookup() {
|
||||
let address = $('#heroMinerAddress').val().trim();
|
||||
if (!address) {
|
||||
$('#heroMinerAddress').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
docCookies.setItem(`mining_address_${lastStats.config.coin}`, address, Infinity);
|
||||
window.location.hash = '#worker_stats';
|
||||
}
|
||||
|
||||
currentPage = {
|
||||
destroy: function(){
|
||||
$('#networkLastBlockFound,#poolLastBlockFound').timeago('dispose');
|
||||
if (xhrHomeTopMiners) xhrHomeTopMiners.abort();
|
||||
if (xhrHomeDualMm) xhrHomeDualMm.abort();
|
||||
destroyApexChartsByPrefix(homeChartInstances, 'home_');
|
||||
$('#heroMinerLookup').off('click');
|
||||
$('#heroMinerAddress').off('keyup');
|
||||
$('.home-scroll').off('click');
|
||||
},
|
||||
update: function(updateKey){
|
||||
if (lastStats)
|
||||
@@ -610,6 +711,7 @@ currentPage = {
|
||||
updateText('blockSolvedTime', getReadableTime(lastStats.network.difficulty / lastStats.pool.hashrate));
|
||||
home_RenderPoolBlocks(stats);
|
||||
home_RenderPayments(stats);
|
||||
home_RenderGettingStarted(stats);
|
||||
home_CreateCharts(stats);
|
||||
}
|
||||
}
|
||||
@@ -637,8 +739,22 @@ $(function(){
|
||||
|
||||
home_RenderPoolBlocks(lastStats);
|
||||
home_RenderPayments(lastStats);
|
||||
home_RenderGettingStarted(lastStats);
|
||||
home_LoadTopMiners();
|
||||
home_LoadDualMm();
|
||||
$('#heroMinerAddress').val(getCurrentAddress(lastStats.config.coin) || '');
|
||||
$('#heroMinerLookup').click(home_HandleHeroLookup);
|
||||
$('#heroMinerAddress').keyup(function(e) {
|
||||
if (e.keyCode === 13) home_HandleHeroLookup();
|
||||
});
|
||||
$('.home-scroll').click(function(e) {
|
||||
e.preventDefault();
|
||||
let target = $(this).attr('href');
|
||||
let el = document.querySelector(target);
|
||||
if (el) {
|
||||
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
});
|
||||
home_InitTemplate(lastStats)
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user