Browse Source

more minor frontend tweaks

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
ed246e1fc3
  1. 1
      app/coins/btc.js
  2. 1
      app/coins/ltc.js
  3. 2
      views/includes/block-content.pug
  4. 7
      views/includes/blocks-list.pug
  5. 5
      views/includes/value-display.pug

1
app/coins/btc.js

@ -10,6 +10,7 @@ module.exports = {
nodeUrl:"https://bitcoin.org/en/full-node", nodeUrl:"https://bitcoin.org/en/full-node",
demoSiteUrl: "https://btc.chaintools.io", demoSiteUrl: "https://btc.chaintools.io",
miningPoolsConfigUrl:"https://raw.githubusercontent.com/blockchain/Blockchain-Known-Pools/master/pools.json", miningPoolsConfigUrl:"https://raw.githubusercontent.com/blockchain/Blockchain-Known-Pools/master/pools.json",
maxBlockWeight: 4000000,
currencyUnits:[ currencyUnits:[
{ {
name:"BTC", name:"BTC",

1
app/coins/ltc.js

@ -9,6 +9,7 @@ module.exports = {
nodeUrl:"https://litecoin.org/", nodeUrl:"https://litecoin.org/",
demoSiteUrl: "https://ltc.chaintools.io", demoSiteUrl: "https://ltc.chaintools.io",
miningPoolsConfigUrl:"https://raw.githubusercontent.com/hashstream/pools/master/pools.json", miningPoolsConfigUrl:"https://raw.githubusercontent.com/hashstream/pools/master/pools.json",
maxBlockWeight: 4000000,
currencyUnits:[ currencyUnits:[
{ {
name:"LTC", name:"LTC",

2
views/includes/block-content.pug

@ -155,8 +155,6 @@ div(class="tab-content")
th(class="table-active text-right") Chainwork th(class="table-active text-right") Chainwork
td(class="monospace word-wrap") #{result.getblock.chainwork} td(class="monospace word-wrap") #{result.getblock.chainwork}
hr
div(class="card mb-3") div(class="card mb-3")
div(class="card-header") div(class="card-header")
div(class="row") div(class="row")

7
views/includes/blocks-list.pug

@ -6,10 +6,14 @@ table(class="table table-striped table-responsive-sm")
th(class="data-header") Timestamp (utc) th(class="data-header") Timestamp (utc)
th(class="data-header text-right") Age th(class="data-header text-right") Age
th(class="data-header") Miner th(class="data-header") Miner
a(data-toggle="tooltip", title=("Hover text below for details"))
i(class="fas fa-info-circle")
th(class="data-header text-right") Transactions th(class="data-header text-right") Transactions
th(class="data-header text-right") Average Fee th(class="data-header text-right") Average Fee
th(class="data-header text-right") Size (bytes) th(class="data-header text-right") Size (bytes)
th(class="data-header text-right") Weight (wu) th(class="data-header text-right") Weight (wu)
a(data-toggle="tooltip", title=("Hover text below for % full"))
i(class="fas fa-info-circle")
tbody tbody
each block, blockIndex in blocks each block, blockIndex in blocks
if (block) if (block)
@ -35,4 +39,5 @@ table(class="table table-striped table-responsive-sm")
include ./value-display.pug include ./value-display.pug
td(class="data-cell monospace text-right") #{block.size.toLocaleString()} td(class="data-cell monospace text-right") #{block.size.toLocaleString()}
td(class="data-cell monospace text-right") #{block.weight.toLocaleString()} td(class="data-cell monospace text-right")
span(title=(new Decimal(100 * block.weight / coinConfig.maxBlockWeight).toDecimalPlaces(2) + "% full"), data-toggle="tooltip") #{block.weight.toLocaleString()}

5
views/includes/value-display.pug

@ -1,5 +1,8 @@
span(class="monospace") #{utils.formatCurrencyAmount(currencyValue, currencyFormatType)} if (currencyValue > 0)
span(class="monospace") #{utils.formatCurrencyAmount(currencyValue, currencyFormatType)}
if (global.exchangeRate) if (global.exchangeRate)
span span
span(data-toggle="tooltip", title=utils.formatExchangedCurrency(currencyValue)) span(data-toggle="tooltip", title=utils.formatExchangedCurrency(currencyValue))
i(class="fas fa-exchange-alt") i(class="fas fa-exchange-alt")
else
span(class="monospace") 0
Loading…
Cancel
Save