diff --git a/CHANGELOG.md b/CHANGELOG.md index eeffb4bc12..128e10fcbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - [#2403](https://github.com/poanetwork/blockscout/pull/2403) - Return gasPrice field at the result of gettxinfo method ### Fixes +- [#2543](https://github.com/poanetwork/blockscout/pull/2543) - do not hide search input during logs search - [#2524](https://github.com/poanetwork/blockscout/pull/2524) - fix dark theme validator data styles - [#2532](https://github.com/poanetwork/blockscout/pull/2532) - don't show empty token transfers on the transaction overview page - [#2528](https://github.com/poanetwork/blockscout/pull/2528) - fix coin history chart data @@ -18,6 +19,7 @@ - [#2519](https://github.com/poanetwork/blockscout/pull/2519) - enable `First` page button in pagination - [#2517](https://github.com/poanetwork/blockscout/pull/2517) - remove duplicate indexes - [#2515](https://github.com/poanetwork/blockscout/pull/2515) - do not aggregate NFT token transfers +- [#2514](https://github.com/poanetwork/blockscout/pull/2514) - Isolating of staking dapp css && extracting of non-critical css - [#2512](https://github.com/poanetwork/blockscout/pull/2512) - alert link fix - [#2508](https://github.com/poanetwork/blockscout/pull/2508) - logs view columns fix - [#2506](https://github.com/poanetwork/blockscout/pull/2506) - fix two active tab in the top menu diff --git a/apps/block_scout_web/assets/css/app.scss b/apps/block_scout_web/assets/css/app.scss index e91df91740..0e7d98f656 100644 --- a/apps/block_scout_web/assets/css/app.scss +++ b/apps/block_scout_web/assets/css/app.scss @@ -24,7 +24,6 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "node_modules/bootstrap/scss/reboot"; @import "node_modules/bootstrap/scss/grid"; @import "node_modules/bootstrap/scss/code"; -@import "node_modules/bootstrap/scss/modal"; @import "node_modules/bootstrap/scss/close"; @import "node_modules/bootstrap/scss/buttons"; @import "node_modules/bootstrap/scss/forms"; @@ -50,7 +49,6 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "node_modules/bootstrap/scss/navbar"; @import "node_modules/bootstrap/scss/pagination"; @import "node_modules/bootstrap/scss/tables"; -@import "node_modules/bootstrap/scss/tooltip"; @import "node_modules/bootstrap/scss/transitions"; // Code highlight @@ -75,8 +73,11 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "components/filter"; @import "components/button"; @import "components/table"; -@import "components/qr-code"; @import "components/navbar"; +@import "components/alerts"; + +@import "theme/dark-theme"; + @import "components/animations"; @import "components/card"; @import "components/tile"; @@ -93,42 +94,30 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "components/transaction-input"; @import "components/coin-balance-tile"; @import "components/highlight"; -@import "components/copy_icon"; @import "components/btn_full"; @import "components/btn_line"; -@import "components/stakes"; @import "components/check"; +@import "components/stakes_variables"; @import "components/stakes_table"; @import "components/i_tooltip"; @import "components/check_tooltip"; @import "components/tooltip"; -@import "components/progress_from_to"; -@import "components/stakes_empty_content"; -@import "components/stakes_btn_remove_pool"; -@import "components/modal"; -@import "components/modal_validator_info"; @import "components/form"; -@import "components/stakes_progress"; -@import "components/modal_status"; -@import "components/modal_bottom_disclaimer"; -@import "components/modal_become_candidate"; -@import "components/modal_stake"; @import "components/btn_copy"; @import "components/btn_qr"; @import "components/btn_address_card"; @import "components/btn_dropdown_line"; @import "components/transaction"; @import "components/api"; -@import "components/alerts"; @import "components/verify_other_explorers"; @import "components/errors"; @import "components/log-search"; @import "components/radio"; +@import "components/modal_variables"; @import "components/network-selector"; @import "components/new_smart_contract"; @import "components/radio_big"; @import "components/btn_no_border"; -@import "theme/dark-theme"; :export { dashboardBannerChartAxisFontColor: $dashboard-banner-chart-axis-font-color; diff --git a/apps/block_scout_web/assets/css/components/_modal.scss b/apps/block_scout_web/assets/css/components/_modal.scss index bc9e16c875..4e70be687c 100644 --- a/apps/block_scout_web/assets/css/components/_modal.scss +++ b/apps/block_scout_web/assets/css/components/_modal.scss @@ -1,9 +1,3 @@ -$modal-overlay-color: rgba($primary, 0.9) !default; -$modal-horizontal-padding: 30px !default; -$modal-vertical-padding: 25px !default; -$modal-border-radius: 10px !default; -$modal-gray-background: #f6f7f9 !default; - .modal-backdrop { background-color: $modal-overlay-color; diff --git a/apps/block_scout_web/assets/css/components/_modal_variables.scss b/apps/block_scout_web/assets/css/components/_modal_variables.scss new file mode 100644 index 0000000000..92e2a94a33 --- /dev/null +++ b/apps/block_scout_web/assets/css/components/_modal_variables.scss @@ -0,0 +1,5 @@ +$modal-overlay-color: rgba($primary, 0.9) !default; +$modal-horizontal-padding: 30px !default; +$modal-vertical-padding: 25px !default; +$modal-border-radius: 10px !default; +$modal-gray-background: #f6f7f9 !default; \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/components/_stakes_variables.scss b/apps/block_scout_web/assets/css/components/_stakes_variables.scss new file mode 100644 index 0000000000..4c23ea421b --- /dev/null +++ b/apps/block_scout_web/assets/css/components/_stakes_variables.scss @@ -0,0 +1,2 @@ +$stakes-banned-background: #fff3f7 !default; +$stakes-banned-color: #ff7986 !default; \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/components/_copy_icon.scss b/apps/block_scout_web/assets/css/components/stakes/_copy_icon.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_copy_icon.scss rename to apps/block_scout_web/assets/css/components/stakes/_copy_icon.scss diff --git a/apps/block_scout_web/assets/css/components/_modal_become_candidate.scss b/apps/block_scout_web/assets/css/components/stakes/_modal_become_candidate.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_modal_become_candidate.scss rename to apps/block_scout_web/assets/css/components/stakes/_modal_become_candidate.scss diff --git a/apps/block_scout_web/assets/css/components/_modal_bottom_disclaimer.scss b/apps/block_scout_web/assets/css/components/stakes/_modal_bottom_disclaimer.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_modal_bottom_disclaimer.scss rename to apps/block_scout_web/assets/css/components/stakes/_modal_bottom_disclaimer.scss diff --git a/apps/block_scout_web/assets/css/components/_modal_stake.scss b/apps/block_scout_web/assets/css/components/stakes/_modal_stake.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_modal_stake.scss rename to apps/block_scout_web/assets/css/components/stakes/_modal_stake.scss diff --git a/apps/block_scout_web/assets/css/components/_modal_validator_info.scss b/apps/block_scout_web/assets/css/components/stakes/_modal_validator_info.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_modal_validator_info.scss rename to apps/block_scout_web/assets/css/components/stakes/_modal_validator_info.scss diff --git a/apps/block_scout_web/assets/css/components/_progress_from_to.scss b/apps/block_scout_web/assets/css/components/stakes/_progress_from_to.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_progress_from_to.scss rename to apps/block_scout_web/assets/css/components/stakes/_progress_from_to.scss diff --git a/apps/block_scout_web/assets/css/components/_stakes.scss b/apps/block_scout_web/assets/css/components/stakes/_stakes.scss similarity index 96% rename from apps/block_scout_web/assets/css/components/_stakes.scss rename to apps/block_scout_web/assets/css/components/stakes/_stakes.scss index 87271bc983..c6335ec066 100644 --- a/apps/block_scout_web/assets/css/components/_stakes.scss +++ b/apps/block_scout_web/assets/css/components/stakes/_stakes.scss @@ -1,8 +1,6 @@ $stakes-dashboard-copy-icon-color: $copy-icon-color !default; $stakes-address-color: $primary !default; $stakes-control-color: $primary !default; -$stakes-banned-color: #ff7986 !default; -$stakes-banned-background: #fff3f7 !default; $stakes-stats-item-color: #fff !default; $stakes-stats-item-border-color: #fff !default; diff --git a/apps/block_scout_web/assets/css/components/_stakes_btn_remove_pool.scss b/apps/block_scout_web/assets/css/components/stakes/_stakes_btn_remove_pool.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_stakes_btn_remove_pool.scss rename to apps/block_scout_web/assets/css/components/stakes/_stakes_btn_remove_pool.scss diff --git a/apps/block_scout_web/assets/css/components/_stakes_empty_content.scss b/apps/block_scout_web/assets/css/components/stakes/_stakes_empty_content.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_stakes_empty_content.scss rename to apps/block_scout_web/assets/css/components/stakes/_stakes_empty_content.scss diff --git a/apps/block_scout_web/assets/css/components/_stakes_progress.scss b/apps/block_scout_web/assets/css/components/stakes/_stakes_progress.scss similarity index 100% rename from apps/block_scout_web/assets/css/components/_stakes_progress.scss rename to apps/block_scout_web/assets/css/components/stakes/_stakes_progress.scss diff --git a/apps/block_scout_web/assets/css/non-critical.scss b/apps/block_scout_web/assets/css/non-critical.scss new file mode 100644 index 0000000000..81d5bd2b09 --- /dev/null +++ b/apps/block_scout_web/assets/css/non-critical.scss @@ -0,0 +1,13 @@ +// Bootstrap Core CSS +@import "node_modules/bootstrap/scss/functions"; +@import "node_modules/bootstrap/scss/mixins"; + +@import "theme/variables"; + +@import "node_modules/bootstrap/scss/modal"; +@import "node_modules/bootstrap/scss/tooltip"; + +@import "components/qr-code"; +@import "components/modal_variables"; +@import "components/modal"; +@import "components/modal_status"; \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/stakes.scss b/apps/block_scout_web/assets/css/stakes.scss new file mode 100644 index 0000000000..77ada07b46 --- /dev/null +++ b/apps/block_scout_web/assets/css/stakes.scss @@ -0,0 +1,20 @@ +@import "./mixins"; + +// Bootstrap Core CSS +@import "node_modules/bootstrap/scss/functions"; +@import "node_modules/bootstrap/scss/mixins"; + +@import "theme/variables"; + +@import "components/stakes_variables"; +@import "components/stakes/copy_icon"; +@import "components/stakes/stakes"; +@import "components/stakes/progress_from_to"; +@import "components/stakes/stakes_empty_content"; +@import "components/stakes/stakes_btn_remove_pool"; +@import "components/modal_variables"; +@import "components/stakes/stakes_progress"; +@import "components/stakes/modal_stake"; +@import "components/stakes/modal_become_candidate"; +@import "components/stakes/modal_validator_info"; +@import "components/stakes/modal_bottom_disclaimer"; \ No newline at end of file diff --git a/apps/block_scout_web/assets/js/pages/address/logs.js b/apps/block_scout_web/assets/js/pages/address/logs.js index 5c9bed9da2..bf0c041b39 100644 --- a/apps/block_scout_web/assets/js/pages/address/logs.js +++ b/apps/block_scout_web/assets/js/pages/address/logs.js @@ -45,7 +45,7 @@ const elements = { }, '[data-search]': { render ($el, state) { - if (state.emptyResponse) { + if (state.emptyResponse && !state.isSearch) { return $el.hide() } diff --git a/apps/block_scout_web/assets/js/pages/stakes.js b/apps/block_scout_web/assets/js/pages/stakes.js new file mode 100644 index 0000000000..dd379d254f --- /dev/null +++ b/apps/block_scout_web/assets/js/pages/stakes.js @@ -0,0 +1 @@ +import '../../css/stakes.scss' diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 05ac405ab0..4bc4862175 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -69,9 +69,13 @@ const awesompleteJs = { const appJs = { - entry: './js/app.js', + entry: { + app: './js/app.js', + stakes: './js/pages/stakes.js', + 'non-critical': './css/non-critical.scss', + }, output: { - filename: 'app.js', + filename: '[name].js', path: path.resolve(__dirname, '../priv/static/js') }, optimization: { @@ -120,7 +124,7 @@ const appJs = }, plugins: [ new MiniCssExtractPlugin({ - filename: '../css/app.css' + filename: '../css/[name].css' }), new CopyWebpackPlugin([{ from: 'static/', to: '../' }]), new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/) 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 6c0281f5c7..d9636bcbe7 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,6 +5,8 @@ "> + + "> "> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index a9ae555cb1..255553f2db 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -62,7 +62,7 @@ msgid "(query)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:36 +#: lib/block_scout_web/templates/layout/app.html.eex:38 msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -157,7 +157,7 @@ msgid "Block Height: %{height}" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:51 +#: lib/block_scout_web/templates/layout/app.html.eex:53 msgid "Block Mined, awaiting import..." msgstr "" @@ -184,7 +184,7 @@ msgid "Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:50 +#: lib/block_scout_web/templates/layout/app.html.eex:52 msgid "Blocks Indexed" msgstr "" @@ -376,7 +376,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_balance_card.html.eex:15 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:21 -#: lib/block_scout_web/templates/layout/app.html.eex:56 +#: lib/block_scout_web/templates/layout/app.html.eex:58 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_tile.html.eex:30 #: lib/block_scout_web/templates/transaction/overview.html.eex:179 @@ -457,7 +457,7 @@ msgid "IN" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:52 +#: lib/block_scout_web/templates/layout/app.html.eex:54 msgid "Indexing Tokens" msgstr "" @@ -489,7 +489,7 @@ msgid "Inventory" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:53 +#: lib/block_scout_web/templates/layout/app.html.eex:55 msgid "Less than" msgstr "" @@ -510,7 +510,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:31 -#: lib/block_scout_web/templates/layout/app.html.eex:54 +#: lib/block_scout_web/templates/layout/app.html.eex:56 #: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121 msgid "Market Cap" @@ -629,7 +629,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:24 -#: lib/block_scout_web/templates/layout/app.html.eex:55 +#: lib/block_scout_web/templates/layout/app.html.eex:57 msgid "Price" 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 2c910e276e..735b716ec4 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 @@ -62,7 +62,7 @@ msgid "(query)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:36 +#: lib/block_scout_web/templates/layout/app.html.eex:38 msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -157,7 +157,7 @@ msgid "Block Height: %{height}" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:51 +#: lib/block_scout_web/templates/layout/app.html.eex:53 msgid "Block Mined, awaiting import..." msgstr "" @@ -184,7 +184,7 @@ msgid "Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:50 +#: lib/block_scout_web/templates/layout/app.html.eex:52 msgid "Blocks Indexed" msgstr "" @@ -376,7 +376,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_balance_card.html.eex:15 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:21 -#: lib/block_scout_web/templates/layout/app.html.eex:56 +#: lib/block_scout_web/templates/layout/app.html.eex:58 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_tile.html.eex:30 #: lib/block_scout_web/templates/transaction/overview.html.eex:179 @@ -457,7 +457,7 @@ msgid "IN" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:52 +#: lib/block_scout_web/templates/layout/app.html.eex:54 msgid "Indexing Tokens" msgstr "" @@ -489,7 +489,7 @@ msgid "Inventory" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:53 +#: lib/block_scout_web/templates/layout/app.html.eex:55 msgid "Less than" msgstr "" @@ -510,7 +510,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:31 -#: lib/block_scout_web/templates/layout/app.html.eex:54 +#: lib/block_scout_web/templates/layout/app.html.eex:56 #: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121 msgid "Market Cap" @@ -629,7 +629,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:24 -#: lib/block_scout_web/templates/layout/app.html.eex:55 +#: lib/block_scout_web/templates/layout/app.html.eex:57 msgid "Price" msgstr ""