Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network switcher dropdown #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,39 @@
</div>
</li>
<% end %>
<li class="nav-item dropdown">
<a href="#" role="button" id="navbarAPIsDropdown" class="nav-link topnav-nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= if System.get_env("CHAIN_NETWORK") == "mainnet" do %>
<%= gettext("Cronos EVM Mainnet") %>
<% else %>
<%= gettext("Cronos EVM Testnet") %>
<% end %>
</a>
<div class="dropdown-menu" aria-labeledby="navbarTransactionsDropdown">
<h6 class="dropdown-header"><%= gettext("Mainnets")%></h6>
<%= link(
gettext("Cronos Cosmos Mainnet"),
class: "dropdown-item #{tab_status("graphiql", @conn.request_path)}",
to: System.get_env("COSMOS_EXPLORER_MAINNET_URL") || ""
) %>
<%= link(
gettext("Cronos EVM Mainnet"),
class: "dropdown-item #{tab_status("api-docs", @conn.request_path)}",
to: System.get_env("EVM_EXPLORER_MAINNET_URL") || ""
) %>
<h6 class="dropdown-header"><%= gettext("Testnets")%></h6>
<%= link(
gettext("Cronos Cosmos Testnet"),
class: "dropdown-item #{tab_status("graphiql", @conn.request_path)}",
to: System.get_env("COSMOS_EXPLORER_TESTNET_URL") || ""
) %>
<%= link(
gettext("Cronos EVM Testnet"),
class: "dropdown-item #{tab_status("api-docs", @conn.request_path)}",
to: System.get_env("EVM_EXPLORER_TESTNET_URL") || ""
) %>
</div>
</li>
<%= if apps_menu == true || staking_enabled_in_menu do %>
<li class="nav-item dropdown">
<a href="#" role="button" id="navbarAppsDropdown" class="nav-link topnav-nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand Down
38 changes: 35 additions & 3 deletions apps/block_scout_web/priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ msgid "Approximate Current Annual Percentage Yield. If you see N/A, please wait
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:150
#: lib/block_scout_web/templates/layout/_topnav.html.eex:183
msgid "Apps"
msgstr ""

Expand Down Expand Up @@ -1783,7 +1783,7 @@ msgid "Staker's Address"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:152
#: lib/block_scout_web/templates/layout/_topnav.html.eex:185
msgid "Stakes"
msgstr ""

Expand All @@ -1795,7 +1795,7 @@ msgid "Stakes Ratio"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:158
#: lib/block_scout_web/templates/layout/_topnav.html.eex:191
msgid "Staking"
msgstr ""

Expand Down Expand Up @@ -2985,3 +2985,35 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:41
msgid "CRO Price"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:154
msgid "Cronos Cosmos Mainnet"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:165
msgid "Cronos Cosmos Testnet"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:146
#: lib/block_scout_web/templates/layout/_topnav.html.eex:159
msgid "Cronos EVM Mainnet"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:148
#: lib/block_scout_web/templates/layout/_topnav.html.eex:170
msgid "Cronos EVM Testnet"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:152
msgid "Mainnets"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:163
msgid "Testnets"
msgstr ""
38 changes: 35 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 @@ -226,7 +226,7 @@ msgid "Approximate Current Annual Percentage Yield. If you see N/A, please wait
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:150
#: lib/block_scout_web/templates/layout/_topnav.html.eex:183
msgid "Apps"
msgstr ""

Expand Down Expand Up @@ -1783,7 +1783,7 @@ msgid "Staker's Address"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:152
#: lib/block_scout_web/templates/layout/_topnav.html.eex:185
msgid "Stakes"
msgstr ""

Expand All @@ -1795,7 +1795,7 @@ msgid "Stakes Ratio"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:158
#: lib/block_scout_web/templates/layout/_topnav.html.eex:191
msgid "Staking"
msgstr ""

Expand Down Expand Up @@ -2985,3 +2985,35 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:41
msgid "CRO Price"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:154
msgid "Cronos Cosmos Mainnet"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:165
msgid "Cronos Cosmos Testnet"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:146
#: lib/block_scout_web/templates/layout/_topnav.html.eex:159
msgid "Cronos EVM Mainnet"
msgstr ""

#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:148
#: lib/block_scout_web/templates/layout/_topnav.html.eex:170
msgid "Cronos EVM Testnet"
msgstr ""

#, elixir-format, fuzzy
#: lib/block_scout_web/templates/layout/_topnav.html.eex:152
msgid "Mainnets"
msgstr ""

#, elixir-format, fuzzy
#: lib/block_scout_web/templates/layout/_topnav.html.eex:163
msgid "Testnets"
msgstr ""