From fb72a2ec14a82fcb12a6e680df8d9beefff41d25 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 3 Dec 2020 23:03:06 +0300 Subject: [PATCH] Fix QR code tooltip appearance --- CHANGELOG.md | 1 + apps/block_scout_web/assets/js/lib/loading_element.js | 2 +- apps/block_scout_web/assets/js/lib/modals.js | 5 +++++ apps/block_scout_web/assets/js/pages/address.js | 7 +++++++ apps/block_scout_web/assets/js/pages/token_counters.js | 7 +++++++ apps/block_scout_web/assets/js/pages/verification_form.js | 4 ++-- 6 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ba69a91ce..d0441b6b4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#3462](https://github.com/poanetwork/blockscout/pull/3462) - Display price for bridged tokens ### Fixes +- [#3509](https://github.com/poanetwork/blockscout/pull/3509) - Fix QR code tooltip appearance in mobile view - [#3507](https://github.com/poanetwork/blockscout/pull/3507) - Fix left margin of balance card in mobile view - [#3506](https://github.com/poanetwork/blockscout/pull/3506) - Fix token trasfer's tile styles: prevent overlapping of long names - [#3505](https://github.com/poanetwork/blockscout/pull/3505) - Fix Staking DApp first loading diff --git a/apps/block_scout_web/assets/js/lib/loading_element.js b/apps/block_scout_web/assets/js/lib/loading_element.js index beeecb97ea..532eb1ce50 100644 --- a/apps/block_scout_web/assets/js/lib/loading_element.js +++ b/apps/block_scout_web/assets/js/lib/loading_element.js @@ -1,5 +1,5 @@ import $ from 'jquery' -$('button[data-loading="animation"]').click(event => { +$('button[data-loading="animation"]').click(_event => { $('#loading').removeClass('d-none') }) diff --git a/apps/block_scout_web/assets/js/lib/modals.js b/apps/block_scout_web/assets/js/lib/modals.js index 83c2b3b2d1..97f3c20d59 100644 --- a/apps/block_scout_web/assets/js/lib/modals.js +++ b/apps/block_scout_web/assets/js/lib/modals.js @@ -189,3 +189,8 @@ export function openQuestionModal (title, text, acceptCallback = null, exceptCal openModal($modal) } + +export function openQrModal () { + const $modal = $('#qrModal') + openModal($modal) +} diff --git a/apps/block_scout_web/assets/js/pages/address.js b/apps/block_scout_web/assets/js/pages/address.js index b8b0291232..4fd9ed7404 100644 --- a/apps/block_scout_web/assets/js/pages/address.js +++ b/apps/block_scout_web/assets/js/pages/address.js @@ -10,6 +10,9 @@ import { loadTokenBalanceDropdown } from '../lib/token_balance_dropdown' import '../lib/token_balance_dropdown_search' import '../lib/async_listing_load' import '../app' +import { + openQrModal +} from '../lib/modals' export const initialState = { channelDisconnected: false, @@ -215,4 +218,8 @@ if ($addressDetailsPage.length) { })) loadCounters(store) + + $('.btn-qr-icon').click(_event => { + openQrModal() + }) } diff --git a/apps/block_scout_web/assets/js/pages/token_counters.js b/apps/block_scout_web/assets/js/pages/token_counters.js index 40fd24d95b..8bfc337a39 100644 --- a/apps/block_scout_web/assets/js/pages/token_counters.js +++ b/apps/block_scout_web/assets/js/pages/token_counters.js @@ -4,6 +4,9 @@ import humps from 'humps' import { createStore, connectElements } from '../lib/redux_helpers.js' import '../lib/async_listing_load' import '../app' +import { + openQrModal +} from '../lib/modals' export const initialState = { channelDisconnected: false, @@ -87,3 +90,7 @@ if ($tokenPage.length) { connectElements({ store, elements }) loadCounters(store) } + +$('.btn-qr-icon').click(_event => { + openQrModal() +}) diff --git a/apps/block_scout_web/assets/js/pages/verification_form.js b/apps/block_scout_web/assets/js/pages/verification_form.js index 746d42a54f..947a11bb7d 100644 --- a/apps/block_scout_web/assets/js/pages/verification_form.js +++ b/apps/block_scout_web/assets/js/pages/verification_form.js @@ -49,7 +49,7 @@ const elements = { render ($el, state) { if (state.newForm) { $el.replaceWith(state.newForm) - $('button[data-button-loading="animation"]').click(event => { + $('button[data-button-loading="animation"]').click(_event => { $('#loading').removeClass('d-none') }) @@ -131,7 +131,7 @@ if ($contractVerificationPage.length) { msg: humps.camelizeKeys(msg) })) - $('button[data-button-loading="animation"]').click(event => { + $('button[data-button-loading="animation"]').click(_event => { $('#loading').removeClass('d-none') })