Fix applying dark forest theme

pull/3333/head
Victor Baranov 4 years ago
parent 02763e06dd
commit feb51ce06f
  1. 18
      apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex
  2. 2
      apps/block_scout_web/priv/gettext/default.pot
  3. 2
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -39,14 +39,16 @@
<% raw_dark_forest_addresses = CustomContractsHelpers.get_raw_dark_forest_addresses_list() %>
<script>
function applyCustomMode() {
const darkForestContractAddressHashes = "<%= raw_dark_forest_addresses %>".split(',').map(hash => hash.toLowerCase())
darkForestContractAddressHashes.forEach(darkForestContractAddressHash => {
if (window.location.pathname.toLowerCase().includes(darkForestContractAddressHash)) {
document.body.className += " " + "dark-forest-theme-applied";
return;
}
})
const darkForestContractAddressHashesRaw = "<%= raw_dark_forest_addresses %>"
if (darkForestContractAddressHashesRaw !== "") {
const darkForestContractAddressHashes = darkForestContractAddressHashesRaw.split(',').map(hash => hash.toLowerCase())
darkForestContractAddressHashes.forEach(darkForestContractAddressHash => {
if (window.location.pathname.toLowerCase().includes(darkForestContractAddressHash)) {
document.body.className += " " + "dark-forest-theme-applied";
return;
}
})
}
}
function applyDarkMode() {
if (localStorage.getItem("current-color-mode") === "dark") {

@ -72,7 +72,7 @@ msgid "(query)"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:68
#: lib/block_scout_web/templates/layout/app.html.eex:70
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr ""

@ -72,7 +72,7 @@ msgid "(query)"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:68
#: lib/block_scout_web/templates/layout/app.html.eex:70
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr ""

Loading…
Cancel
Save