Skip to content

Commit

Permalink
Re-use _btn_copy.html for raw trace page
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaranov committed Sep 2, 2022
1 parent c8b074f commit 7073696
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

### Chore

- [#6045](https://github.com/blockscout/blockscout/pull/6045) - Re-use _btn_copy.html for raw trace page
- [#6035](https://github.com/blockscout/blockscout/pull/6035) - Hide copy btn if no raw trace
- [#6034](https://github.com/blockscout/blockscout/pull/6034) - Suppress empty sections in supported chain dropdown
- [#5939](https://github.com/blockscout/blockscout/pull/5939) - Bump sweetalert2 from 11.4.26 to 11.4.27 in /apps/block_scout_web/assets
Expand Down
1 change: 1 addition & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Node JS version (`node -v`):
* Operating System:
* Blockscout Version/branch/commit:
* Archive node type && version (Erigon/Geth/Nethermind/Ganache/?):

### Steps to reproduce

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@
<div class="card-body">
<h2 class="card-title"><%= gettext "Raw Trace" %>
<%= if Enum.count(@internal_transactions) > 0 do %>
<span
aria-label="Copy Value"
class="btn-copy-icon tx-raw-input transaction-input"
id="tx-raw-input"
data-clipboard-text="<%= for {line, _} <- raw_traces_with_lines(@internal_transactions), do: line %>"
data-placement="top"
data-toggle="tooltip"
title='<%= gettext("Copy Raw Trace") %>'
style="float: right;"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 32.5" width="32" height="32">
<path fill-rule="evenodd" d="M23.5 20.5a1 1 0 0 1-1-1v-9h-9a1 1 0 0 1 0-2h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zm-3-7v10a1 1 0 0 1-1 1h-10a1 1 0 0 1-1-1v-10a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1zm-2 1h-8v8h8v-8z"/>
</svg>
</span>
<% raw_trace_text = for {line, _} <- raw_traces_with_lines(@internal_transactions), do: line %>
<%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html",
id: "tx-raw-trace-input",
additional_classes: ["tx-raw-input", "transaction-input"],
clipboard_text: raw_trace_text,
aria_label: gettext("Copy Value"),
title: gettext("Copy Raw Trace"),
style: "float: right;" %>
<% end %>
</h2>
<%= if Enum.count(@internal_transactions) > 0 do %>
Expand Down
5 changes: 3 additions & 2 deletions apps/block_scout_web/priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ msgstr ""
msgid "Copy Parent Hash"
msgstr ""

#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15
#, elixir-autogen, elixir-format
msgid "Copy Raw Trace"
msgstr ""
Expand Down Expand Up @@ -686,6 +686,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41
#: lib/block_scout_web/templates/transaction/overview.html.eex:463
#: lib/block_scout_web/templates/transaction/overview.html.eex:469
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14
#, elixir-autogen, elixir-format
msgid "Copy Value"
msgstr ""
Expand Down Expand Up @@ -2861,7 +2862,7 @@ msgstr ""
msgid "truffle flattener"
msgstr ""

#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23
#, elixir-autogen, elixir-format
msgid "No trace entries found."
msgstr ""
Expand Down
5 changes: 3 additions & 2 deletions apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ msgstr ""
msgid "Copy Parent Hash"
msgstr ""

#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15
#, elixir-autogen, elixir-format
msgid "Copy Raw Trace"
msgstr ""
Expand Down Expand Up @@ -686,6 +686,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41
#: lib/block_scout_web/templates/transaction/overview.html.eex:463
#: lib/block_scout_web/templates/transaction/overview.html.eex:469
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14
#, elixir-autogen, elixir-format
msgid "Copy Value"
msgstr ""
Expand Down Expand Up @@ -2861,7 +2862,7 @@ msgstr ""
msgid "truffle flattener"
msgstr ""

#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23
#, elixir-autogen, elixir-format
msgid "No trace entries found."
msgstr ""
Expand Down

0 comments on commit 7073696

Please sign in to comment.