Add optional market cap box to heading
This commit is contained in:
@@ -115,6 +115,8 @@ exports.movement = {
|
||||
//index
|
||||
exports.index = {
|
||||
"show_hashrate": false,
|
||||
"show_market_cap": false,
|
||||
"show_market_cap_over_price": false,
|
||||
"difficulty": "POS",
|
||||
"last_txs": 100,
|
||||
"txs_per_page": 10
|
||||
|
||||
@@ -97,6 +97,10 @@
|
||||
// index page (valid options for difficulty are POW, POS or Hybrid)
|
||||
"index": {
|
||||
"show_hashrate": true,
|
||||
// Show Market Cap in header
|
||||
"show_market_cap": false,
|
||||
// Show Market Cap in place of price box
|
||||
"show_market_cap_over_price": false,
|
||||
"difficulty": "POS",
|
||||
"last_txs": 100,
|
||||
"txs_per_page": 10
|
||||
|
||||
+10
-4
@@ -34,7 +34,8 @@ html
|
||||
$("#difficulty").text(parseFloat(json.data[0].difficulty).toFixed(2));
|
||||
$("#difficultyHybrid").text(json.data[0].difficultyHybrid);
|
||||
$("#hashrate").text(parseFloat(json.data[0].hashrate).toLocaleString('en'));
|
||||
$("#lastPrice").text(parseFloat(json.data[0].lastPrice).toFixed(8));
|
||||
$("#lastPrice").text(parseFloat(json.data[0].lastPrice).toFixed(8) + ' #{settings.markets.exchange}'.toUpperCase());
|
||||
$("#marketCap").text((parseFloat(json.data[0].lastPrice).toFixed(8) * parseInt(parseFloat(json.data[0].supply).toFixed(0))).toLocaleString('en') + ' #{settings.markets.exchange}'.toUpperCase());
|
||||
$("#lblConnections").text(json.data[0].connections + ' connections');
|
||||
$("#lblBlockcount").text(json.data[0].blockcount + ' blocks');
|
||||
$("#lblX1").text(' ');
|
||||
@@ -96,12 +97,17 @@ html
|
||||
function getCoinSupplyPanel() {
|
||||
var supplyType='<label id="supply"></label>';
|
||||
if ('#{settings.index.difficulty}' == 'Hybrid') supplyType+='<br /><label id="lblX1"></label>';
|
||||
if (#{settings.index.show_market_cap} == true && #{settings.index.show_market_cap_over_price} != true) supplyType+='<br /><span class="glyphicon fas fa-chart-line"></span><label>(</label><label id="marketCap">-</label><label>)</label>';
|
||||
return '<div class="panel-heading"><strong>#{settings.locale.ex_supply} (#{settings.symbol})</strong></div><div class="panel-body"><div id="supplypanel"><span class="glyphicon fa fa-chart-pie"></span>'+supplyType+'</div></div>';
|
||||
}
|
||||
function getPricePanel() {
|
||||
var priceType='<label id="lastPrice"></label>';
|
||||
if ('#{settings.index.difficulty}' == 'Hybrid') priceType+='<br /><label id="lblX1"></label>';
|
||||
return '<div class="panel-heading"><strong>#{settings.markets.exchange} Price</strong></div><div class="panel-body"><div id="pricepanel"><span class="glyphicon fa fa-rocket"></span>'+priceType+'</div></div>';
|
||||
if (#{settings.index.show_market_cap} == true && #{settings.index.show_market_cap_over_price} == true) {
|
||||
return '<div class="panel-heading"><strong>Market Cap</strong></div><div class="panel-body"><div id="pricepanel"><span class="glyphicon fas fa-chart-line"></span><label id="marketCap"></label></div></div>';
|
||||
} else {
|
||||
var priceType='<label id="lastPrice">-</label>';
|
||||
if ('#{settings.index.difficulty}' == 'Hybrid') priceType+='<br /><label id="lblX1"></label>';
|
||||
return '<div class="panel-heading"><strong>#{settings.markets.exchange} Price</strong></div><div class="panel-body"><div id="pricepanel"><span class="glyphicon fa fa-rocket"></span>'+priceType+'</div></div>';
|
||||
}
|
||||
}
|
||||
function getActivePanel(nPanelName) {
|
||||
var sReturn='';
|
||||
|
||||
Reference in New Issue
Block a user