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:
@@ -58,17 +58,6 @@
|
||||
<li><a class="hot_link" data-page="top10miners.html" href="#top10miners">
|
||||
<i class="fa fa-trophy"></i> <span data-tkey="top10miners">Top 10 miners</span>
|
||||
</a></li>
|
||||
|
||||
<li><a class="hot_link" data-page="market.html" href="#market">
|
||||
<i class="fa fa-bank"></i> <span data-tkey="market">Market / Calculator</span>
|
||||
</a></li>
|
||||
|
||||
<li><a class="hot_link" data-page="settings.html" href="#settings">
|
||||
<i class="fa fa-gears"></i> <span data-tkey="settings">Settings</span>
|
||||
</a></li>
|
||||
<li><a class="hot_link" data-page="faq.html" href="#faq">
|
||||
<i class="fa fa-comments"></i> <span data-tkey="faq">FAQ</span>
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -246,19 +235,6 @@ $(function(){
|
||||
$("head").append("<link rel='stylesheet' href=" + themeCss + ">");
|
||||
}
|
||||
|
||||
// Add support informations to menu
|
||||
if (typeof telegram !== 'undefined' && telegram) {
|
||||
$('#menu-content').append('<li><a target="_new" href="'+telegram+'"><i class="fa fa-telegram"></i> <span data-tkey="telegram">Telegram group</span></a></li>');
|
||||
}
|
||||
if (typeof discord !== 'undefined' && discord) {
|
||||
$('#menu-content').append('<li><a target="_new" href="'+discord+'"><i class="fa fa-ticket"></i> <span data-tkey="discord">Discord</span></a></li>');
|
||||
}
|
||||
if (typeof email !== 'undefined' && email) {
|
||||
$('#menu-content').append('<li><a target="_new" href="mailto:'+email+'"><i class="fa fa-envelope"></i> <span data-tkey="contactUs">Contact Us</span></a></li>');
|
||||
}
|
||||
if (typeof facebook !== 'undefined' && facebook) {
|
||||
$('#menu-content').append('<li><a target="_new" href="'+facebook+'"><i class="fa fa-facebook"></i> <span data-tkey="facebook">Facebook</span></a></li>');
|
||||
}
|
||||
if (typeof langs !== 'undefined' && langs) {
|
||||
$('#menu-content').append('<div id="mLangSelector"></div>');
|
||||
renderLangSelector();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -173,6 +173,16 @@ footer a {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.hero-lookup-group {
|
||||
margin-top: 18px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.hero-lookup-group .form-control,
|
||||
.hero-lookup-group .btn {
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
.hero-kpi {
|
||||
padding: 18px;
|
||||
border-radius: var(--radius-md);
|
||||
@@ -241,6 +251,25 @@ footer a {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.getting-started-card,
|
||||
.faq-card {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.getting-started-inner {
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.getting-started-inner p {
|
||||
color: var(--text-soft);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.faq-grid .faq-card h4,
|
||||
.getting-started-inner h4 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.lookup-group .form-control {
|
||||
height: 52px;
|
||||
font-size: 15px;
|
||||
@@ -821,6 +850,12 @@ textarea:focus {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero-lookup-group .input-group-btn,
|
||||
.hero-lookup-group .btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.infoBox .icon {
|
||||
font-size: 48px;
|
||||
line-height: 48px;
|
||||
|
||||
Reference in New Issue
Block a user