From e0018e345d56039c5ea4058d9dc32b0bfebe8ed7 Mon Sep 17 00:00:00 2001 From: Leszek Stachowski Date: Tue, 17 Oct 2023 17:13:03 +0200 Subject: [PATCH] EOL reserve stats on explorer --- .../assets/css/components/_stats.scss | 4 ++++ apps/block_scout_web/assets/js/pages/stats.js | 4 ++++ .../templates/stats/index.html.eex | 11 ++++++++--- apps/block_scout_web/priv/gettext/default.pot | 16 +++++++++++++--- .../priv/gettext/en/LC_MESSAGES/default.po | 16 +++++++++++++--- 5 files changed, 42 insertions(+), 9 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_stats.scss b/apps/block_scout_web/assets/css/components/_stats.scss index 367f779bdb02..495d0ddd0819 100644 --- a/apps/block_scout_web/assets/css/components/_stats.scss +++ b/apps/block_scout_web/assets/css/components/_stats.scss @@ -69,6 +69,10 @@ ul.topnav li a { box-shadow: 5px 5px 5px rgb(180, 175, 175); } +ul.topnav li.stats-link-no-selection a { + cursor: default; +} + ul.topnav li.selected a { color: #26ba6c; font-weight: normal; diff --git a/apps/block_scout_web/assets/js/pages/stats.js b/apps/block_scout_web/assets/js/pages/stats.js index c4cdb6f9708b..28a23b69f735 100644 --- a/apps/block_scout_web/assets/js/pages/stats.js +++ b/apps/block_scout_web/assets/js/pages/stats.js @@ -1,6 +1,10 @@ import $ from 'jquery' $('.stats-link').on('click', function () { + if ($(this).hasClass('stats-link-no-selection')) { + return + } + $('ul#topnav .selected').removeClass('selected') $(this).addClass('selected') }) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/stats/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/stats/index.html.eex index 4ca2e7e5a203..dafad2bed6b1 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/stats/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/stats/index.html.eex @@ -2,7 +2,7 @@ <% stats_report_url = Application.get_env(:block_scout_web, :stats_report_url) %> <% {:ok, urls} = stats_report_url |> Jason.decode() -%{"overview" => overview_url, "addresses" => addresses_url, "cStables" => cstables_url, "transactions" => transactions_url, "reserve" => reserve_url, "epoch" => epoch_url} = urls +%{"overview" => overview_url, "addresses" => addresses_url, "cStables" => cstables_url, "transactions" => transactions_url, "epoch" => epoch_url} = urls %>