diff --git a/.dialyzer-ignore b/.dialyzer-ignore index 86584c2cb5..4c1c02cb30 100644 --- a/.dialyzer-ignore +++ b/.dialyzer-ignore @@ -12,4 +12,5 @@ apps/block_scout_web/lib/block_scout_web/views/layout_view.ex:175: The call 'Eli apps/explorer/lib/explorer/smart_contract/publisher_worker.ex:6: The pattern 'false' can never match the type 'true' apps/explorer/lib/explorer/smart_contract/publisher_worker.ex:6: The test 5 == 'infinity' can never evaluate to 'true' lib/block_scout_web/router.ex:1 -lib/phoenix/router.ex:324 \ No newline at end of file +lib/phoenix/router.ex:324 +lib/block_scout_web/views/layout_view.ex:146 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f278cef33..155e3f4020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,19 @@ ## Current ### Features +- [#2791](https://github.com/poanetwork/blockscout/pull/2791) - add ipc client - [#2449](https://github.com/poanetwork/blockscout/pull/2449) - add ability to send notification events through postgres notify ### Fixes +- [#2806](https://github.com/poanetwork/blockscout/pull/2806) - Fix blocks fetching on the main page +- [#2803](https://github.com/poanetwork/blockscout/pull/2803) - Fix block validator custom tooltip ### Chore +- [#2817](https://github.com/poanetwork/blockscout/pull/2817) - move docker integration documentation to blockscout docs - [#2808](https://github.com/poanetwork/blockscout/pull/2808) - Add tooltip for tx input +- [#2807](https://github.com/poanetwork/blockscout/pull/2807) - 422 page +- [#2805](https://github.com/poanetwork/blockscout/pull/2805) - Update supported chains default option +- [#2801](https://github.com/poanetwork/blockscout/pull/2801) - remove unused clause in address_to_unique_tokens query ## 2.1.0-beta diff --git a/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss b/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss index 91eb3ad01a..e510c8e7a3 100644 --- a/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss +++ b/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss @@ -1,4 +1,5 @@ /* Custom Tooltips for Block Details Page */ +$tooltip-background-color: $btn-line-color !default; .tooltipCustom { position: relative; @@ -8,23 +9,20 @@ .tooltipCustom .tooltiptextTopMiner { visibility: hidden; position: absolute; - width: 50%; + width: 100%; background-color: white; - color: black; + color: $tooltip-background-color; text-align: center; border-radius: 6px; - left: 25%; + left: 0%; bottom: 100%; - padding: 15px 0px; + padding: 15px; display: inline-block; z-index: 1; font-family: Nunito; margin-bottom: 15px; opacity: 0; transition: opacity 0.5s; - @include media-breakpoint-down(lg) { - left: 60%; - } } .tooltipCustom .tooltiptextTopMiner::after { @@ -43,44 +41,5 @@ opacity: 1; } -.tooltipCustom .tooltiptextTopR { - visibility: hidden; - position: absolute; - width: 50%; - background-color: $primary; - color: white; - text-align: center; - border-radius: 6px; - left: 52%; - bottom: 120%; - padding: 15px 10px; - font-family: Nunito; - display: inline-block; - z-index: 1; - margin-bottom: 15px; - opacity: 0; - transition: opacity 0.5s; - @include media-breakpoint-down(lg) { - bottom: 100%; - padding: 9px 10px; - } -} - -.tooltipCustom .tooltiptextTopR::after { - content: ''; - position: absolute; - top: 100%; - left: 50%; - margin-left: -5px; - border-width: 5px; - border-style: solid; - border-color: $primary transparent transparent transparent; -} - -.tooltipCustom:hover .tooltiptextTopR { - visibility: visible; - opacity: 1; -} - /* Custom Tooltips for Block Details Page end*/ \ No newline at end of file diff --git a/apps/block_scout_web/assets/js/pages/chain.js b/apps/block_scout_web/assets/js/pages/chain.js index df89d92f36..30e982553c 100644 --- a/apps/block_scout_web/assets/js/pages/chain.js +++ b/apps/block_scout_web/assets/js/pages/chain.js @@ -68,10 +68,10 @@ function baseReducer (state = initialState, action) { return Object.assign({}, state, { blocksLoading: false }) } case 'BLOCKS_FETCHED': { - return Object.assign({}, state, { blocks: [...action.msg.blocks] }) + return Object.assign({}, state, { blocks: [...action.msg.blocks], blocksLoading: false }) } case 'BLOCKS_REQUEST_ERROR': { - return Object.assign({}, state, { blocksError: true }) + return Object.assign({}, state, { blocksError: true, blocksLoading: false }) } case 'RECEIVED_NEW_EXCHANGE_RATE': { return Object.assign({}, state, { diff --git a/apps/block_scout_web/assets/static/images/errors-img/pic-404.svg b/apps/block_scout_web/assets/static/images/errors-img/pic-404.svg new file mode 100644 index 0000000000..0b4e8a594c --- /dev/null +++ b/apps/block_scout_web/assets/static/images/errors-img/pic-404.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/block_scout_web/lib/block_scout_web/controller.ex b/apps/block_scout_web/lib/block_scout_web/controller.ex index cf545f5260..38f28be0c6 100644 --- a/apps/block_scout_web/lib/block_scout_web/controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controller.ex @@ -20,8 +20,9 @@ defmodule BlockScoutWeb.Controller do def unprocessable_entity(conn) do conn |> put_status(:unprocessable_entity) - |> put_view(BlockScoutWeb.ErrorView) - |> render("422.html") + |> put_view(BlockScoutWeb.Error422View) + |> render(:index) + |> halt() end @doc """ diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex index 08f35f222c..e57685a41f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex @@ -1,5 +1,5 @@ <%= if @address do %> <%= link to: address_path(BlockScoutWeb.Endpoint, :show, @address), "data-test": "address_hash_link", class: assigns[:class] do %> - <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address: @address, contract: @contract, truncate: assigns[:truncate] %> + <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address: @address, contract: @contract, truncate: assigns[:truncate], use_custom_tooltip: @use_custom_tooltip %> <% end %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex index cad11f8ee6..85e97386a5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex @@ -1,6 +1,10 @@ <%= if name = primary_name(@address) do %> - <%= name %> (<%= short_hash(@address) %>...) + <%= if @use_custom_tooltip == true do %> + <%= name %> (<%= short_hash(@address) %>...) + <% else %> + <%= name %> (<%= short_hash(@address) %>...) + <% end %> <% else %> <%= if assigns[:truncate] do %> <%= BlockScoutWeb.AddressView.trimmed_hash(@address.hash) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex index 544fef63b3..143376a22a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex @@ -39,7 +39,8 @@ <%= render BlockScoutWeb.AddressView, "_link.html", address: @block.miner, - contract: false %> + contract: false, + use_custom_tooltip: false %> <%= if show_reward?(@block.rewards) do %>
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 c2774ce4bd..f26167fa7e 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 @@ -124,7 +124,7 @@

<%= gettext "Miner" %>

- Validator's Name + <%= @block.miner %>

@@ -132,7 +132,8 @@ "_link.html", address: @block.miner, contract: false, - class: "" %> + class: "", + use_custom_tooltip: true %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex index 0c86c88131..75f96d8c69 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex @@ -16,7 +16,8 @@ <%= render BlockScoutWeb.AddressView, "_link.html", address: @block.miner, - contract: false %> + contract: false, + use_custom_tooltip: false %> <%= if BlockScoutWeb.BlockView.show_reward?(@block.rewards) do %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex index cb42c2c338..df3c6728b1 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex @@ -91,49 +91,49 @@ <%= gettext "Something went wrong, click to reload." %> -