Merge pull request #3193 from poanetwork/vb-raw-trace-copy-button

Raw trace copy button
pull/3194/head
Victor Baranov 4 years ago committed by GitHub
commit e53d7ef777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 17
      apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex
  3. 5
      apps/block_scout_web/priv/gettext/default.pot
  4. 5
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -1,6 +1,7 @@
## Current
### Features
- [#3193](https://github.com/poanetwork/blockscout/pull/3193) - Raw trace copy button
- [#3184](https://github.com/poanetwork/blockscout/pull/3184) - Apps navbar menu item
- [#3145](https://github.com/poanetwork/blockscout/pull/3145) - Pending txs per address API endpoint

@ -4,7 +4,22 @@
<div class="card">
<%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %>
<div class="card-body">
<h2 class="card-title"><%= gettext "Raw Trace" %></h2>
<h2 class="card-title"><%= gettext "Raw Trace" %>
<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>
</h2>
<%= if Enum.count(@internal_transactions) > 0 do %>
<pre class="pre-scrollable line-numbers" data-activate-highlight><code class="json "><%= for {line, number} <- raw_traces_with_lines(@internal_transactions) do %><div data-line-number="<%= number %>"><%= line %></div><% end %></code></pre>
<% else %>

@ -1933,3 +1933,8 @@ msgstr ""
#: lib/block_scout_web/templates/layout/_topnav.html.eex:112
msgid "Apps"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15
msgid "Copy Raw Trace"
msgstr ""

@ -1933,3 +1933,8 @@ msgstr ""
#: lib/block_scout_web/templates/layout/_topnav.html.eex:112
msgid "Apps"
msgstr ""
#, elixir-format, fuzzy
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15
msgid "Copy Raw Trace"
msgstr ""

Loading…
Cancel
Save