From 4cb49e086a7c1015345f1df95583854a443b2f02 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Wed, 27 Mar 2019 11:21:03 +0300 Subject: [PATCH] fix mobile dropdown menu --- .../templates/address/_tabs.html.eex | 20 ++++---- apps/block_scout_web/priv/gettext/default.pot | 44 ++++++++++++------ .../priv/gettext/en/LC_MESSAGES/default.po | 46 +++++++++++++------ 3 files changed, 71 insertions(+), 39 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex index 6f904e34e4..b4366ae1aa 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex @@ -57,16 +57,16 @@ <% end %> <% end %> + <% end %> - <%= if has_decompiled_code?(@address) do %> - - <% end %> + <%= if has_decompiled_code?(@address) do %> + <% end %> <%= if smart_contract_with_read_only_functions?(@address) do %> @@ -129,7 +129,7 @@ <%= if has_decompiled_code?(@address) do %> <%= link( to: address_decompiled_contract_path(@conn, :index, @address.hash), - class: "nav-link #{tab_status("contracts", @conn.request_path)}") do %> + class: "dropdown-item #{tab_status("contracts", @conn.request_path)}") do %> <%= gettext("Decompiled code") %> <% end %> <% end %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index adf3a003fc..9f2f47b254 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -99,7 +99,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15 -#: lib/block_scout_web/views/address_view.ex:100 +#: lib/block_scout_web/views/address_view.ex:101 msgid "Address" msgstr "" @@ -192,7 +192,7 @@ msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:59 #: lib/block_scout_web/templates/address_validation/index.html.eex:30 #: lib/block_scout_web/templates/address_validation/index.html.eex:57 -#: lib/block_scout_web/views/address_view.ex:293 +#: lib/block_scout_web/views/address_view.ex:300 msgid "Blocks Validated" msgstr "" @@ -222,7 +222,7 @@ msgstr "" #: lib/block_scout_web/templates/address_validation/index.html.eex:39 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:119 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141 -#: lib/block_scout_web/views/address_view.ex:290 +#: lib/block_scout_web/views/address_view.ex:296 msgid "Code" msgstr "" @@ -266,14 +266,14 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:13 -#: lib/block_scout_web/views/address_view.ex:98 +#: lib/block_scout_web/views/address_view.ex:99 msgid "Contract Address" msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:16 -#: lib/block_scout_web/views/address_view.ex:38 -#: lib/block_scout_web/views/address_view.ex:72 +#: lib/block_scout_web/views/address_view.ex:39 +#: lib/block_scout_web/views/address_view.ex:73 msgid "Contract Address Pending" msgstr "" @@ -494,7 +494,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_tabs.html.eex:14 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:43 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10 -#: lib/block_scout_web/views/address_view.ex:289 +#: lib/block_scout_web/views/address_view.ex:295 #: lib/block_scout_web/views/transaction_view.ex:258 msgid "Internal Transactions" msgstr "" @@ -528,7 +528,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:28 #: lib/block_scout_web/templates/layout/app.html.eex:49 -#: lib/block_scout_web/views/address_view.ex:120 +#: lib/block_scout_web/views/address_view.ex:121 msgid "Market Cap" msgstr "" @@ -699,10 +699,10 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:75 -#: lib/block_scout_web/templates/address/_tabs.html.eex:132 +#: lib/block_scout_web/templates/address/_tabs.html.eex:140 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:33 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:75 -#: lib/block_scout_web/views/address_view.ex:291 +#: lib/block_scout_web/views/address_view.ex:298 #: lib/block_scout_web/views/tokens/overview_view.ex:37 msgid "Read Contract" msgstr "" @@ -896,7 +896,7 @@ msgstr "" #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:12 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/templates/address_validation/index.html.eex:19 -#: lib/block_scout_web/views/address_view.ex:287 +#: lib/block_scout_web/views/address_view.ex:293 msgid "Tokens" msgstr "" @@ -957,7 +957,7 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:35 #: lib/block_scout_web/templates/chain/show.html.eex:93 #: lib/block_scout_web/templates/layout/_topnav.html.eex:35 -#: lib/block_scout_web/views/address_view.ex:288 +#: lib/block_scout_web/views/address_view.ex:294 msgid "Transactions" msgstr "" @@ -1400,7 +1400,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:30 #: lib/block_scout_web/templates/address/_tabs.html.eex:106 -#: lib/block_scout_web/views/address_view.ex:292 +#: lib/block_scout_web/views/address_view.ex:299 msgid "Coin Balance History" msgstr "" @@ -1703,6 +1703,22 @@ msgid "Enter constructor arguments if the contract had any" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address/_tabs.html.eex:66 +#: lib/block_scout_web/templates/address/_tabs.html.eex:67 +#: lib/block_scout_web/templates/address/_tabs.html.eex:133 msgid "Decompiled code" msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:14 +msgid "Copy Decompiled Contract Code" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/views/address_view.ex:297 +msgid "Decompiled Code" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:12 +msgid "Decompiled contract code" +msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 8d59503719..55700c182a 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -99,7 +99,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15 -#: lib/block_scout_web/views/address_view.ex:100 +#: lib/block_scout_web/views/address_view.ex:101 msgid "Address" msgstr "" @@ -192,7 +192,7 @@ msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:59 #: lib/block_scout_web/templates/address_validation/index.html.eex:30 #: lib/block_scout_web/templates/address_validation/index.html.eex:57 -#: lib/block_scout_web/views/address_view.ex:293 +#: lib/block_scout_web/views/address_view.ex:300 msgid "Blocks Validated" msgstr "" @@ -222,7 +222,7 @@ msgstr "" #: lib/block_scout_web/templates/address_validation/index.html.eex:39 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:119 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141 -#: lib/block_scout_web/views/address_view.ex:290 +#: lib/block_scout_web/views/address_view.ex:296 msgid "Code" msgstr "" @@ -266,14 +266,14 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:13 -#: lib/block_scout_web/views/address_view.ex:98 +#: lib/block_scout_web/views/address_view.ex:99 msgid "Contract Address" msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:16 -#: lib/block_scout_web/views/address_view.ex:38 -#: lib/block_scout_web/views/address_view.ex:72 +#: lib/block_scout_web/views/address_view.ex:39 +#: lib/block_scout_web/views/address_view.ex:73 msgid "Contract Address Pending" msgstr "" @@ -494,7 +494,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_tabs.html.eex:14 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:43 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10 -#: lib/block_scout_web/views/address_view.ex:289 +#: lib/block_scout_web/views/address_view.ex:295 #: lib/block_scout_web/views/transaction_view.ex:258 msgid "Internal Transactions" msgstr "" @@ -528,7 +528,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:28 #: lib/block_scout_web/templates/layout/app.html.eex:49 -#: lib/block_scout_web/views/address_view.ex:120 +#: lib/block_scout_web/views/address_view.ex:121 msgid "Market Cap" msgstr "" @@ -699,10 +699,10 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:75 -#: lib/block_scout_web/templates/address/_tabs.html.eex:132 +#: lib/block_scout_web/templates/address/_tabs.html.eex:140 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:33 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:75 -#: lib/block_scout_web/views/address_view.ex:291 +#: lib/block_scout_web/views/address_view.ex:298 #: lib/block_scout_web/views/tokens/overview_view.ex:37 msgid "Read Contract" msgstr "" @@ -896,7 +896,7 @@ msgstr "" #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:12 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/templates/address_validation/index.html.eex:19 -#: lib/block_scout_web/views/address_view.ex:287 +#: lib/block_scout_web/views/address_view.ex:293 msgid "Tokens" msgstr "" @@ -957,7 +957,7 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:35 #: lib/block_scout_web/templates/chain/show.html.eex:93 #: lib/block_scout_web/templates/layout/_topnav.html.eex:35 -#: lib/block_scout_web/views/address_view.ex:288 +#: lib/block_scout_web/views/address_view.ex:294 msgid "Transactions" msgstr "" @@ -1400,7 +1400,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:30 #: lib/block_scout_web/templates/address/_tabs.html.eex:106 -#: lib/block_scout_web/views/address_view.ex:292 +#: lib/block_scout_web/views/address_view.ex:299 msgid "Coin Balance History" msgstr "" @@ -1697,12 +1697,28 @@ msgstr "" msgid "EVM Version" msgstr "" -#, elixir-format, fuzzy +#, elixir-format #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:58 msgid "Enter constructor arguments if the contract had any" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address/_tabs.html.eex:66 +#: lib/block_scout_web/templates/address/_tabs.html.eex:67 +#: lib/block_scout_web/templates/address/_tabs.html.eex:133 msgid "Decompiled code" msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:14 +msgid "Copy Decompiled Contract Code" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/views/address_view.ex:297 +msgid "Decompiled Code" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:12 +msgid "Decompiled contract code" +msgstr ""