Skip to content

Commit

Permalink
EOL reserve stats on explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
shazarre committed Oct 18, 2023
1 parent 09a4951 commit e0018e3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 9 deletions.
4 changes: 4 additions & 0 deletions apps/block_scout_web/assets/css/components/_stats.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions apps/block_scout_web/assets/js/pages/stats.js
Original file line number Diff line number Diff line change
@@ -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')
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
%>

<nav class="menu-wrap" data-selector="stats-nabvar">
Expand All @@ -22,8 +22,13 @@
<%= gettext("Mento") %>
</a>
</li>
<li class="stats-link" data-tab-id="4">
<a href="<%= reserve_url %>" target="myiframe">
<li class="stats-link stats-link-no-selection tooltip-with-link-container">
<a href="#"
data-tab-id="4"
data-toggle="tooltip-with-link"
data-placement="bottom"
data-title="<%= gettext "Looking for Mento reserve stats? You can find them at " %><a target='_blank' href='https://reserve.mento.org/'><%= gettext "reserve.mento.org" %></a>."
>
<%= gettext("Mento Reserve") %>
</a>
</li>
Expand Down
16 changes: 13 additions & 3 deletions apps/block_scout_web/priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ msgstr ""
#: lib/block_scout_web/templates/block/overview.html.eex:120
#: lib/block_scout_web/templates/chain/show.html.eex:210
#: lib/block_scout_web/templates/layout/_topnav.html.eex:46
#: lib/block_scout_web/templates/stats/index.html.eex:32
#: lib/block_scout_web/templates/stats/index.html.eex:37
#: lib/block_scout_web/views/address_view.ex:433
#, elixir-autogen, elixir-format
msgid "Transactions"
Expand Down Expand Up @@ -3496,7 +3496,7 @@ msgstr ""
msgid "Epoch Blocks"
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:37
#: lib/block_scout_web/templates/stats/index.html.eex:42
#, elixir-autogen, elixir-format
msgid "Epoch Rewards"
msgstr ""
Expand Down Expand Up @@ -3579,7 +3579,7 @@ msgstr ""
msgid "Mento"
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:27
#: lib/block_scout_web/templates/stats/index.html.eex:32
#, elixir-autogen, elixir-format
msgid "Mento Reserve"
msgstr ""
Expand Down Expand Up @@ -3889,3 +3889,13 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "There are no unsigned blocks for this address."
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:30
#, elixir-autogen, elixir-format
msgid "Looking for Mento reserve stats? You can find them at "
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:30
#, elixir-autogen, elixir-format
msgid "reserve.mento.org"
msgstr ""
16 changes: 13 additions & 3 deletions apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ msgstr ""
#: lib/block_scout_web/templates/block/overview.html.eex:120
#: lib/block_scout_web/templates/chain/show.html.eex:210
#: lib/block_scout_web/templates/layout/_topnav.html.eex:46
#: lib/block_scout_web/templates/stats/index.html.eex:32
#: lib/block_scout_web/templates/stats/index.html.eex:37
#: lib/block_scout_web/views/address_view.ex:433
#, elixir-autogen, elixir-format
msgid "Transactions"
Expand Down Expand Up @@ -3496,7 +3496,7 @@ msgstr ""
msgid "Epoch Blocks"
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:37
#: lib/block_scout_web/templates/stats/index.html.eex:42
#, elixir-autogen, elixir-format
msgid "Epoch Rewards"
msgstr ""
Expand Down Expand Up @@ -3579,7 +3579,7 @@ msgstr ""
msgid "Mento"
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:27
#: lib/block_scout_web/templates/stats/index.html.eex:32
#, elixir-autogen, elixir-format
msgid "Mento Reserve"
msgstr ""
Expand Down Expand Up @@ -3889,3 +3889,13 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy
msgid "There are no unsigned blocks for this address."
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:30
#, elixir-autogen, elixir-format
msgid "Looking for Mento reserve stats? You can find them at "
msgstr ""

#: lib/block_scout_web/templates/stats/index.html.eex:30
#, elixir-autogen, elixir-format
msgid "reserve.mento.org"
msgstr ""

0 comments on commit e0018e3

Please sign in to comment.