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 }} - {{ item.height }} + {{ item.friendly_height }} {{ item.confirmations }} @@ -44,4 +44,4 @@ {{ item.fees }} Nav -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/templates/address/components/addresses_list.html.twig b/templates/address/components/addresses_list.html.twig index dd7797d..a63b73d 100644 --- a/templates/address/components/addresses_list.html.twig +++ b/templates/address/components/addresses_list.html.twig @@ -2,9 +2,11 @@

Addresses

-
+
+
{{ loaderDots() }}
+
@@ -23,4 +25,4 @@
-
\ No newline at end of file + diff --git a/templates/address/components/history.html.twig b/templates/address/components/history.html.twig index e7f6f49..49a6e2a 100644 --- a/templates/address/components/history.html.twig +++ b/templates/address/components/history.html.twig @@ -1,4 +1,5 @@
+
{{ loaderDots() }}
@@ -16,4 +17,4 @@
-
\ No newline at end of file + diff --git a/templates/block/index.html.twig b/templates/block/index.html.twig index dccfff7..d3601e0 100644 --- a/templates/block/index.html.twig +++ b/templates/block/index.html.twig @@ -13,9 +13,11 @@

Blocks

-
+
+
{{ loaderDots() }}
+
diff --git a/templates/block/view.html.twig b/templates/block/view.html.twig index 1fda45f..58e0658 100644 --- a/templates/block/view.html.twig +++ b/templates/block/view.html.twig @@ -34,6 +34,7 @@
+
{{ loaderDots() }}
{% include "block/components/view_transactions.html.twig" %}
diff --git a/templates/transaction/components/index_transactions.html.twig b/templates/transaction/components/index_transactions.html.twig index f6efe59..979d6a9 100644 --- a/templates/transaction/components/index_transactions.html.twig +++ b/templates/transaction/components/index_transactions.html.twig @@ -2,9 +2,11 @@

Transactions

-
+
+
{{ loaderDots() }}
+
@@ -22,4 +24,4 @@
-
\ No newline at end of file +