Add env variable to hide Add to MM button

pull/6843/head
Viktor Baranov 2 years ago
parent d3e07fdf64
commit 93c7479e57
  1. 1
      CHANGELOG.md
  2. 26
      apps/block_scout_web/lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex
  3. 2
      apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex
  4. 4
      apps/block_scout_web/priv/gettext/default.pot
  5. 4
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  6. 1
      config/runtime.exs

@ -5,6 +5,7 @@
### Features
- [#6838](https://github.com/blockscout/blockscout/pull/6838) - Disable dark mode env var
- [#6843](https://github.com/blockscout/blockscout/pull/6843) - Add env variable to hide Add to MM button
- [#6744](https://github.com/blockscout/blockscout/pull/6744) - API v2: smart contracts verification
- [#6763](https://github.com/blockscout/blockscout/pull/6763) - Permanent UI dark mode
- [#6721](https://github.com/blockscout/blockscout/pull/6721) - Implement fetching internal transactions from callTracer

@ -1,13 +1,13 @@
<input id="js-chain-id" class="d-none" value="<%= Application.get_env(:block_scout_web, :chain_id) %>" />
<input id="js-coin-name" class="d-none" value="<%= Explorer.coin_name() %>" />
<% sub_network = Keyword.get(Application.get_env(:block_scout_web, BlockScoutWeb.Chain), :subnetwork) %>
<input id="js-subnetwork" class="d-none" value="<%= sub_network %>" />
<input id="js-json-rpc" class="d-none" value="<%= Application.get_env(:block_scout_web, :json_rpc) %>" />
<li>
<a
class="footer-link js-btn-add-chain-to-mm btn-add-chain-to-mm in-footer"
style="cursor: pointer;"
>
<%= gettext("Add") <> " #{sub_network}" %>
</a>
</li>
<%= unless Application.get_env(:block_scout_web, :disable_add_to_mm_button) do %>
<input id="js-coin-name" class="d-none" value="<%= Explorer.coin_name() %>" />
<% sub_network = Keyword.get(Application.get_env(:block_scout_web, BlockScoutWeb.Chain), :subnetwork) %>
<input id="js-subnetwork" class="d-none" value="<%= sub_network %>" />
<li>
<a
class="footer-link js-btn-add-chain-to-mm btn-add-chain-to-mm in-footer"
style="cursor: pointer;"
>
<%= gettext("Add") <> " #{sub_network}" %>
</a>
</li>
<% end %>

@ -61,6 +61,8 @@
<div id="permanent-dark-mode" class="d-none" ><%= Application.get_env(:block_scout_web, :permanent_dark_mode_enabled) %></div>
<div id="permanent-light-mode" class="d-none" ><%= Application.get_env(:block_scout_web, :permanent_light_mode_enabled) %></div>
<div id="indexer-first-block" class="d-none" ><%= Application.get_env(:indexer, :first_block) %></div>
<input id="js-chain-id" class="d-none" value="<%= Application.get_env(:block_scout_web, :chain_id) %>" />
<input id="js-json-rpc" class="d-none" value="<%= Application.get_env(:block_scout_web, :json_rpc) %>" />
<!-- -->
<% show_maintenance_alert = Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:show_maintenance_alert] %>
<%= if show_maintenance_alert do %>

@ -81,7 +81,7 @@ msgstr ""
msgid ") may be added for each contract. Click the Add Library button to add an additional one."
msgstr ""
#: lib/block_scout_web/templates/layout/app.html.eex:81
#: lib/block_scout_web/templates/layout/app.html.eex:83
#, elixir-autogen, elixir-format
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr ""
@ -176,7 +176,7 @@ msgstr ""
#: lib/block_scout_web/templates/account/api_key/form.html.eex:7
#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8
#: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:11
#: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:10
#, elixir-autogen, elixir-format
msgid "Add"
msgstr ""

@ -81,7 +81,7 @@ msgstr ""
msgid ") may be added for each contract. Click the Add Library button to add an additional one."
msgstr ""
#: lib/block_scout_web/templates/layout/app.html.eex:81
#: lib/block_scout_web/templates/layout/app.html.eex:83
#, elixir-autogen, elixir-format
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr ""
@ -176,7 +176,7 @@ msgstr ""
#: lib/block_scout_web/templates/account/api_key/form.html.eex:7
#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8
#: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:11
#: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:10
#, elixir-autogen, elixir-format
msgid "Add"
msgstr ""

@ -100,6 +100,7 @@ config :block_scout_web,
new_tags: System.get_env("NEW_TAGS"),
chain_id: System.get_env("CHAIN_ID"),
json_rpc: System.get_env("JSON_RPC"),
disable_add_to_mm_button: System.get_env("DISABLE_ADD_TO_MM_BUTTON", "false") == "true",
verification_max_libraries: verification_max_libraries,
permanent_dark_mode_enabled: System.get_env("PERMANENT_DARK_MODE_ENABLED", "false") == "true",
permanent_light_mode_enabled: System.get_env("PERMANENT_LIGHT_MODE_ENABLED", "false") == "true"

Loading…
Cancel
Save