diff --git a/src/cryptoadvance/specter/templates/node/node_settings.jinja b/src/cryptoadvance/specter/templates/node/node_settings.jinja index 9c7c2b329f..b232dcc4fa 100644 --- a/src/cryptoadvance/specter/templates/node/node_settings.jinja +++ b/src/cryptoadvance/specter/templates/node/node_settings.jinja @@ -116,7 +116,10 @@ {% if node_alias %} {% endif %} - + {% if failed_test %} @@ -234,5 +237,13 @@ } } + const connectBtn = document.getElementById('connect-btn') + const connectText = document.getElementById('connect-text'); + const connectingIndicator = document.getElementById('connecting-indicator') + connectBtn.addEventListener('click', () => { + connectText.classList.add('hidden') + connectingIndicator.classList.remove('hidden') + }) + {% endblock %} diff --git a/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja b/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja index d1c89449b2..8c2f29d003 100644 --- a/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja +++ b/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja @@ -47,6 +47,9 @@ document.getElementById("txt").value = result; }); + // This is needed to access the scanner object from outside of the module + window.scanner = scanner + document.getElementById("scanme").addEventListener("click", function(){ try{ scanner.start(); @@ -83,4 +86,18 @@ }); } }); + + function onCancelOverlay() { + if (window.scanner) { + document.getElementById("popup").style.display = 'none'; + window.scanner.stop(); + } + } + + // Deletes the global scanner property again if there is a reload + window.addEventListener('unload', () => { + if (window.scanner) { + delete window.scanner + } + }) diff --git a/src/cryptoadvance/specter/templates/welcome/components/remaining_remarks.jinja b/src/cryptoadvance/specter/templates/welcome/components/remaining_remarks.jinja index 75a9d80f59..ce7a3b2a58 100644 --- a/src/cryptoadvance/specter/templates/welcome/components/remaining_remarks.jinja +++ b/src/cryptoadvance/specter/templates/welcome/components/remaining_remarks.jinja @@ -1,5 +1,5 @@

{{ _("For more information, take a look at our ") }} - documentation + documentation {{ _(" and ") }} FAQs {{ _(". You can file") }} diff --git a/src/cryptoadvance/specterext/spectrum/templates/spectrum/index.jinja b/src/cryptoadvance/specterext/spectrum/templates/spectrum/index.jinja index fd019ddd60..660e2ce35e 100644 --- a/src/cryptoadvance/specterext/spectrum/templates/spectrum/index.jinja +++ b/src/cryptoadvance/specterext/spectrum/templates/spectrum/index.jinja @@ -58,7 +58,10 @@ {% if node_is_available %} {% endif %} - + {% endblock %} @@ -107,5 +110,14 @@ this.elec_option_list.addEventListener('click', (event) => { this.showElecOption("list") }); + + const connectBtn = document.getElementById('connect-btn') + const connectText = document.getElementById('connect-text'); + const connectingIndicator = document.getElementById('connecting-indicator') + connectBtn.addEventListener('click', () => { + connectText.classList.add('hidden') + connectingIndicator.classList.remove('hidden') + }) + {% endblock %} diff --git a/src/cryptoadvance/specterext/spectrum/templates/spectrum/spectrum_setup.jinja b/src/cryptoadvance/specterext/spectrum/templates/spectrum/spectrum_setup.jinja index 98c3ee5850..650fab8b11 100644 --- a/src/cryptoadvance/specterext/spectrum/templates/spectrum/spectrum_setup.jinja +++ b/src/cryptoadvance/specterext/spectrum/templates/spectrum/spectrum_setup.jinja @@ -50,10 +50,12 @@ {% endblock %}