From 8c0c4fdd888206f00b5a6b790f8451c49509e3a0 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 3 Jun 2019 11:00:34 +0300 Subject: [PATCH 01/30] allow totaldifficuly to be nil --- .../lib/ethereum_jsonrpc/block.ex | 2 +- .../test/ethereum_jsonrpc/block_test.exs | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex index 116232f999..4ac9b327a0 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex @@ -440,7 +440,7 @@ defmodule EthereumJSONRPC.Block do end # Size may be `nil` for uncle blocks - defp entry_to_elixir({key, nil}) when key in ~w(size) do + defp entry_to_elixir({key, nil}) when key in ~w(size totalDifficulty) do {key, nil} end diff --git a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/block_test.exs b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/block_test.exs index 3075dd4b74..1cf16c6f47 100644 --- a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/block_test.exs +++ b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/block_test.exs @@ -2,4 +2,58 @@ defmodule EthereumJSONRPC.BlockTest do use ExUnit.Case, async: true doctest EthereumJSONRPC.Block + + alias EthereumJSONRPC.Block + + describe "elixir_to_params/1" do + test "sets totalDifficuly to nil if it's empty" do + result = + Block.elixir_to_params(%{ + "difficulty" => 17_561_410_778, + "extraData" => "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32", + "gasLimit" => 5000, + "gasUsed" => 0, + "hash" => "0x4d9423080290a650eaf6db19c87c76dff83d1b4ab64aefe6e5c5aa2d1f4b6623", + "logsBloom" => + "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner" => "0xbb7b8287f3f0a933474a79eae42cbca977791171", + "mixHash" => "0xbbb93d610b2b0296a59f18474ac3d6086a9902aa7ca4b9a306692f7c3d496fdf", + "nonce" => 5_539_500_215_739_777_653, + "number" => 59, + "parentHash" => "0xcd5b5c4cecd7f18a13fe974255badffd58e737dc67596d56bc01f063dd282e9e", + "receiptsRoot" => "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "sha3Uncles" => "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size" => 542, + "stateRoot" => "0x6fd0a5d82ca77d9f38c3ebbde11b11d304a5fcf3854f291df64395ab38ed43ba", + "timestamp" => Timex.parse!("2015-07-30T15:32:07Z", "{ISO:Extended:Z}"), + "totalDifficulty" => nil, + "transactions" => [], + "transactionsRoot" => "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncles" => [] + }) + + assert result == %{ + difficulty: 17_561_410_778, + extra_data: "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32", + gas_limit: 5000, + gas_used: 0, + hash: "0x4d9423080290a650eaf6db19c87c76dff83d1b4ab64aefe6e5c5aa2d1f4b6623", + logs_bloom: + "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + mix_hash: "0xbbb93d610b2b0296a59f18474ac3d6086a9902aa7ca4b9a306692f7c3d496fdf", + miner_hash: "0xbb7b8287f3f0a933474a79eae42cbca977791171", + nonce: 5_539_500_215_739_777_653, + number: 59, + parent_hash: "0xcd5b5c4cecd7f18a13fe974255badffd58e737dc67596d56bc01f063dd282e9e", + receipts_root: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + sha3_uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + size: 542, + state_root: "0x6fd0a5d82ca77d9f38c3ebbde11b11d304a5fcf3854f291df64395ab38ed43ba", + timestamp: Timex.parse!("2015-07-30T15:32:07Z", "{ISO:Extended:Z}"), + total_difficulty: nil, + transactions_root: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + uncles: [] + } + end + end end From 11c1b2e02de69fa65ea37cc142eca66ccb72d944 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 3 Jun 2019 11:08:30 +0300 Subject: [PATCH 02/30] add CHANGELOG entry --- CHANGELOG.md | 1 + apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c4a8d1e1e..4d1d757589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ - [#2014](https://github.com/poanetwork/blockscout/pull/2014) - fix: use better queries for listLogs endpoint - [#2027](https://github.com/poanetwork/blockscout/pull/2027) - fix: `BlocksTransactionsMismatch` ignoring blocks without transactions - [#2070](https://github.com/poanetwork/blockscout/pull/2070) - reduce `max_concurrency` of `BlocksTransactionsMismatch` fetcher +- [#2083](https://github.com/poanetwork/blockscout/pull/2083) - allow total_difficuly to be nil ### Chore diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex index 4ac9b327a0..6be34eeee1 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex @@ -439,7 +439,7 @@ defmodule EthereumJSONRPC.Block do {key, quantity_to_integer(quantity)} end - # Size may be `nil` for uncle blocks + # Size and totalDifficulty may be `nil` for uncle blocks defp entry_to_elixir({key, nil}) when key in ~w(size totalDifficulty) do {key, nil} end From b1530e370948dbf1d8f16669145482740a668fab Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 3 Jun 2019 12:36:48 +0300 Subject: [PATCH 03/30] fix geth's staticcall without output --- .../lib/ethereum_jsonrpc/geth/call.ex | 35 +++++++-------- .../test/ethereum_jsonrpc/geth/call_test.exs | 43 +++++++++++++++++++ 2 files changed, 61 insertions(+), 17 deletions(-) diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex index 434cc7b34d..1555ea6c8f 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex @@ -385,22 +385,23 @@ defmodule EthereumJSONRPC.Geth.Call do } end - defp elixir_to_internal_transaction_params(%{ - "blockNumber" => block_number, - "transactionIndex" => transaction_index, - "transactionHash" => transaction_hash, - "index" => index, - "traceAddress" => trace_address, - "type" => "call" = type, - "callType" => "staticcall" = call_type, - "from" => from_address_hash, - "to" => to_address_hash, - "input" => input, - "output" => output, - "gas" => gas, - "gasUsed" => gas_used, - "value" => 0 = value - }) do + defp elixir_to_internal_transaction_params( + %{ + "blockNumber" => block_number, + "transactionIndex" => transaction_index, + "transactionHash" => transaction_hash, + "index" => index, + "traceAddress" => trace_address, + "type" => "call" = type, + "callType" => "staticcall" = call_type, + "from" => from_address_hash, + "to" => to_address_hash, + "input" => input, + "gas" => gas, + "gasUsed" => gas_used, + "value" => 0 = value + } = params + ) do %{ block_number: block_number, transaction_index: transaction_index, @@ -414,7 +415,7 @@ defmodule EthereumJSONRPC.Geth.Call do gas: gas, gas_used: gas_used, input: input, - output: output, + output: params["output"], value: value } end diff --git a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs index 69815f203f..f4a97c07de 100644 --- a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs +++ b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs @@ -2,4 +2,47 @@ defmodule EthereumJSONRPC.Geth.CallTest do use ExUnit.Case, async: true doctest EthereumJSONRPC.Geth.Call + + alias EthereumJSONRPC.Geth.Call + + describe "to_internal_transaction_params/1" do + test "does not fail decoding static_call without output" do + result = + Call.to_internal_transaction_params(%{ + "blockNumber" => 584_340, + "callType" => "staticcall", + "error" => "execution reverted", + "from" => "0x3858636f27e269d23db2ef1fcca5f93dcaa564cd", + "gas" => "0x0", + "gasUsed" => "0x0", + "index" => 1, + "input" => + "0x09d10a5e00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002", + "to" => "0x79073fc2117dd054fcedacad1e7018c9cbe3ec0b", + "traceAddress" => [1, 3], + "transactionHash" => "0xbc38745b826f058ed2f6c93fa5b145323857f06bbb5230b6a6a50e09e0915857", + "transactionIndex" => 0, + "type" => "call", + "value" => "0x0" + }) + + assert result == %{ + block_number: 584_340, + call_type: "staticcall", + from_address_hash: "0x3858636f27e269d23db2ef1fcca5f93dcaa564cd", + gas: 0, + gas_used: 0, + index: 1, + input: + "0x09d10a5e00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002", + output: nil, + to_address_hash: "0x79073fc2117dd054fcedacad1e7018c9cbe3ec0b", + trace_address: [1, 3], + transaction_hash: "0xbc38745b826f058ed2f6c93fa5b145323857f06bbb5230b6a6a50e09e0915857", + transaction_index: 0, + type: "call", + value: 0 + } + end + end end From b869643bfff80f94ca19185e3b5ca45634c41732 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 3 Jun 2019 12:39:20 +0300 Subject: [PATCH 04/30] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3627226570..fc4970ef94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ - [#2014](https://github.com/poanetwork/blockscout/pull/2014) - fix: use better queries for listLogs endpoint - [#2027](https://github.com/poanetwork/blockscout/pull/2027) - fix: `BlocksTransactionsMismatch` ignoring blocks without transactions - [#2070](https://github.com/poanetwork/blockscout/pull/2070) - reduce `max_concurrency` of `BlocksTransactionsMismatch` fetcher +- [#2086](https://github.com/poanetwork/blockscout/pull/2086) - fix geth's staticcall without output ### Chore From 1bb1ad2dc71b0753c95342e6c75639116f369291 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 13:15:55 -0300 Subject: [PATCH 05/30] (fix) dashboard market cap / price colors --- .../assets/css/theme/_ethereum_classic_variables.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss b/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss index 490ae2376b..6a26d25696 100644 --- a/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss @@ -12,7 +12,8 @@ $footer-item-disc-color: $tertiary; .footer-logo { filter: brightness(0) invert(1); } // dashboard -$dashboard-line-color-price: $tertiary; // price left border +$dashboard-line-color-price: $secondary; +$dashboard-line-color-market: $tertiary; $dashboard-banner-chart-legend-value-color: $additional-font; // chart labels From 2fd7b666f6245efbbdd92c7cae558c42a14c5348 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 13:23:49 -0300 Subject: [PATCH 06/30] (fix) dashboard background color --- .../theme/_ethereum_classic_variables.scss | 49 ++++++++++++------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss b/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss index 6a26d25696..7d40780d2b 100644 --- a/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss @@ -9,30 +9,24 @@ $footer-background-color: $primary; $footer-title-color: #fff; $footer-text-color: $additional-font; $footer-item-disc-color: $tertiary; -.footer-logo { filter: brightness(0) invert(1); } +.footer-logo { + filter: brightness(0) invert(1); +} // dashboard $dashboard-line-color-price: $secondary; $dashboard-line-color-market: $tertiary; +$dashboard-banner-gradient-start: #1b1b39; +$dashboard-banner-gradient-end: #27275f; $dashboard-banner-chart-legend-value-color: $additional-font; // chart labels - $dashboard-stats-item-value-color: $additional-font; // stat values - $dashboard-stats-item-border-color: $secondary; // stat border - -$dashboard-banner-gradient-start: $primary; // gradient begin - -$dashboard-banner-gradient-end: lighten($primary, 5); // gradient end - $dashboard-banner-network-plain-container-background-color: #2d2d69; // stats bg - // navigation -.navbar { box-shadow: 0px 0px 30px 0px rgba(21, 53, 80, 0.12); } // header shadow $header-icon-border-color-hover: $tertiary; // top border on hover $header-icon-color-hover: $tertiary; // nav icon on hover -.dropdown-item:hover, .dropdown-item:focus { background-color: $tertiary !important; } // dropdown item on hover // buttons $btn-line-bg: #fff; // button bg @@ -40,12 +34,33 @@ $btn-line-color: #27275e; // button border and font color && hover bg color $btn-copy-color: #27275e; // btn copy $btn-qr-color: #27275e; // btn qr-code -//links & tile -.tile a { color: $tertiary !important; } // links color for badges -.tile-type-block { - border-left: 4px solid #27275e; -} // tab active bg - // card $card-background-1: $tertiary; $card-tab-active: $tertiary; + +// CSS theme's idiosyncrasies +.layout-container { + .navbar { + box-shadow: 0px 0px 30px 0px rgba(21, 53, 80, 0.12); + } // header shadow + + .dropdown-item:hover, + .dropdown-item:focus { + background-color: $tertiary !important; + } // dropdown item on hover + + .dashboard-banner-container { + background-image: linear-gradient( + to bottom, + $dashboard-banner-gradient-start, + $dashboard-banner-gradient-end + ); + } + + .tile a { + color: $tertiary !important; + } + .tile-type-block { + border-left: 4px solid #27275e; + } +} From 3bf81cd233dd21d36465a51d14bdee754f6c98c5 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 15:25:46 -0300 Subject: [PATCH 07/30] (fix) moved base variables --- .../assets/css/theme/_base_variables.scss | 4 ++++ .../assets/css/theme/_neutral_variables.scss | 9 --------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/apps/block_scout_web/assets/css/theme/_base_variables.scss b/apps/block_scout_web/assets/css/theme/_base_variables.scss index 0d428a7194..777b9bd063 100644 --- a/apps/block_scout_web/assets/css/theme/_base_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_base_variables.scss @@ -3,6 +3,10 @@ // Variables should follow the `$component-state-property-size` formula for // consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs. +$dashboard-line-color-price: #8286a9 !default; +$base-border-color: #e2e5ec !default; +$common-container-margin: 50px !default; + // stylelint-disable $white: #fff !default; $gray-100: #f8f9fa !default; diff --git a/apps/block_scout_web/assets/css/theme/_neutral_variables.scss b/apps/block_scout_web/assets/css/theme/_neutral_variables.scss index c2232fd0a8..40878c5402 100644 --- a/apps/block_scout_web/assets/css/theme/_neutral_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_neutral_variables.scss @@ -1,12 +1,3 @@ -// $primary: #262d62; -// $secondary: #687bf6; -// $tertiary: #687bf6; - -$dashboard-line-color-price: #8286a9 !default; - -$base-border-color: #e2e5ec !default; -$common-container-margin: 50px !default; - // general $primary: #5c34a2; $secondary: #87e1a9; From e2eb9542a1f304f154c91a49b17ae7799ed703c3 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 15:30:28 -0300 Subject: [PATCH 08/30] (fix) tile color --- .../assets/css/components/_tile.scss | 111 ++++++++++++------ 1 file changed, 74 insertions(+), 37 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_tile.scss b/apps/block_scout_web/assets/css/components/_tile.scss index 71cabbd1b3..0680729d1d 100644 --- a/apps/block_scout_web/assets/css/components/_tile.scss +++ b/apps/block_scout_web/assets/css/components/_tile.scss @@ -14,6 +14,8 @@ $tile-type-progress-bar-color: $primary !default; $tile-status-error-reason: #ff7986 !default; $tile-status-awaiting-internal-transactions: $warning !default; $tile-padding: 1rem; +$tile-title-color: #333 !default; +$tile-body-a-color: #5959d8 !default; @mixin generate-tile-block($prefix, $color, $label-color: false) { &#{ $prefix } { @@ -23,8 +25,7 @@ $tile-padding: 1rem; a { @if ($label-color) { color: $label-color; - } - @else { + } @else { color: $color; } } @@ -33,8 +34,7 @@ $tile-padding: 1rem; .tile-label { @if ($label-color) { color: $label-color; - } - @else { + } @else { color: $color; } } @@ -42,8 +42,7 @@ $tile-padding: 1rem; .tile-status-label { @if ($label-color) { color: $label-color; - } - @else { + } @else { color: $color; } } @@ -60,20 +59,6 @@ $tile-padding: 1rem; /*********************************************************************/ -.tile-title { - color: #333; - font-size: 12px; - - &-hash { - font-weight: 300; - } - - &-lg { - color: $body-color; - font-size: 16px; - } -} - .tile-label { font-size: 12px; font-weight: 700; @@ -154,7 +139,6 @@ $tile-padding: 1rem; } .tile-function-response { - span.function-response-item { display: block; margin-left: 1rem; @@ -167,7 +151,6 @@ $tile-padding: 1rem; p { margin: 0; } - } .tile-image { @@ -176,6 +159,23 @@ $tile-padding: 1rem; } .tile { + .tile-body a { + color: $tile-body-a-color; + } + + .tile-title { + color: $tile-title-color; + font-size: 12px; + + &-hash { + font-weight: 300; + } + + &-lg { + color: $body-color; + font-size: 16px; + } + } border-radius: 4px; border: 1px solid $border-color; color: $text-muted; @@ -184,20 +184,57 @@ $tile-padding: 1rem; line-height: 1.4rem; padding: $tile-padding; - @include generate-tile-block('.tile-type-block', $tile-type-block-color, darken($tile-type-block-color, 20%)); - @include generate-tile-block('.tile-type-uncle', $tile-type-uncle-color); - @include generate-tile-block('.tile-type-reorg', $tile-type-reorg-color); - @include generate-tile-block('.tile-type-emission-reward', $tile-type-emission-reward-color); - @include generate-tile-block('.tile-type-transaction', $tile-type-transaction-color); - @include generate-tile-block('.tile-type-contract-call', $tile-type-contract-call-color); - @include generate-tile-block('.tile-type-contract-creation', $tile-type-contract-creation-color); - @include generate-tile-block('.tile-type-token-transfer', $tile-type-token-transfer-color); - @include generate-tile-block('.tile-type-unique-token', $tile-type-unique-token-color); - @include generate-tile-block('.tile-type-unique-token-image', $tile-type-unique-token-image-color); - @include generate-tile-block('.tile-type-internal-transaction', $tile-type-internal-transaction-color); - @include generate-tile-block('.tile-type-api-documentation', $tile-type-api-documentation-color); - @include generate-tile-block('[class*="status--error"]', $tile-status-error-reason); - @include generate-tile-block('.tile-status--awaiting-internal-transactions', $tile-status-awaiting-internal-transactions); + @include generate-tile-block( + ".tile-type-block", + $tile-type-block-color, + darken($tile-type-block-color, 20%) + ); + @include generate-tile-block(".tile-type-uncle", $tile-type-uncle-color); + @include generate-tile-block(".tile-type-reorg", $tile-type-reorg-color); + @include generate-tile-block( + ".tile-type-emission-reward", + $tile-type-emission-reward-color + ); + @include generate-tile-block( + ".tile-type-transaction", + $tile-type-transaction-color + ); + @include generate-tile-block( + ".tile-type-contract-call", + $tile-type-contract-call-color + ); + @include generate-tile-block( + ".tile-type-contract-creation", + $tile-type-contract-creation-color + ); + @include generate-tile-block( + ".tile-type-token-transfer", + $tile-type-token-transfer-color + ); + @include generate-tile-block( + ".tile-type-unique-token", + $tile-type-unique-token-color + ); + @include generate-tile-block( + ".tile-type-unique-token-image", + $tile-type-unique-token-image-color + ); + @include generate-tile-block( + ".tile-type-internal-transaction", + $tile-type-internal-transaction-color + ); + @include generate-tile-block( + ".tile-type-api-documentation", + $tile-type-api-documentation-color + ); + @include generate-tile-block( + '[class*="status--error"]', + $tile-status-error-reason + ); + @include generate-tile-block( + ".tile-status--awaiting-internal-transactions", + $tile-status-awaiting-internal-transactions + ); &.n-p { padding: 0; @@ -273,4 +310,4 @@ $tile-padding: 1rem; border-radius: 2px; } } -} \ No newline at end of file +} From b3f8061bab386682fa8afff66cb4d11ae676b0e4 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 15:31:38 -0300 Subject: [PATCH 09/30] (update) etc styles --- .../theme/_ethereum_classic_variables.scss | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss b/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss index 7d40780d2b..fadc5f2720 100644 --- a/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss @@ -9,14 +9,11 @@ $footer-background-color: $primary; $footer-title-color: #fff; $footer-text-color: $additional-font; $footer-item-disc-color: $tertiary; -.footer-logo { - filter: brightness(0) invert(1); -} +$footer-social-icon-color: #5959d8; // dashboard $dashboard-line-color-price: $secondary; $dashboard-line-color-market: $tertiary; - $dashboard-banner-gradient-start: #1b1b39; $dashboard-banner-gradient-end: #27275f; $dashboard-banner-chart-legend-value-color: $additional-font; // chart labels @@ -38,16 +35,17 @@ $btn-qr-color: #27275e; // btn qr-code $card-background-1: $tertiary; $card-tab-active: $tertiary; -// CSS theme's idiosyncrasies +// ETC theme's idiosyncrasies .layout-container { .navbar { - box-shadow: 0px 0px 30px 0px rgba(21, 53, 80, 0.12); - } // header shadow + box-shadow: 0 0 30px 0 rgba(21, 53, 80, 0.12); + } .dropdown-item:hover, + .dropdown-item.active, .dropdown-item:focus { - background-color: $tertiary !important; - } // dropdown item on hover + background-color: $tertiary; + } .dashboard-banner-container { background-image: linear-gradient( @@ -57,10 +55,7 @@ $card-tab-active: $tertiary; ); } - .tile a { - color: $tertiary !important; - } - .tile-type-block { - border-left: 4px solid #27275e; + .footer-logo { + filter: brightness(0) invert(1); } } From 135bc23b0baba45218cede552969b9acb14679f2 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 15:46:54 -0300 Subject: [PATCH 10/30] (update) changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f94e33f2b7..3a0a9f7c95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - [#2064](https://github.com/poanetwork/blockscout/pull/2064) - feat: add fields to tx apis, small cleanups ### Fixes +- [#2090](https://github.com/poanetwork/blockscout/pull/2090) - updated some ETC theme colors - [#2082](https://github.com/poanetwork/blockscout/pull/2082) - dropdown styles, tooltip gap fix, 404 page added - [#2077](https://github.com/poanetwork/blockscout/pull/2077) - ui issues - [#2072](https://github.com/poanetwork/blockscout/pull/2072) - Fixed checkmarks not showing correctly in tabs. From fd1b3d73597cfa5dcaf729f6f992acb85bad3d61 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 16:41:41 -0300 Subject: [PATCH 11/30] (add) question status modal --- .../assets/css/components/_modal_status.scss | 20 +++++++++++++ apps/block_scout_web/assets/js/lib/modals.js | 5 ++++ .../_icon_question_modal.html.eex | 29 +++++++++++++++++++ .../common_components/_modal_status.html.eex | 22 ++++++++++++-- .../templates/layout/_footer.html.eex | 5 ++++ 5 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/common_components/_icon_question_modal.html.eex diff --git a/apps/block_scout_web/assets/css/components/_modal_status.scss b/apps/block_scout_web/assets/css/components/_modal_status.scss index 9c32b05c72..92856250fc 100644 --- a/apps/block_scout_web/assets/css/components/_modal_status.scss +++ b/apps/block_scout_web/assets/css/components/_modal_status.scss @@ -1,6 +1,7 @@ $modal-status-graph-error: #ff0d51 !default; $modal-status-graph-warning: #ff8502 !default; $modal-status-graph-success: $primary !default; +$modal-status-graph-question: #329ae9 !default; .modal-status { max-width: 100%; @@ -32,6 +33,10 @@ $modal-status-graph-success: $primary !default; background-color: $modal-status-graph-success; } + &-question { + background-color: $modal-status-graph-question; + } + svg { margin-top: 15px; } @@ -62,3 +67,18 @@ $modal-status-graph-success: $primary !default; margin: 0 0 25px; text-align: center; } + +.modal-status-button-wrapper { + display: flex; + justify-content: space-between; + width: 100%; + + .btn-line { + flex-grow: 1; + margin-right: 20px; + + &:last-child { + margin-right: 0; + } + } +} \ No newline at end of file diff --git a/apps/block_scout_web/assets/js/lib/modals.js b/apps/block_scout_web/assets/js/lib/modals.js index fb19532540..95a54af405 100644 --- a/apps/block_scout_web/assets/js/lib/modals.js +++ b/apps/block_scout_web/assets/js/lib/modals.js @@ -22,6 +22,11 @@ $(function () { $('#successStatusModal').modal() }) + // TODO: Remove this + $(window).on('load', function () { + $('#questionStatusModal').modal() + }) + $('.js-stake-stake').on('click', function () { const modal = '#stakeModal' const progress = parseInt($(`${modal} .js-stakes-progress-data-progress`).text()) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_icon_question_modal.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_icon_question_modal.html.eex new file mode 100644 index 0000000000..14c50899c0 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_icon_question_modal.html.eex @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex index c3bd4752e1..71e192ee62 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex @@ -17,6 +17,11 @@ render BlockScoutWeb.CommonComponentsView, "_icon_warning_modal.html" end %> + <%= + if @status == "question" do + render BlockScoutWeb.CommonComponentsView, "_icon_question_modal.html" + end + %> <%= render BlockScoutWeb.CommonComponentsView, "_modal_close_button.html" %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex index ed22191b1f..8d8e8f423a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex @@ -85,3 +85,8 @@ <% end %> + +<%= + render BlockScoutWeb.CommonComponentsView, "_modal_status.html", status: "question", title: "Lorem Ipsum", text: "Lorem ipsum dolor sit amet, consectetur +adipiscing elit, sed do eiusmod tempor." +%> \ No newline at end of file From 1ca8f6a9bbe9ee0d1acfc4bc9267eba5be6dabd4 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Mon, 3 Jun 2019 16:47:24 -0300 Subject: [PATCH 12/30] (update) changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f94e33f2b7..05961a267c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Current ### Features +- [#2091](https://github.com/poanetwork/blockscout/pull/2091) - Added "Question" modal. - [#1726](https://github.com/poanetwork/blockscout/pull/2071) - Updated styles for the new smart contract page. - [#2081](https://github.com/poanetwork/blockscout/pull/2081) - Tooltip for 'more' button, explorers logos added - [#1963](https://github.com/poanetwork/blockscout/pull/1963), [#1959](https://github.com/poanetwork/blockscout/pull/1959), [#1948](https://github.com/poanetwork/blockscout/pull/1948), [#1936](https://github.com/poanetwork/blockscout/pull/1936), [#1925](https://github.com/poanetwork/blockscout/pull/1925), [#1922](https://github.com/poanetwork/blockscout/pull/1922), [#1903](https://github.com/poanetwork/blockscout/pull/1903), [#1874](https://github.com/poanetwork/blockscout/pull/1874), [#1895](https://github.com/poanetwork/blockscout/pull/1895), [#2031](https://github.com/poanetwork/blockscout/pull/2031), [#2073](https://github.com/poanetwork/blockscout/pull/2073), [#2074](https://github.com/poanetwork/blockscout/pull/2074), - added new themes and logos for poa, eth, rinkeby, goerli, ropsten, kovan, sokol, xdai, etc, rsk and default theme From d486a031f81983c5b844cfbabd6424b60ad57a1c Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 4 Jun 2019 16:29:15 +0300 Subject: [PATCH 13/30] Update CHANGELOG.md --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f94e33f2b7..349b3e8ae9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,17 @@ ## Current ### Features + +### Fixes + +### Chore + +## 2.0.0-beta + +### Features +- [#1963](https://github.com/poanetwork/blockscout/pull/1963), [#1959](https://github.com/poanetwork/blockscout/pull/1959), [#1948](https://github.com/poanetwork/blockscout/pull/1948), [#1936](https://github.com/poanetwork/blockscout/pull/1936), [#1925](https://github.com/poanetwork/blockscout/pull/1925), [#1922](https://github.com/poanetwork/blockscout/pull/1922), [#1903](https://github.com/poanetwork/blockscout/pull/1903), [#1874](https://github.com/poanetwork/blockscout/pull/1874), [#1895](https://github.com/poanetwork/blockscout/pull/1895), [#2031](https://github.com/poanetwork/blockscout/pull/2031), [#2073](https://github.com/poanetwork/blockscout/pull/2073), [#2074](https://github.com/poanetwork/blockscout/pull/2074), - added new themes and logos for poa, eth, rinkeby, goerli, ropsten, kovan, sokol, xdai, etc, rsk and default theme - [#1726](https://github.com/poanetwork/blockscout/pull/2071) - Updated styles for the new smart contract page. - [#2081](https://github.com/poanetwork/blockscout/pull/2081) - Tooltip for 'more' button, explorers logos added -- [#1963](https://github.com/poanetwork/blockscout/pull/1963), [#1959](https://github.com/poanetwork/blockscout/pull/1959), [#1948](https://github.com/poanetwork/blockscout/pull/1948), [#1936](https://github.com/poanetwork/blockscout/pull/1936), [#1925](https://github.com/poanetwork/blockscout/pull/1925), [#1922](https://github.com/poanetwork/blockscout/pull/1922), [#1903](https://github.com/poanetwork/blockscout/pull/1903), [#1874](https://github.com/poanetwork/blockscout/pull/1874), [#1895](https://github.com/poanetwork/blockscout/pull/1895), [#2031](https://github.com/poanetwork/blockscout/pull/2031), [#2073](https://github.com/poanetwork/blockscout/pull/2073), [#2074](https://github.com/poanetwork/blockscout/pull/2074), - added new themes and logos for poa, eth, rinkeby, goerli, ropsten, kovan, sokol, xdai, etc, rsk and default theme - [#2010](https://github.com/poanetwork/blockscout/pull/2010) - added "block not found" and "tx not found pages" - [#1928](https://github.com/poanetwork/blockscout/pull/1928) - pagination styles were updated - [#1940](https://github.com/poanetwork/blockscout/pull/1940) - qr modal button and background issue From e700c071c04e61d8a07b8002525bf9b0aede4e0b Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Tue, 4 Jun 2019 11:22:05 -0300 Subject: [PATCH 14/30] (fix) dropdown button color --- apps/block_scout_web/assets/css/_mixins.scss | 2 ++ .../css/components/_btn_dropdown_line.scss | 22 ++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/block_scout_web/assets/css/_mixins.scss b/apps/block_scout_web/assets/css/_mixins.scss index a5c3836095..9b00a92e38 100644 --- a/apps/block_scout_web/assets/css/_mixins.scss +++ b/apps/block_scout_web/assets/css/_mixins.scss @@ -73,6 +73,7 @@ } @mixin btn-full($bg-color: $primary, $text-color: #fff) { + -webkit-appearance: none !important; align-items: center; background-color: $bg-color; border-radius: 2px; @@ -121,6 +122,7 @@ } @mixin btn-line($bg-color: #fff, $text-color: $secondary) { + -webkit-appearance: none !important; align-items: center; background-color: $bg-color; border-radius: 2px; diff --git a/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss b/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss index f076f14dff..99a6058bf3 100644 --- a/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss +++ b/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss @@ -1,13 +1,15 @@ $btn-dropdown-line-bg: #fff !default; -$btn-dropdown-line-color: $primary !default; +$btn-dropdown-line-color: #333 !default; .btn-dropdown-line { - @include btn-line($btn-dropdown-line-bg, $btn-dropdown-line-color); - outline: none !important; - color: #333; - border-color: #e2e5ec; - &:hover { - background-color: transparent; - color: #333; - } -} \ No newline at end of file + @include btn-line($btn-dropdown-line-bg, $btn-dropdown-line-color); + border-color: $btn-dropdown-line-color; + color: $btn-dropdown-line-color; + outline: none !important; + + &:hover { + background-color: $btn-dropdown-line-color; + border-color: $btn-dropdown-line-color; + color: $btn-dropdown-line-bg; + } +} From ca27c34550d14629a714a8f7c126fe89ccc5a071 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Tue, 4 Jun 2019 11:22:19 -0300 Subject: [PATCH 15/30] (fix) rsk variables --- .../assets/css/theme/_rsk_variables.scss | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/apps/block_scout_web/assets/css/theme/_rsk_variables.scss b/apps/block_scout_web/assets/css/theme/_rsk_variables.scss index c357f0f571..efd2afe2f5 100644 --- a/apps/block_scout_web/assets/css/theme/_rsk_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_rsk_variables.scss @@ -4,47 +4,57 @@ $secondary: #27ac8d; $tertiary: #e39a54; $additional-font: #a1ded1; +$tile-body-a-color: $secondary; +$tile-type-block-color: $secondary; + +$tile-type-progress-bar-color: $secondary; + // footer $footer-background-color: $primary; $footer-title-color: #fff; $footer-text-color: $additional-font; $footer-item-disc-color: $secondary; -.footer-logo { filter: brightness(0) invert(1); } +$footer-social-icon-color: $secondary; // dashboard $dashboard-line-color-price: $tertiary; // price left border - $dashboard-banner-chart-legend-value-color: $additional-font; // chart labels - $dashboard-stats-item-value-color: $additional-font; // stat values - $dashboard-stats-item-border-color: $secondary; // stat border - $dashboard-banner-gradient-start: $primary; // gradient begin - -$dashboard-banner-gradient-end: lighten($primary, 5); // gradient end - +$dashboard-banner-gradient-end: #193039; // gradient end $dashboard-banner-network-plain-container-background-color: #1a323b; // stats bg - // navigation -.navbar { box-shadow: 0px 0px 30px 0px rgba(21, 53, 80, 0.12); } // header shadow $header-icon-border-color-hover: $secondary; // top border on hover $header-icon-color-hover: $secondary; // nav icon on hover -.dropdown-item:hover, .dropdown-item:focus { background-color: $secondary !important; } // dropdown item on hover // buttons $btn-line-bg: #fff; // button bg $btn-line-color: $secondary; // button border and font color && hover bg color $btn-copy-color: $secondary; // btn copy $btn-qr-color: $secondary; // btn qr-code - -//links & tile -.tile a { color: $secondary !important; } // links color for badges -.tile-type-block { - border-left: 4px solid $secondary; -} // tab active bg +$btn-dropdown-line-color: $secondary; // card $card-background-1: $secondary; -$card-tab-active: $secondary; \ No newline at end of file +$card-tab-active: $secondary; + +// ETC theme's idiosyncrasies +.layout-container { + .navbar { + box-shadow: 0 0 30px 0 rgba(21, 53, 80, 0.12); + } + + .dashboard-banner-container { + background-image: linear-gradient( + to bottom, + $dashboard-banner-gradient-start, + $dashboard-banner-gradient-end + ); + } + + .footer-logo { + filter: brightness(0) invert(1); + } + } From e03047b30998c870ab13fd639dcdc2b2070d3d70 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Tue, 4 Jun 2019 11:22:41 -0300 Subject: [PATCH 16/30] (fix) tile inner addresses colors --- apps/block_scout_web/assets/css/components/_tile.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/css/components/_tile.scss b/apps/block_scout_web/assets/css/components/_tile.scss index 0680729d1d..644fc3c423 100644 --- a/apps/block_scout_web/assets/css/components/_tile.scss +++ b/apps/block_scout_web/assets/css/components/_tile.scss @@ -159,10 +159,16 @@ $tile-body-a-color: #5959d8 !default; } .tile { - .tile-body a { + span[data-address-hash] { color: $tile-body-a-color; } + .tile-body { + a { + color: $tile-body-a-color; + } + } + .tile-title { color: $tile-title-color; font-size: 12px; From 99c058d3528d38e9345cf88106e900be00b46d42 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Tue, 4 Jun 2019 11:22:59 -0300 Subject: [PATCH 17/30] (fix) dropdown items color --- .../assets/css/components/_dropdown.scss | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_dropdown.scss b/apps/block_scout_web/assets/css/components/_dropdown.scss index f0a7e33661..5773b962b0 100644 --- a/apps/block_scout_web/assets/css/components/_dropdown.scss +++ b/apps/block_scout_web/assets/css/components/_dropdown.scss @@ -1,13 +1,17 @@ +$dropdown-menu-item-color: #333 !default; +$dropdown-menu-item-hover-color: #fff !default; +$dropdown-menu-item-hover-background: $secondary !default; + // These styles extend the default Bootstrap styles .dropdown-menu { + border-bottom: 1px solid #e2e5ec; + border-left: 1px solid #e2e5ec; border-radius: 0 0 8px 8px !important; + border-right: 1px solid #e2e5ec; border: none; box-shadow: $box-shadow; padding: 0; width: 100%; - border-left: 1px solid #e2e5ec; - border-right: 1px solid #e2e5ec; - border-bottom: 1px solid #e2e5ec; &.right { left: auto; @@ -27,11 +31,17 @@ } .dropdown-item { + color: $dropdown-menu-item-color; font-size: 12px; padding: 10px 20px; - &:hover { - color: #fff; + & { + &.active, + &:hover, + &:focus { + background-color: $dropdown-menu-item-hover-background; + color: $dropdown-menu-item-hover-color; + } } &:first-child { @@ -55,10 +65,6 @@ font-weight: 700; } } - - &.active { - background-color: $secondary; - } &.division { border-top: 1px solid $base-border-color; From 8b9148229dfaf4e655096288ea5c944f4ea17b3c Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Tue, 4 Jun 2019 11:36:17 -0300 Subject: [PATCH 18/30] (add) css classes for easier js event handling --- .../templates/common_components/_modal_status.html.eex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex index 71e192ee62..f6328b8f1b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_status.html.eex @@ -37,10 +37,10 @@ Ok <% else %> - - <% end %> From 7749705c897f3b551f978e8ce7be7051e2dddd39 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 4 Jun 2019 17:47:10 +0300 Subject: [PATCH 19/30] Update overview.html.eex --- .../lib/block_scout_web/templates/transaction/overview.html.eex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index 7c22762e49..c736a87633 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -51,7 +51,7 @@ - <%# <%= render BlockScoutWeb.AddressView, "_verify_other_explorers.html", hash: hash(@transaction), type: "tx" %> %> +
From da8ef5df2490adabb34238a290d60aa55eb73159 Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Tue, 4 Jun 2019 18:56:26 +0300 Subject: [PATCH 20/30] Update _navbar.scss --- apps/block_scout_web/assets/css/components/_navbar.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_navbar.scss b/apps/block_scout_web/assets/css/components/_navbar.scss index 0999ef327c..82a18c582c 100644 --- a/apps/block_scout_web/assets/css/components/_navbar.scss +++ b/apps/block_scout_web/assets/css/components/_navbar.scss @@ -10,7 +10,7 @@ $header-textfield-text-color: $header-links-color !default; $header-textfield-background-color: #f5f6fa !default; $header-textfield-magnifier-color: $header-links-color !default; $header-link-horizontal-padding: 0.71rem; -$navbar-logo-height: 1.5em !default; +$navbar-logo-height: 18px !default; $navbar-logo-width: auto !default; .navbar.navbar-primary { @@ -208,7 +208,7 @@ $navbar-logo-width: auto !default; } .navbar-logo { - height: $navbar-logo-height; + max-height: $navbar-logo-height; width: $navbar-logo-width; } From f2d7503604c5686bcba2033e5fc2065ff21d0bcd Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Tue, 4 Jun 2019 18:57:10 +0300 Subject: [PATCH 21/30] Update _dropdown.scss --- apps/block_scout_web/assets/css/components/_dropdown.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/css/components/_dropdown.scss b/apps/block_scout_web/assets/css/components/_dropdown.scss index f0a7e33661..52f12861aa 100644 --- a/apps/block_scout_web/assets/css/components/_dropdown.scss +++ b/apps/block_scout_web/assets/css/components/_dropdown.scss @@ -30,8 +30,10 @@ font-size: 12px; padding: 10px 20px; - &:hover { + &:hover, &.active { color: #fff; + background-color: rgba($primary, .1) !important; + color: $primary; } &:first-child { From 658c471541ac4100545bb1f65fdf72dae9c4b677 Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Tue, 4 Jun 2019 19:00:34 +0300 Subject: [PATCH 22/30] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 349b3e8ae9..8e0d4d0e4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - [#2064](https://github.com/poanetwork/blockscout/pull/2064) - feat: add fields to tx apis, small cleanups ### Fixes +- [#2098](https://github.com/poanetwork/blockscout/pull/2098) - nav dropdown issue, logo size issue - [#2082](https://github.com/poanetwork/blockscout/pull/2082) - dropdown styles, tooltip gap fix, 404 page added - [#2077](https://github.com/poanetwork/blockscout/pull/2077) - ui issues - [#2072](https://github.com/poanetwork/blockscout/pull/2072) - Fixed checkmarks not showing correctly in tabs. From e4c14fdcd00b0f71bb382c1dfe040329ed926ad4 Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Tue, 4 Jun 2019 19:48:52 +0300 Subject: [PATCH 23/30] Update _log-search.scss --- apps/block_scout_web/assets/css/components/_log-search.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_log-search.scss b/apps/block_scout_web/assets/css/components/_log-search.scss index a31de73262..f1c6d145cc 100644 --- a/apps/block_scout_web/assets/css/components/_log-search.scss +++ b/apps/block_scout_web/assets/css/components/_log-search.scss @@ -12,8 +12,10 @@ .logs-search { display: flex; position: relative; + width: 52%; @media (max-width: 599px) { margin-bottom: 30px; + width: 100%; } } @@ -57,8 +59,8 @@ transition: .1s ease-in; position: absolute; top: 0; - left: 136px; + right: 59px; &:hover { color: #333; } -} \ No newline at end of file +} From 004e28b4a25ccc88289213a1c95bd4e1cfa99f78 Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Tue, 4 Jun 2019 19:52:50 +0300 Subject: [PATCH 24/30] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5494a75d23..998798b2a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - [#2064](https://github.com/poanetwork/blockscout/pull/2064) - feat: add fields to tx apis, small cleanups ### Fixes +- [#2099](https://github.com/poanetwork/blockscout/pull/2099) - logs search input width - [#2098](https://github.com/poanetwork/blockscout/pull/2098) - nav dropdown issue, logo size issue - [#2082](https://github.com/poanetwork/blockscout/pull/2082) - dropdown styles, tooltip gap fix, 404 page added - [#2077](https://github.com/poanetwork/blockscout/pull/2077) - ui issues From 62d30735deb3f450837ce8ca8bd879ccf57f7618 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Tue, 4 Jun 2019 15:06:10 -0300 Subject: [PATCH 25/30] (remove) demo modal --- apps/block_scout_web/assets/js/lib/modals.js | 5 ----- .../lib/block_scout_web/templates/layout/_footer.html.eex | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/apps/block_scout_web/assets/js/lib/modals.js b/apps/block_scout_web/assets/js/lib/modals.js index 95a54af405..fb19532540 100644 --- a/apps/block_scout_web/assets/js/lib/modals.js +++ b/apps/block_scout_web/assets/js/lib/modals.js @@ -22,11 +22,6 @@ $(function () { $('#successStatusModal').modal() }) - // TODO: Remove this - $(window).on('load', function () { - $('#questionStatusModal').modal() - }) - $('.js-stake-stake').on('click', function () { const modal = '#stakeModal' const progress = parseInt($(`${modal} .js-stakes-progress-data-progress`).text()) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex index 8d8e8f423a..1058654d49 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex @@ -84,9 +84,4 @@ <% end %> - - -<%= - render BlockScoutWeb.CommonComponentsView, "_modal_status.html", status: "question", title: "Lorem Ipsum", text: "Lorem ipsum dolor sit amet, consectetur -adipiscing elit, sed do eiusmod tempor." -%> \ No newline at end of file + \ No newline at end of file From d09bc196da3bd39524e5ff91c2e9a163117f202e Mon Sep 17 00:00:00 2001 From: maxgrapps Date: Wed, 5 Jun 2019 13:40:30 +0300 Subject: [PATCH 26/30] ui issues for all themes --- .../assets/css/components/_address-overview.scss | 1 + .../assets/css/components/_btn_dropdown_line.scss | 6 +++--- .../assets/css/components/_btn_qr.scss | 1 + .../assets/css/components/_card.scss | 1 + .../assets/css/components/_dropdown.scss | 9 +++++---- .../assets/css/components/_footer.scss | 15 ++++++++++++--- .../assets/css/components/_navbar.scss | 7 ++++++- .../assets/css/components/_tile.scss | 11 ++++++----- .../assets/css/theme/_base_variables.scss | 2 +- .../assets/static/images/blockscout_logo.svg | 4 ++-- .../templates/block/overview.html.eex | 10 +++++----- .../templates/layout/_topnav.html.eex | 2 +- 12 files changed, 44 insertions(+), 25 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_address-overview.scss b/apps/block_scout_web/assets/css/components/_address-overview.scss index a366688cd9..a936aec99f 100644 --- a/apps/block_scout_web/assets/css/components/_address-overview.scss +++ b/apps/block_scout_web/assets/css/components/_address-overview.scss @@ -70,6 +70,7 @@ font-weight: 200; line-height: 1.2; margin: 0 0 12px; + font-weight: 400; small { font-size: 11px; diff --git a/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss b/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss index 99a6058bf3..998636d07f 100644 --- a/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss +++ b/apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss @@ -1,15 +1,15 @@ $btn-dropdown-line-bg: #fff !default; -$btn-dropdown-line-color: #333 !default; +$btn-dropdown-line-color: #e2e5ec !default; .btn-dropdown-line { @include btn-line($btn-dropdown-line-bg, $btn-dropdown-line-color); border-color: $btn-dropdown-line-color; - color: $btn-dropdown-line-color; + color: #333; outline: none !important; &:hover { background-color: $btn-dropdown-line-color; border-color: $btn-dropdown-line-color; - color: $btn-dropdown-line-bg; + color: #333; } } diff --git a/apps/block_scout_web/assets/css/components/_btn_qr.scss b/apps/block_scout_web/assets/css/components/_btn_qr.scss index 0f8fbc54f3..856f14ef30 100644 --- a/apps/block_scout_web/assets/css/components/_btn_qr.scss +++ b/apps/block_scout_web/assets/css/components/_btn_qr.scss @@ -3,4 +3,5 @@ $btn-qr-dimensions: 31px !default; .btn-qr-icon { @include square-icon-button($btn-qr-color, $btn-qr-dimensions); + transition: $transition-base !important; } diff --git a/apps/block_scout_web/assets/css/components/_card.scss b/apps/block_scout_web/assets/css/components/_card.scss index 8b4f1a423c..07a7961efe 100644 --- a/apps/block_scout_web/assets/css/components/_card.scss +++ b/apps/block_scout_web/assets/css/components/_card.scss @@ -176,6 +176,7 @@ $card-tab-icon-color-active: #20b760 !default; height: 70px; padding: 0 25px; text-align: center; + transition: $transition-base; &:hover { background-color: rgba($card-tab-active, .1); diff --git a/apps/block_scout_web/assets/css/components/_dropdown.scss b/apps/block_scout_web/assets/css/components/_dropdown.scss index 5773b962b0..a45f9afa16 100644 --- a/apps/block_scout_web/assets/css/components/_dropdown.scss +++ b/apps/block_scout_web/assets/css/components/_dropdown.scss @@ -1,6 +1,6 @@ $dropdown-menu-item-color: #333 !default; -$dropdown-menu-item-hover-color: #fff !default; -$dropdown-menu-item-hover-background: $secondary !default; +$dropdown-menu-item-hover-color: $primary !default; +$dropdown-menu-item-hover-background: rgba($primary, .1) !default; // These styles extend the default Bootstrap styles .dropdown-menu { @@ -8,7 +8,7 @@ $dropdown-menu-item-hover-background: $secondary !default; border-left: 1px solid #e2e5ec; border-radius: 0 0 8px 8px !important; border-right: 1px solid #e2e5ec; - border: none; + border-top: none; box-shadow: $box-shadow; padding: 0; width: 100%; @@ -34,12 +34,13 @@ $dropdown-menu-item-hover-background: $secondary !default; color: $dropdown-menu-item-color; font-size: 12px; padding: 10px 20px; + transition: $transition-base; & { &.active, &:hover, &:focus { - background-color: $dropdown-menu-item-hover-background; + background-color: $dropdown-menu-item-hover-background !important; color: $dropdown-menu-item-hover-color; } } diff --git a/apps/block_scout_web/assets/css/components/_footer.scss b/apps/block_scout_web/assets/css/components/_footer.scss index 169f6608dc..a27f932078 100644 --- a/apps/block_scout_web/assets/css/components/_footer.scss +++ b/apps/block_scout_web/assets/css/components/_footer.scss @@ -4,7 +4,7 @@ $footer-text-color: rgba(#fff, 0.7) !default; $footer-link-color: $footer-text-color !default; $footer-item-disc-color: $primary !default; $footer-social-icon-color: $footer-text-color !default; -$footer-logo-height: 2rem !default; +$footer-logo-height: 18px !default; $footer-logo-width: auto !default; .footer { @@ -26,7 +26,7 @@ $footer-logo-width: auto !default; } .footer-logo { - height: $footer-logo-height; + max-height: $footer-logo-height; width: $footer-logo-width; } @@ -46,9 +46,10 @@ $footer-logo-width: auto !default; font-size: 22px; margin-right: 15px; text-decoration: none; + transition: $transition-base; &:hover { - color: $footer-social-icon-color; + color: #fff; } &:last-child { @@ -91,6 +92,14 @@ $footer-logo-width: auto !default; line-height: 2.5; padding: 0; + a { + transition: $transition-base; + &:hover { + text-decoration: none; + color: #fff; + } + } + &::before { background-color: $footer-item-disc-color; border-radius: 50%; diff --git a/apps/block_scout_web/assets/css/components/_navbar.scss b/apps/block_scout_web/assets/css/components/_navbar.scss index 82a18c582c..f98704f957 100644 --- a/apps/block_scout_web/assets/css/components/_navbar.scss +++ b/apps/block_scout_web/assets/css/components/_navbar.scss @@ -1,6 +1,6 @@ // Default variables $header-background-color: #fff !default; -$header-links-color: #a3a9b5 !default; +$header-links-color: #828ba0 !default; $header-links-color-active: #333 !default; $header-icon-color: $header-links-color !default; $header-icon-color-hover: #333 !default; @@ -30,6 +30,7 @@ $navbar-logo-width: auto !default; display: flex; font-size: 14px; position: relative; + transition: $transition-base; &:before { background-color: $header-icon-border-color-hover; @@ -77,12 +78,16 @@ $navbar-logo-width: auto !default; path { fill: $header-icon-color; + transition: $transition-base; } } } .nav-item-networks { margin-left: auto; + .nav-link:before { + display: none; + } } } diff --git a/apps/block_scout_web/assets/css/components/_tile.scss b/apps/block_scout_web/assets/css/components/_tile.scss index 644fc3c423..3fb9da1010 100644 --- a/apps/block_scout_web/assets/css/components/_tile.scss +++ b/apps/block_scout_web/assets/css/components/_tile.scss @@ -40,11 +40,12 @@ $tile-body-a-color: #5959d8 !default; } .tile-status-label { - @if ($label-color) { - color: $label-color; - } @else { - color: $color; - } + // @if ($label-color) { + // color: $label-color; + // } @else { + // color: $color; + // } + color: inherit; } .tile-transaction-type-block { diff --git a/apps/block_scout_web/assets/css/theme/_base_variables.scss b/apps/block_scout_web/assets/css/theme/_base_variables.scss index 777b9bd063..5b1b55b7d5 100644 --- a/apps/block_scout_web/assets/css/theme/_base_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_base_variables.scss @@ -13,7 +13,7 @@ $gray-100: #f8f9fa !default; $gray-200: #e9ecef !default; $gray-300: #dee2e6 !default; $gray-400: #ced4da !default; -$gray-500: #adb5bd !default; +$gray-500: #828ba0 !default; $gray-600: #cdcdcc !default; $gray-700: #495057 !default; $gray-800: #343a40 !default; diff --git a/apps/block_scout_web/assets/static/images/blockscout_logo.svg b/apps/block_scout_web/assets/static/images/blockscout_logo.svg index 2abda8ba4b..8537a316a1 100644 --- a/apps/block_scout_web/assets/static/images/blockscout_logo.svg +++ b/apps/block_scout_web/assets/static/images/blockscout_logo.svg @@ -1,4 +1,4 @@ - + @@ -61,5 +61,5 @@ - + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex index 272942fea0..23985be4f6 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex @@ -57,7 +57,7 @@
<%= gettext "Difficulty" %>
- <%= @block.difficulty |> Cldr.Number.to_string! %> + <%= @block.difficulty |> Cldr.Number.to_string! %>
@@ -65,13 +65,13 @@
<%= gettext "Total Difficulty" %>
-
<%= @block.total_difficulty |> Cldr.Number.to_string! %>
+
<%= @block.total_difficulty |> Cldr.Number.to_string! %>
<%= gettext "Nonce" %>
-
<%= to_string(@block.nonce) %>
+
<%= to_string(@block.nonce) %>
<%= if length(@block.uncle_relations) > 0 do %> @@ -97,14 +97,14 @@
<%= gettext "Gas Used" %>
- <%= @block.gas_used |> Cldr.Number.to_string! %> + <%= @block.gas_used |> Cldr.Number.to_string! %> (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>)
<%= gettext "Gas Limit" %>
- <%= Cldr.Number.to_string!(@block.gas_limit) %> + <%= Cldr.Number.to_string!(@block.gas_limit) %>
<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index bcee6a869a..f48e78c390 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -77,7 +77,7 @@