Separate address from transaction distinctions in css and setup typography class for account vs contract

pull/395/head
Stamates 6 years ago
parent 0c5968a4ca
commit 4c91438871
  1. 7
      apps/explorer_web/assets/css/_typography.scss
  2. 7
      apps/explorer_web/assets/css/components/_tile.scss
  3. 2
      apps/explorer_web/lib/explorer_web/templates/address/_responsive_hash.html.eex
  4. 2
      apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex
  5. 2
      apps/explorer_web/lib/explorer_web/views/transaction_view.ex

@ -50,3 +50,10 @@ a {
.monospace {
font-family: $font-family-monospace;
}
.contract-address {
text-decoration: underline;
text-decoration-style: dashed;
}
.account-address {}

@ -27,17 +27,12 @@
}
}
&-contract {
&-contract-call {
border-left: 4px solid $green;
.tile-label {
color: $green;
}
.tile-text-highlight {
text-decoration: underline;
text-decoration-style: dashed;
}
}
&-contract-creation {

@ -1,4 +1,4 @@
<span class="<%= if @contract do %>contract<% else %>account<% end %>">
<span class="<%= if @contract do %>contract-address<% else %>account-address<% end %>">
<span class="d-none d-md-none d-lg-inline"><%= @address_hash %></span>
<span class="d-md-block d-lg-none "><%= @address_hash |> to_string() |> String.slice(0..5) %>&ndash;<%= @address_hash |> to_string() |> String.slice(-6..-1) %></span>
</span>

@ -16,7 +16,7 @@
</span>
</div>
<h1 class="card-title"><%= address_title(@address) %> Details </h1>
<h3 class="<%= if ExplorerWeb.AddressView.contract?(@address) do %>contract<% else %>account<% end %>" data-test="address_detail_hash"><%= @address %></h3>
<h3 class="<%= if ExplorerWeb.AddressView.contract?(@address) do %>contract-address<% else %>account-address<% end %>" data-test="address_detail_hash"><%= @address %></h3>
<div class="d-flex flex-row justify-content-start text-muted">
<span class="mr-4" data-test="transaction_count"><%= Cldr.Number.to_string!(@transaction_count) %> <%= gettext "Transactions" %></span>
</div>

@ -101,7 +101,7 @@ defmodule ExplorerWeb.TransactionView do
def type_suffix(%Transaction{} = transaction) do
cond do
contract_creation?(transaction) -> "contract-creation"
involves_contract?(transaction) -> "contract"
involves_contract?(transaction) -> "contract-call"
true -> "transaction"
end
end

Loading…
Cancel
Save