From 04939730ceb84479c1bd51b473ea71396c77748d Mon Sep 17 00:00:00 2001 From: nikitosing Date: Thu, 16 Dec 2021 10:54:25 +0300 Subject: [PATCH] Add reusable channel-disconnected-msg template --- .../address_coin_balance/index.html.eex | 6 +- .../new.html.eex | 6 +- .../new.html.eex | 6 +- .../new.html.eex | 6 +- .../new.html.eex | 6 +- .../index.html.eex | 6 +- .../address_transaction/index.html.eex | 6 +- .../address_validation/index.html.eex | 6 +- .../templates/block/index.html.eex | 6 +- .../_channel_disconnected_message.html.eex | 5 + .../pending_transaction/index.html.eex | 6 +- .../templates/tokens/holder/index.html.eex | 6 +- .../templates/transaction/index.html.eex | 6 +- apps/block_scout_web/priv/gettext/default.pot | 190 +++++++++--------- .../priv/gettext/en/LC_MESSAGES/default.po | 190 +++++++++--------- 15 files changed, 207 insertions(+), 250 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/common_components/_channel_disconnected_message.html.eex diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex index 6f10f148d5..08e1b7389a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex @@ -9,11 +9,7 @@
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
-
-
- <%= gettext "Connection Lost, click to load newer blocks" %> -
-
+ <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost, click to load newer blocks") %>

<%= gettext "Balances" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex index 2350111e45..88a1296c58 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex @@ -1,9 +1,5 @@
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %>

<%= gettext "New Smart Contract Verification" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex index b713c7466f..5c616c58f3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex @@ -8,11 +8,7 @@ <% fetch_constructor_arguments_automatically = if metadata_for_verification, do: true, else: false %> <% display_constructor_arguments_text_area = if fetch_constructor_arguments_automatically, do: "none", else: "block" %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %>

<%= gettext "New Solidity Smart Contract Verification" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex index f0a248e21d..a75bfdfe7e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex @@ -1,9 +1,5 @@
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %>

<%= gettext "New Smart Contract Verification" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex index 03cd602cfc..fd5a919e8c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex @@ -3,11 +3,7 @@ <% compiler_version = if metadata_for_verification, do: metadata_for_verification.compiler_version, else: "latest" %> <% contract_source_code_value = if metadata_for_verification, do: metadata_for_verification.contract_source_code, else: "" %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %>

<%= gettext "New Vyper Smart Contract Verification" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index 07d8977a09..d89f3e34fb 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -12,11 +12,7 @@ <%= gettext "More internal transactions have come in" %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost, click to load newer internal transactions") %>

<%= gettext "Internal Transactions" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex index caabd504e1..0bc1b9bce4 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex @@ -8,11 +8,7 @@
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost, click to load newer transactions") %>

<%= gettext "Transactions" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex index a34c8b5eb3..143190b9b5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex @@ -7,11 +7,7 @@
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost, click to load newer validations") %>

<%=gettext("Blocks Validated")%>

<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "top", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex index ab5d55b951..dcee1441d5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex @@ -2,11 +2,7 @@ <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost, click to load newer blocks") %>

<%= gettext("%{block_type}s", block_type: @block_type) %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_channel_disconnected_message.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_channel_disconnected_message.html.eex new file mode 100644 index 0000000000..4dd8e27d51 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_channel_disconnected_message.html.eex @@ -0,0 +1,5 @@ +
+
+ <%= @text %> +
+
\ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex index 8a02a4e5e2..57a9545738 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex @@ -13,11 +13,7 @@ <%= gettext "More transactions have come in" %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost, click to load newer transactions") %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex index caec14a4f4..5d3a574be8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex @@ -12,11 +12,7 @@ <%= render OverviewView, "_tabs.html", assigns %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %>

<%= gettext "Token Holders" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex index 98925578e9..58779f6191 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex @@ -19,11 +19,7 @@ <%= gettext "More transactions have come in" %>
- + <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost, click to load newer transactions") %>