diff --git a/assets/css/app.scss b/assets/css/app.scss index 2d75528..afb254e 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -118,6 +118,10 @@ p { color: #ffffff; } +.blink { + animation: blinker 5s linear infinite; +} + @keyframes gradient { 0% { background-position: 0% 50%; @@ -130,6 +134,12 @@ p { } } +@keyframes blinker { + 50% { + opacity: 0; + } +} + small { font-size: 90%; color: $grey; diff --git a/assets/js/page/BlockViewPage.js b/assets/js/page/BlockViewPage.js index c226ac6..3fe57cb 100644 --- a/assets/js/page/BlockViewPage.js +++ b/assets/js/page/BlockViewPage.js @@ -6,6 +6,7 @@ import nunjucks from "../services/Nunjucks"; class BlockViewPage { constructor() { + console.log("TEST") let height = $('.block').data('height') this.loadTxs(height) @@ -19,9 +20,10 @@ class BlockViewPage { } renderTxs(data) { - console.log(data); nunjucks.render("blocks/txs.html", {data: data.elements}, function(err, html) { - $('.transaction-list').html(html) + $('.transaction-list').html(html); + $('#transactions-loader').hide(); + }.bind(this)) } } @@ -30,4 +32,4 @@ $(function() { if ($('body').is('.page-block-view')) { new BlockViewPage(); } -}); \ No newline at end of file +}); diff --git a/assets/js/page/TransactionIndexPage.js b/assets/js/page/TransactionIndexPage.js index 8cca0bd..c1b0b2e 100644 --- a/assets/js/page/TransactionIndexPage.js +++ b/assets/js/page/TransactionIndexPage.js @@ -63,7 +63,8 @@ class TransactionIndexPage { link: "/tx/"+data.hash, age: moment(data.time).utc().fromNow(), time: moment(data.time).utc().format('YYYY-MM-DD HH:mm:ss'), - height: NumberFormat.format(data.height, false), + height: data.height, + friendly_height: NumberFormat.format(data.height, false), confirmations: NumberFormat.format(data.confirmations ? data.confirmations : 0, false), amount: amount, fees: NumberFormat.format(data.fees/100000000, true, 4), diff --git a/assets/js/services/Table.js b/assets/js/services/Table.js index 2f013bf..0f94145 100644 --- a/assets/js/services/Table.js +++ b/assets/js/services/Table.js @@ -137,6 +137,7 @@ class Table { options.page = this.pagination.current_page + this.selector.addClass('blink') ExplorerApi.get(this.api_path, this.options, this.render.bind(this)) } @@ -196,6 +197,8 @@ class Table { updateTable(data) { this.emptyTable() this.selector.find('tbody').append(data); + this.selector.removeClass('blink') + this.selector.find('.table-loader').hide() } emptyTable() { @@ -211,4 +214,4 @@ export default function CreateTable(selector, api_path, dataProcessor, rowTempla table.request() return table -} \ No newline at end of file +} diff --git a/assets/js/services/TransactionLoader.js b/assets/js/services/TransactionLoader.js index bf9e3b2..005f393 100644 --- a/assets/js/services/TransactionLoader.js +++ b/assets/js/services/TransactionLoader.js @@ -140,4 +140,4 @@ export default class TransactionLoader { return '' + this.numberWithCommas(sum) + ' NAV' + ''; } -} \ No newline at end of file +} diff --git a/public/templates/transactions/table-rows.html b/public/templates/transactions/table-rows.html index a5cab09..277ab1a 100644 --- a/public/templates/transactions/table-rows.html +++ b/public/templates/transactions/table-rows.html @@ -32,7 +32,7 @@ {{ item.time }}