From 539c97cff5da2e9616312da26f68bac7083e1a74 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 11 Feb 2022 15:34:26 +0300 Subject: [PATCH] Merge pull request #5182 from blockscout/vb-fix-staking-dapp Fix Staking Dapp styles --- CHANGELOG.md | 2 +- .../block_scout_web/assets/js/pages/stakes.js | 2 -- apps/block_scout_web/assets/package-lock.json | 5 ++-- apps/block_scout_web/assets/webpack.config.js | 1 + .../templates/layout/app.html.eex | 30 +++++++++++-------- .../lib/block_scout_web/views/stakes_view.ex | 4 --- apps/block_scout_web/priv/gettext/default.pot | 18 +++++------ .../priv/gettext/en/LC_MESSAGES/default.po | 18 +++++------ 8 files changed, 41 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4731dd972b..50f08fe203e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,10 @@ - [#4690](https://github.com/blockscout/blockscout/pull/4690) - Improve pagination: introduce pagination with random access to pages; Integrate it to the Transactions List page ### Fixes +- [#5172](https://github.com/blockscout/blockscout/pull/5172), [#5182](https://github.com/blockscout/blockscout/pull/5182) - Reduced the size of js bundles - [#5160](https://github.com/blockscout/blockscout/pull/5160) - Fix blocks validated hint - [#5155](https://github.com/blockscout/blockscout/pull/5155) - Fix get_implementation_abi_from_proxy/2 implementation - [#5154](https://github.com/blockscout/blockscout/pull/5154) - Fix token counters bug -- [#4701](https://github.com/blockscout/blockscout/pull/4701) - Reduced the size of js bundles ### Chore - [#5171](https://github.com/blockscout/blockscout/pull/5171) - Replace lodash NPM package with tiny lodash modules diff --git a/apps/block_scout_web/assets/js/pages/stakes.js b/apps/block_scout_web/assets/js/pages/stakes.js index 88e0977f328f..7dd1a94bde55 100644 --- a/apps/block_scout_web/assets/js/pages/stakes.js +++ b/apps/block_scout_web/assets/js/pages/stakes.js @@ -1,5 +1,3 @@ -import '../../css/stakes.scss' - import $ from 'jquery' import _ from 'lodash' import { subscribeChannel } from '../socket' diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 1881d2af2500..44d5b9163f77 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -95,10 +95,11 @@ } }, "../../../deps/phoenix": { - "version": "0.0.1" + "version": "1.5.13", + "license": "MIT" }, "../../../deps/phoenix_html": { - "version": "0.0.1" + "version": "2.14.3" }, "node_modules/@babel/code-frame": { "version": "7.16.7", diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 92866fe2ada5..78e98b9328f0 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -90,6 +90,7 @@ const appJs = 'async-listing-load': './js/lib/async_listing_load', 'non-critical': './css/non-critical.scss', 'main-page': './css/main-page.scss', + 'staking': './css/stakes.scss', 'tokens': './js/pages/token/search.js', 'ad': './js/lib/ad.js', 'text_ad': './js/lib/text_ad.js', diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index ab9a14fa6427..fd5ebf1c02c3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -5,19 +5,25 @@ - <%= if @view_module == Elixir.BlockScoutWeb.ChainView do %> - "> - " as="script"> - " as="script"> - " as="image" crossorigin> - " as="image" crossorigin> - " as="image" crossorigin> - " as="image" crossorigin> - " as="image" crossorigin> - " as="image" crossorigin> - <% else %> - "> + <%= case @view_module do %> + <% Elixir.BlockScoutWeb.ChainView -> %> + "> + " as="script"> + " as="script"> + " as="script"> + <% Elixir.BlockScoutWeb.StakesView -> %> + "> + "> + <% _ -> %> + "> <% end %> + " as="script"> + " as="image" crossorigin> + " as="image" crossorigin> + " as="image" crossorigin> + " as="image" crossorigin> + " as="image" crossorigin> + " as="image" crossorigin> " as="style" onload="this.onload=null;this.rel='stylesheet'"> "> <%= render_existing(@view_module, "styles.html", assigns) %> diff --git a/apps/block_scout_web/lib/block_scout_web/views/stakes_view.ex b/apps/block_scout_web/lib/block_scout_web/views/stakes_view.ex index e8441515455e..d11c854a472a 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/stakes_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/stakes_view.ex @@ -2,8 +2,4 @@ defmodule BlockScoutWeb.StakesView do use BlockScoutWeb, :view import BlockScoutWeb.StakesHelpers alias Explorer.Chain - - def render("styles.html", _) do - ~E() - end end diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 40497e23bdc9..41e87efd8064 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -99,7 +99,7 @@ msgid "(query)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:183 +#: lib/block_scout_web/templates/layout/app.html.eex:189 msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -368,7 +368,7 @@ msgid "Block Height" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:40 +#: lib/block_scout_web/templates/layout/app.html.eex:46 msgid "Block Mined, awaiting import..." msgstr "" @@ -414,7 +414,7 @@ msgid "Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:39 +#: lib/block_scout_web/templates/layout/app.html.eex:45 msgid "Blocks Indexed" msgstr "" @@ -1105,7 +1105,7 @@ msgstr "" #: lib/block_scout_web/templates/address/index.html.eex:5 lib/block_scout_web/templates/address/overview.html.eex:180 #: lib/block_scout_web/templates/block/overview.html.eex:209 lib/block_scout_web/templates/internal_transaction/_tile.html.eex:20 #: lib/block_scout_web/templates/layout/_topnav.html.eex:89 lib/block_scout_web/templates/layout/_topnav.html.eex:110 -#: lib/block_scout_web/templates/layout/app.html.eex:45 lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 +#: lib/block_scout_web/templates/layout/app.html.eex:51 lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_tile.html.eex:37 lib/block_scout_web/templates/transaction/overview.html.eex:411 #: lib/block_scout_web/views/wei_helpers.ex:78 msgid "Ether" @@ -1331,7 +1331,7 @@ msgid "Indexed?" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:41 +#: lib/block_scout_web/templates/layout/app.html.eex:47 msgid "Indexing Tokens" msgstr "" @@ -1390,7 +1390,7 @@ msgid "Last Balance Update" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:42 +#: lib/block_scout_web/templates/layout/app.html.eex:48 msgid "Less than" msgstr "" @@ -1498,7 +1498,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:61 -#: lib/block_scout_web/templates/layout/app.html.eex:43 lib/block_scout_web/templates/tokens/overview/_details.html.eex:98 +#: lib/block_scout_web/templates/layout/app.html.eex:49 lib/block_scout_web/templates/tokens/overview/_details.html.eex:98 #: lib/block_scout_web/views/address_view.ex:142 msgid "Market Cap" msgstr "" @@ -1843,7 +1843,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:41 -#: lib/block_scout_web/templates/layout/app.html.eex:44 lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 +#: lib/block_scout_web/templates/layout/app.html.eex:50 lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 msgid "Price" msgstr "" @@ -2775,7 +2775,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:92 -#: lib/block_scout_web/templates/layout/app.html.eex:46 +#: lib/block_scout_web/templates/layout/app.html.eex:52 msgid "Tx/day" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 17375410f77e..699189463007 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -99,7 +99,7 @@ msgid "(query)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:183 +#: lib/block_scout_web/templates/layout/app.html.eex:189 msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -368,7 +368,7 @@ msgid "Block Height" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:40 +#: lib/block_scout_web/templates/layout/app.html.eex:46 msgid "Block Mined, awaiting import..." msgstr "" @@ -414,7 +414,7 @@ msgid "Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:39 +#: lib/block_scout_web/templates/layout/app.html.eex:45 msgid "Blocks Indexed" msgstr "" @@ -1105,7 +1105,7 @@ msgstr "" #: lib/block_scout_web/templates/address/index.html.eex:5 lib/block_scout_web/templates/address/overview.html.eex:180 #: lib/block_scout_web/templates/block/overview.html.eex:209 lib/block_scout_web/templates/internal_transaction/_tile.html.eex:20 #: lib/block_scout_web/templates/layout/_topnav.html.eex:89 lib/block_scout_web/templates/layout/_topnav.html.eex:110 -#: lib/block_scout_web/templates/layout/app.html.eex:45 lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 +#: lib/block_scout_web/templates/layout/app.html.eex:51 lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_tile.html.eex:37 lib/block_scout_web/templates/transaction/overview.html.eex:411 #: lib/block_scout_web/views/wei_helpers.ex:78 msgid "Ether" @@ -1331,7 +1331,7 @@ msgid "Indexed?" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:41 +#: lib/block_scout_web/templates/layout/app.html.eex:47 msgid "Indexing Tokens" msgstr "" @@ -1390,7 +1390,7 @@ msgid "Last Balance Update" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:42 +#: lib/block_scout_web/templates/layout/app.html.eex:48 msgid "Less than" msgstr "" @@ -1498,7 +1498,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:61 -#: lib/block_scout_web/templates/layout/app.html.eex:43 lib/block_scout_web/templates/tokens/overview/_details.html.eex:98 +#: lib/block_scout_web/templates/layout/app.html.eex:49 lib/block_scout_web/templates/tokens/overview/_details.html.eex:98 #: lib/block_scout_web/views/address_view.ex:142 msgid "Market Cap" msgstr "" @@ -1843,7 +1843,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:41 -#: lib/block_scout_web/templates/layout/app.html.eex:44 lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 +#: lib/block_scout_web/templates/layout/app.html.eex:50 lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 msgid "Price" msgstr "" @@ -2775,7 +2775,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:92 -#: lib/block_scout_web/templates/layout/app.html.eex:46 +#: lib/block_scout_web/templates/layout/app.html.eex:52 msgid "Tx/day" msgstr ""