Skip to content

Commit 7073696

Browse files
committed
Re-use _btn_copy.html for raw trace page
1 parent c8b074f commit 7073696

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
### Chore
3535

36+
- [#6045](https://github.com/blockscout/blockscout/pull/6045) - Re-use _btn_copy.html for raw trace page
3637
- [#6035](https://github.com/blockscout/blockscout/pull/6035) - Hide copy btn if no raw trace
3738
- [#6034](https://github.com/blockscout/blockscout/pull/6034) - Suppress empty sections in supported chain dropdown
3839
- [#5939](https://github.com/blockscout/blockscout/pull/5939) - Bump sweetalert2 from 11.4.26 to 11.4.27 in /apps/block_scout_web/assets

ISSUE_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Node JS version (`node -v`):
88
* Operating System:
99
* Blockscout Version/branch/commit:
10+
* Archive node type && version (Erigon/Geth/Nethermind/Ganache/?):
1011

1112
### Steps to reproduce
1213

apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex

+8-14
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,14 @@
66
<div class="card-body">
77
<h2 class="card-title"><%= gettext "Raw Trace" %>
88
<%= if Enum.count(@internal_transactions) > 0 do %>
9-
<span
10-
aria-label="Copy Value"
11-
class="btn-copy-icon tx-raw-input transaction-input"
12-
id="tx-raw-input"
13-
data-clipboard-text="<%= for {line, _} <- raw_traces_with_lines(@internal_transactions), do: line %>"
14-
data-placement="top"
15-
data-toggle="tooltip"
16-
title='<%= gettext("Copy Raw Trace") %>'
17-
style="float: right;"
18-
>
19-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 32.5" width="32" height="32">
20-
<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"/>
21-
</svg>
22-
</span>
9+
<% raw_trace_text = for {line, _} <- raw_traces_with_lines(@internal_transactions), do: line %>
10+
<%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html",
11+
id: "tx-raw-trace-input",
12+
additional_classes: ["tx-raw-input", "transaction-input"],
13+
clipboard_text: raw_trace_text,
14+
aria_label: gettext("Copy Value"),
15+
title: gettext("Copy Raw Trace"),
16+
style: "float: right;" %>
2317
<% end %>
2418
</h2>
2519
<%= if Enum.count(@internal_transactions) > 0 do %>

apps/block_scout_web/priv/gettext/default.pot

+3-2
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ msgstr ""
635635
msgid "Copy Parent Hash"
636636
msgstr ""
637637

638-
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16
638+
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15
639639
#, elixir-autogen, elixir-format
640640
msgid "Copy Raw Trace"
641641
msgstr ""
@@ -686,6 +686,7 @@ msgstr ""
686686
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41
687687
#: lib/block_scout_web/templates/transaction/overview.html.eex:463
688688
#: lib/block_scout_web/templates/transaction/overview.html.eex:469
689+
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14
689690
#, elixir-autogen, elixir-format
690691
msgid "Copy Value"
691692
msgstr ""
@@ -2861,7 +2862,7 @@ msgstr ""
28612862
msgid "truffle flattener"
28622863
msgstr ""
28632864

2864-
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29
2865+
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23
28652866
#, elixir-autogen, elixir-format
28662867
msgid "No trace entries found."
28672868
msgstr ""

apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

+3-2
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ msgstr ""
635635
msgid "Copy Parent Hash"
636636
msgstr ""
637637

638-
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16
638+
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15
639639
#, elixir-autogen, elixir-format
640640
msgid "Copy Raw Trace"
641641
msgstr ""
@@ -686,6 +686,7 @@ msgstr ""
686686
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41
687687
#: lib/block_scout_web/templates/transaction/overview.html.eex:463
688688
#: lib/block_scout_web/templates/transaction/overview.html.eex:469
689+
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14
689690
#, elixir-autogen, elixir-format
690691
msgid "Copy Value"
691692
msgstr ""
@@ -2861,7 +2862,7 @@ msgstr ""
28612862
msgid "truffle flattener"
28622863
msgstr ""
28632864

2864-
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29
2865+
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23
28652866
#, elixir-autogen, elixir-format
28662867
msgid "No trace entries found."
28672868
msgstr ""

0 commit comments

Comments
 (0)