Merge pull request #4310 from blockscout/vb-logo-redirect-fix

Fix logo URL redirection, set font-family defaults for chart.js
pull/4314/head
Victor Baranov 3 years ago committed by GitHub
commit b21dfe1ddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 1
      apps/block_scout_web/assets/js/lib/coin_balance_history_chart.js
  3. 6
      apps/block_scout_web/assets/js/lib/history_chart.js
  4. 2
      apps/block_scout_web/assets/js/pages/chain.js
  5. 1
      apps/block_scout_web/assets/js/pages/stakes/utils.js
  6. 8
      apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex
  7. 2
      apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex
  8. 2
      apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex
  9. 30
      apps/block_scout_web/priv/gettext/default.pot
  10. 30
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -10,6 +10,7 @@
- [#4067](https://github.com/blockscout/blockscout/pull/4067) - Display LP tokens USD value and custom metadata in tokens dropdown at address page
### Fixes
- [#4310](https://github.com/blockscout/blockscout/pull/4310) - Fix logo URL redirection, set font-family defaults for chart.js
- [#4308](https://github.com/blockscout/blockscout/pull/4308) - Fix internal server error on contract verification options page
- [#4307](https://github.com/blockscout/blockscout/pull/4307) - Fix for composing IPFS URLs for NFTs images
- [#4306](https://github.com/blockscout/blockscout/pull/4306) - Check token instance images MIME types

@ -3,6 +3,7 @@ import { Chart, Filler, LineController, LineElement, PointElement, LinearScale,
import 'chartjs-adapter-moment'
import humps from 'humps'
Chart.defaults.font.family = 'Nunito, "Helvetica Neue", Arial, sans-serif,"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
Chart.register(Filler, LineController, LineElement, PointElement, LinearScale, TimeScale, Title, Tooltip)
export function createCoinBalanceHistoryChart (el) {

@ -7,6 +7,7 @@ import moment from 'moment'
import { formatUsdValue } from '../lib/currency'
import sassVariables from '../../css/app.scss'
Chart.defaults.font.family = 'Nunito, "Helvetica Neue", Arial, sans-serif,"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
Chart.register(LineController, LineElement, PointElement, LinearScale, TimeScale, Title, Tooltip)
const grid = {
@ -281,16 +282,15 @@ export function createMarketHistoryChart (el) {
break
}
case 'transaction': {
const transactionHistory = JSON.parse(data.history_data)
const txsHistoryData = JSON.parse(data.history_data)
$(el).show()
chart.updateTransactionHistory(transactionHistory)
chart.updateTransactionHistory(txsHistoryData)
break
}
}
})
.fail(() => {
$(el).hide()
$chartError.show()
})
})

@ -172,7 +172,7 @@ const elements = {
load () {
chart = window.dashboardChart
},
render ($el, state, oldState) {
render (_$el, state, oldState) {
if (!chart || (oldState.availableSupply === state.availableSupply && oldState.marketHistoryData === state.marketHistoryData) || !state.availableSupply) return
chart.updateMarketHistory(state.availableSupply, state.marketHistoryData)

@ -2,6 +2,7 @@ import $ from 'jquery'
import { ArcElement, Chart, DoughnutController } from 'chart.js'
import { openErrorModal, openSuccessModal, openWarningModal } from '../../lib/modals'
Chart.defaults.font.family = 'Nunito, "Helvetica Neue", Arial, sans-serif,"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
Chart.register(ArcElement, DoughnutController)
export async function makeContractCall (call, store, gasLimit, callbackFunc) {

@ -9,7 +9,6 @@
<span><%= gettext("There was a problem loading the chart.") %></span>
</button>
<canvas data-chart="historyChart"
data-history_chart_paths=
'{<%= for {{key, value}, x} <- Enum.with_index(@chart_data_paths) do %>
"<%= key %>":"<%= value %>"
@ -17,10 +16,10 @@
,
<% end %>
<% end %>}'
data-history_chart_config = '<%= @chart_config_json %>'
width="350" height="152" style="display: none;"></canvas>
width="350" height="152">
</canvas>
<script data-cfasync="false" src="<%= static_path(@conn, "/js/chart-loader.js") %>"></script>
</div>
<!-- Legend -->
<script>
@ -170,7 +169,6 @@
</div>
</div>
</div>
<script defer data-cfasync="false" src="<%= static_path(@conn, "/js/chart-loader.js") %>"></script>
<script defer data-cfasync="false" src="<%= static_path(@conn, "/js/chain.js") %>"></script>
</div>
<section class="container">

@ -4,7 +4,7 @@
<div class="row footer-logo-row">
<div class="col-md-12">
<%= link to: webapp_url(@conn), class: "footer-brand" do %>
<img class="footer-logo" src="<%= logo_footer() %>" alt="<%= subnetwork_title() %>" />
<img class="footer-logo" src="<%= static_path(@conn, logo_footer()) %>" alt="<%= subnetwork_title() %>" />
<%= if logo_text() do %>
<span class="logo-text footer"> <%= logo_text() %> </span>
<% end %>

@ -12,7 +12,7 @@
</script>
<div class="container-fluid navbar-container">
<%= link to: webapp_url(@conn), class: "navbar-brand", "data-test": "header_logo" do %>
<img class="navbar-logo" id="navbar-logo" src="<%= logo() %>" alt="<%= subnetwork_title() %>" />
<img class="navbar-logo" id="navbar-logo" src="<%= static_path(@conn, logo()) %>" alt="<%= subnetwork_title() %>" />
<%= if logo_text() do %>
<span class="logo-text"> <%= logo_text() %> </span>
<% end %>

@ -152,7 +152,7 @@ msgid "Anything not in this list is not supported. Click on the method to be tak
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:125
#: lib/block_scout_web/templates/chain/show.html.eex:124
msgid "Average block time"
msgstr ""
@ -237,7 +237,7 @@ msgid "BlockScout provides analytics data, API, and Smart Contract tools for the
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:180
#: lib/block_scout_web/templates/chain/show.html.eex:178
#: lib/block_scout_web/templates/layout/_topnav.html.eex:36
#: lib/block_scout_web/templates/layout/_topnav.html.eex:40
msgid "Blocks"
@ -742,7 +742,7 @@ msgid "GraphQL"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:54
#: lib/block_scout_web/templates/chain/show.html.eex:53
#: lib/block_scout_web/views/block_view.ex:20
#: lib/block_scout_web/views/wei_helpers.ex:77
msgid "Gwei"
@ -782,7 +782,7 @@ msgid "Success"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:94
#: lib/block_scout_web/templates/chain/show.html.eex:93
#: lib/block_scout_web/templates/layout/app.html.eex:34
msgid "Tx/day"
msgstr ""
@ -1042,7 +1042,7 @@ msgid "Mainnet"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:63
#: lib/block_scout_web/templates/chain/show.html.eex:62
#: lib/block_scout_web/templates/layout/app.html.eex:31
#: lib/block_scout_web/views/address_view.ex:142
msgid "Market Cap"
@ -1075,7 +1075,7 @@ msgid "More internal transactions have come in"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:241
#: lib/block_scout_web/templates/chain/show.html.eex:239
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:12
#: lib/block_scout_web/templates/transaction/index.html.eex:18
msgid "More transactions have come in"
@ -1180,7 +1180,7 @@ msgid "Potential matches from our contract method database:"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:43
#: lib/block_scout_web/templates/chain/show.html.eex:42
#: lib/block_scout_web/templates/layout/app.html.eex:32
msgid "Price"
msgstr ""
@ -1320,7 +1320,7 @@ msgstr ""
#: lib/block_scout_web/templates/address_transaction/index.html.eex:50
#: lib/block_scout_web/templates/address_validation/index.html.eex:24
#: lib/block_scout_web/templates/block_transaction/index.html.eex:23
#: lib/block_scout_web/templates/chain/show.html.eex:184
#: lib/block_scout_web/templates/chain/show.html.eex:182
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:21
#: lib/block_scout_web/templates/stakes/_table.html.eex:49
#: lib/block_scout_web/templates/tokens/holder/index.html.eex:22
@ -1335,7 +1335,7 @@ msgid "Something went wrong, click to reload."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:247
#: lib/block_scout_web/templates/chain/show.html.eex:245
msgid "Something went wrong, click to retry."
msgstr ""
@ -1464,7 +1464,7 @@ msgid "Total Supply"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:155
#: lib/block_scout_web/templates/chain/show.html.eex:154
msgid "Total blocks"
msgstr ""
@ -1606,12 +1606,12 @@ msgid "Version"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:179
#: lib/block_scout_web/templates/chain/show.html.eex:177
msgid "View All Blocks"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:237
#: lib/block_scout_web/templates/chain/show.html.eex:235
msgid "View All Transactions"
msgstr ""
@ -1653,7 +1653,7 @@ msgid "WEI"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:163
#: lib/block_scout_web/templates/chain/show.html.eex:162
msgid "Wallet addresses"
msgstr ""
@ -1792,7 +1792,7 @@ msgid "Module"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:134
#: lib/block_scout_web/templates/chain/show.html.eex:133
msgid "Total transactions"
msgstr ""
@ -1879,7 +1879,7 @@ msgstr ""
#: lib/block_scout_web/templates/address_transaction/index.html.eex:17
#: lib/block_scout_web/templates/block_transaction/index.html.eex:10
#: lib/block_scout_web/templates/block_transaction/index.html.eex:18
#: lib/block_scout_web/templates/chain/show.html.eex:238
#: lib/block_scout_web/templates/chain/show.html.eex:236
#: lib/block_scout_web/templates/layout/_topnav.html.eex:55
#: lib/block_scout_web/views/address_view.ex:345
msgid "Transactions"

@ -152,7 +152,7 @@ msgid "Anything not in this list is not supported. Click on the method to be tak
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:125
#: lib/block_scout_web/templates/chain/show.html.eex:124
msgid "Average block time"
msgstr ""
@ -237,7 +237,7 @@ msgid "BlockScout provides analytics data, API, and Smart Contract tools for the
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:180
#: lib/block_scout_web/templates/chain/show.html.eex:178
#: lib/block_scout_web/templates/layout/_topnav.html.eex:36
#: lib/block_scout_web/templates/layout/_topnav.html.eex:40
msgid "Blocks"
@ -742,7 +742,7 @@ msgid "GraphQL"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:54
#: lib/block_scout_web/templates/chain/show.html.eex:53
#: lib/block_scout_web/views/block_view.ex:20
#: lib/block_scout_web/views/wei_helpers.ex:77
msgid "Gwei"
@ -782,7 +782,7 @@ msgid "Success"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:94
#: lib/block_scout_web/templates/chain/show.html.eex:93
#: lib/block_scout_web/templates/layout/app.html.eex:34
msgid "Tx/day"
msgstr ""
@ -1042,7 +1042,7 @@ msgid "Mainnet"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:63
#: lib/block_scout_web/templates/chain/show.html.eex:62
#: lib/block_scout_web/templates/layout/app.html.eex:31
#: lib/block_scout_web/views/address_view.ex:142
msgid "Market Cap"
@ -1075,7 +1075,7 @@ msgid "More internal transactions have come in"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:241
#: lib/block_scout_web/templates/chain/show.html.eex:239
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:12
#: lib/block_scout_web/templates/transaction/index.html.eex:18
msgid "More transactions have come in"
@ -1180,7 +1180,7 @@ msgid "Potential matches from our contract method database:"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:43
#: lib/block_scout_web/templates/chain/show.html.eex:42
#: lib/block_scout_web/templates/layout/app.html.eex:32
msgid "Price"
msgstr ""
@ -1320,7 +1320,7 @@ msgstr ""
#: lib/block_scout_web/templates/address_transaction/index.html.eex:50
#: lib/block_scout_web/templates/address_validation/index.html.eex:24
#: lib/block_scout_web/templates/block_transaction/index.html.eex:23
#: lib/block_scout_web/templates/chain/show.html.eex:184
#: lib/block_scout_web/templates/chain/show.html.eex:182
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:21
#: lib/block_scout_web/templates/stakes/_table.html.eex:49
#: lib/block_scout_web/templates/tokens/holder/index.html.eex:22
@ -1335,7 +1335,7 @@ msgid "Something went wrong, click to reload."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:247
#: lib/block_scout_web/templates/chain/show.html.eex:245
msgid "Something went wrong, click to retry."
msgstr ""
@ -1464,7 +1464,7 @@ msgid "Total Supply"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:155
#: lib/block_scout_web/templates/chain/show.html.eex:154
msgid "Total blocks"
msgstr ""
@ -1606,12 +1606,12 @@ msgid "Version"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:179
#: lib/block_scout_web/templates/chain/show.html.eex:177
msgid "View All Blocks"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:237
#: lib/block_scout_web/templates/chain/show.html.eex:235
msgid "View All Transactions"
msgstr ""
@ -1653,7 +1653,7 @@ msgid "WEI"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:163
#: lib/block_scout_web/templates/chain/show.html.eex:162
msgid "Wallet addresses"
msgstr ""
@ -1792,7 +1792,7 @@ msgid "Module"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:134
#: lib/block_scout_web/templates/chain/show.html.eex:133
msgid "Total transactions"
msgstr ""
@ -1879,7 +1879,7 @@ msgstr ""
#: lib/block_scout_web/templates/address_transaction/index.html.eex:17
#: lib/block_scout_web/templates/block_transaction/index.html.eex:10
#: lib/block_scout_web/templates/block_transaction/index.html.eex:18
#: lib/block_scout_web/templates/chain/show.html.eex:238
#: lib/block_scout_web/templates/chain/show.html.eex:236
#: lib/block_scout_web/templates/layout/_topnav.html.eex:55
#: lib/block_scout_web/views/address_view.ex:345
msgid "Transactions"

Loading…
Cancel
Save