|
|
|
@ -8,79 +8,83 @@ |
|
|
|
|
</button> |
|
|
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent"> |
|
|
|
|
<ul class="navbar-nav"> |
|
|
|
|
<li class="nav-item dropdown"> |
|
|
|
|
<a class="nav-link topnav-nav-link dropdown-toggle" href="#" id="navbarBlocksDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_block_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("Blocks") %> |
|
|
|
|
</a> |
|
|
|
|
<div class="dropdown-menu" aria-labelledby="navbarBlocksDropdown"> |
|
|
|
|
<%= link to: block_path(@conn, :index), class: "dropdown-item #{tab_status("blocks", @conn.request_path)}" do %> |
|
|
|
|
<%= if Application.get_env(:block_scout_web, BlockScoutWeb.WebRouter)[:enabled] do %> |
|
|
|
|
<li class="nav-item dropdown"> |
|
|
|
|
<a class="nav-link topnav-nav-link dropdown-toggle" href="#" id="navbarBlocksDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_block_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("Blocks") %> |
|
|
|
|
</a> |
|
|
|
|
<div class="dropdown-menu" aria-labelledby="navbarBlocksDropdown"> |
|
|
|
|
<%= link to: block_path(@conn, :index), class: "dropdown-item #{tab_status("blocks", @conn.request_path)}" do %> |
|
|
|
|
<%= gettext("Blocks") %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= link to: uncle_path(@conn, :uncle), class: "dropdown-item #{tab_status("uncles", @conn.request_path)}" do %> |
|
|
|
|
<%= gettext("Uncles") %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= link to: reorg_path(@conn, :reorg), class: "dropdown-item #{tab_status("reorgs", @conn.request_path)}" do %> |
|
|
|
|
<%= gettext("Forked Blocks (Reorgs)") %> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
<li class="nav-item dropdown"> |
|
|
|
|
<a href="#" role="button" id="navbarTransactionsDropdown" class="nav-link topnav-nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_transaction_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("Transactions") %> |
|
|
|
|
</a> |
|
|
|
|
<div class="dropdown-menu" aria-labeledby="navbarTransactionsDropdown"> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("Validated"), |
|
|
|
|
class: "dropdown-item #{tab_status("txs", @conn.request_path)}", |
|
|
|
|
to: transaction_path(@conn, :index) |
|
|
|
|
) %> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("Pending"), |
|
|
|
|
class: "dropdown-item #{tab_status("pending_transactions", @conn.request_path)}", |
|
|
|
|
"data-test": "pending_transactions_link", |
|
|
|
|
to: pending_transaction_path(@conn, :index) |
|
|
|
|
) %> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
<li class="nav-item"> |
|
|
|
|
<%= link to: address_path(@conn, :index), class: "nav-link topnav-nav-link #{tab_status("accounts", @conn.request_path)}" do %> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_accounts_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("Accounts") %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= link to: uncle_path(@conn, :uncle), class: "dropdown-item #{tab_status("uncles", @conn.request_path)}" do %> |
|
|
|
|
<%= gettext("Uncles") %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= link to: reorg_path(@conn, :reorg), class: "dropdown-item #{tab_status("reorgs", @conn.request_path)}" do %> |
|
|
|
|
<%= gettext("Forked Blocks (Reorgs)") %> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
<li class="nav-item dropdown"> |
|
|
|
|
<a href="#" role="button" id="navbarTransactionsDropdown" class="nav-link topnav-nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_transaction_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("Transactions") %> |
|
|
|
|
</a> |
|
|
|
|
<div class="dropdown-menu" aria-labeledby="navbarTransactionsDropdown"> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("Validated"), |
|
|
|
|
class: "dropdown-item #{tab_status("txs", @conn.request_path)}", |
|
|
|
|
to: transaction_path(@conn, :index) |
|
|
|
|
) %> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("Pending"), |
|
|
|
|
class: "dropdown-item #{tab_status("pending_transactions", @conn.request_path)}", |
|
|
|
|
"data-test": "pending_transactions_link", |
|
|
|
|
to: pending_transaction_path(@conn, :index) |
|
|
|
|
) %> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
<li class="nav-item"> |
|
|
|
|
<%= link to: address_path(@conn, :index), class: "nav-link topnav-nav-link #{tab_status("accounts", @conn.request_path)}" do %> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_accounts_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("Accounts") %> |
|
|
|
|
<% end %> |
|
|
|
|
</li> |
|
|
|
|
<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"> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_api_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("APIs") %> |
|
|
|
|
</a> |
|
|
|
|
<div class="dropdown-menu" aria-labeledby="navbarTransactionsDropdown"> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("GraphQL"), |
|
|
|
|
class: "dropdown-item #{tab_status("graphiql", @conn.request_path)}", |
|
|
|
|
to: "/graphiql" |
|
|
|
|
) %> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("RPC"), |
|
|
|
|
class: "dropdown-item #{tab_status("api_docs", @conn.request_path)}", |
|
|
|
|
to: api_docs_path(@conn, :index) |
|
|
|
|
) %> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("Eth RPC"), |
|
|
|
|
class: "dropdown-item #{tab_status("api_docs", @conn.request_path)}", |
|
|
|
|
to: api_docs_path(@conn, :eth_rpc) |
|
|
|
|
) %> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</li> |
|
|
|
|
<% end %> |
|
|
|
|
<%= if Application.get_env(:block_scout_web, BlockScoutWeb.ApiRouter)[:enabled] do %> |
|
|
|
|
<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"> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_api_icon.html" %> |
|
|
|
|
</span> |
|
|
|
|
<%= gettext("APIs") %> |
|
|
|
|
</a> |
|
|
|
|
<div class="dropdown-menu" aria-labeledby="navbarTransactionsDropdown"> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("GraphQL"), |
|
|
|
|
class: "dropdown-item #{tab_status("graphiql", @conn.request_path)}", |
|
|
|
|
to: "/graphiql" |
|
|
|
|
) %> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("RPC"), |
|
|
|
|
class: "dropdown-item #{tab_status("api_docs", @conn.request_path)}", |
|
|
|
|
to: api_docs_path(@conn, :index) |
|
|
|
|
) %> |
|
|
|
|
<%= link( |
|
|
|
|
gettext("Eth RPC"), |
|
|
|
|
class: "dropdown-item #{tab_status("api_docs", @conn.request_path)}", |
|
|
|
|
to: api_docs_path(@conn, :eth_rpc) |
|
|
|
|
) %> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
<% end %> |
|
|
|
|
<li class="nav-item dropdown nav-item-networks"> |
|
|
|
|
<a class="nav-link topnav-nav-link dropdown-toggle active-icon js-show-network-selector <%= if dropdown_nets() == [], do: "disabled" %>" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
|
<span class="nav-link-icon"> |
|
|
|
@ -91,34 +95,36 @@ |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<!-- Search navbar --> |
|
|
|
|
<div class="search-form d-lg-flex d-inline-block"> |
|
|
|
|
<%= form_for @conn, chain_path(@conn, :search), [class: "form-inline my-2 my-lg-0", method: :get, enforce_utf8: false], fn f -> %> |
|
|
|
|
<div class="input-group" title='<%= gettext("Search by address, token symbol name, transaction hash, or block number") %>'> |
|
|
|
|
<%= awesomplete(f, :q, |
|
|
|
|
[ |
|
|
|
|
class: "form-control me auto", |
|
|
|
|
placeholder: gettext("Search by address, token symbol name, transaction hash, or block number"), |
|
|
|
|
"aria-describedby": "search-icon", |
|
|
|
|
"aria-label": gettext("Search"), |
|
|
|
|
"data-test": "search_input" |
|
|
|
|
], |
|
|
|
|
[ url: "#{chain_path(@conn, :token_autocomplete)}?q=", |
|
|
|
|
limit: 0, |
|
|
|
|
minChars: 2, |
|
|
|
|
value: "contract_address_hash", |
|
|
|
|
label: "contract_address_hash", |
|
|
|
|
descrSearch: true, |
|
|
|
|
descr: "symbol" |
|
|
|
|
]) %> |
|
|
|
|
<div class="input-group-append"> |
|
|
|
|
<button class="input-group-text" id="search-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_search_icon.html" %> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<button class="btn btn-outline-success my-2 my-sm-0 sr-only hidden" type="submit"><%= gettext "Search" %></button> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
<%= if Application.get_env(:block_scout_web, BlockScoutWeb.WebRouter)[:enabled] do %> |
|
|
|
|
<div class="search-form d-lg-flex d-inline-block"> |
|
|
|
|
<%= form_for @conn, chain_path(@conn, :search), [class: "form-inline my-2 my-lg-0", method: :get, enforce_utf8: false], fn f -> %> |
|
|
|
|
<div class="input-group" title='<%= gettext("Search by address, token symbol name, transaction hash, or block number") %>'> |
|
|
|
|
<%= awesomplete(f, :q, |
|
|
|
|
[ |
|
|
|
|
class: "form-control me auto", |
|
|
|
|
placeholder: gettext("Search by address, token symbol name, transaction hash, or block number"), |
|
|
|
|
"aria-describedby": "search-icon", |
|
|
|
|
"aria-label": gettext("Search"), |
|
|
|
|
"data-test": "search_input" |
|
|
|
|
], |
|
|
|
|
[ url: "#{chain_path(@conn, :token_autocomplete)}?q=", |
|
|
|
|
limit: 0, |
|
|
|
|
minChars: 2, |
|
|
|
|
value: "contract_address_hash", |
|
|
|
|
label: "contract_address_hash", |
|
|
|
|
descrSearch: true, |
|
|
|
|
descr: "symbol" |
|
|
|
|
]) %> |
|
|
|
|
<div class="input-group-append"> |
|
|
|
|
<button class="input-group-text" id="search-icon"> |
|
|
|
|
<%= render BlockScoutWeb.IconsView, "_search_icon.html" %> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<button class="btn btn-outline-success my-2 my-sm-0 sr-only hidden" type="submit"><%= gettext "Search" %></button> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</nav> |
|
|
|
|