From 3f8012f0d0e4946e858814de34cfa33305100e8e Mon Sep 17 00:00:00 2001 From: gerlofvanek Date: Mon, 6 Jan 2025 19:06:14 +0100 Subject: [PATCH 1/2] doge: Fix images + coin tiles layout. --- .../images/coins/{Doge-20.png => Dogecoin-20.png} | Bin .../static/images/coins/{Doge.png => Dogecoin.png} | Bin basicswap/templates/offers.html | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename basicswap/static/images/coins/{Doge-20.png => Dogecoin-20.png} (100%) rename basicswap/static/images/coins/{Doge.png => Dogecoin.png} (100%) diff --git a/basicswap/static/images/coins/Doge-20.png b/basicswap/static/images/coins/Dogecoin-20.png similarity index 100% rename from basicswap/static/images/coins/Doge-20.png rename to basicswap/static/images/coins/Dogecoin-20.png diff --git a/basicswap/static/images/coins/Doge.png b/basicswap/static/images/coins/Dogecoin.png similarity index 100% rename from basicswap/static/images/coins/Doge.png rename to basicswap/static/images/coins/Dogecoin.png diff --git a/basicswap/templates/offers.html b/basicswap/templates/offers.html index d48cacb..4b663de 100644 --- a/basicswap/templates/offers.html +++ b/basicswap/templates/offers.html @@ -170,7 +170,7 @@ function getWebSocketConfig() { 'PIVX': {'name': 'PIVX', 'symbol': 'PIVX', 'image': 'PIVX.png', 'show': true}, 'DASH': {'name': 'Dash', 'symbol': 'DASH', 'image': 'Dash.png', 'show': true}, 'ETH': {'name': 'Ethereum', 'symbol': 'ETH', 'image': 'Ethereum.png', 'show': false}, - 'DOGE': {'name': 'Dogecoin', 'symbol': 'DOGE', 'image': 'Doge.png', 'show': true}, + 'DOGE': {'name': 'Dogecoin', 'symbol': 'DOGE', 'image': 'Dogecoin.png', 'show': true}, 'DCR': {'name': 'Decred', 'symbol': 'DCR', 'image': 'Decred.png', 'show': true}, 'ZANO': {'name': 'Zano', 'symbol': 'ZANO', 'image': 'Zano.png', 'show': false}, 'WOW': {'name': 'Wownero', 'symbol': 'WOW', 'image': 'Wownero.png', 'show': true} @@ -192,7 +192,7 @@ function getWebSocketConfig() { {% for coin_symbol in custom_order %} {% if coin_symbol in display_coins and coin_data[coin_symbol]['show'] %} -
+
{{ coin_data[coin_symbol]['name'] }} From 80dbbd3d125441e8d9642860258864aa331916be Mon Sep 17 00:00:00 2001 From: gerlofvanek Date: Mon, 6 Jan 2025 20:37:33 +0100 Subject: [PATCH 2/2] Fix Swap Type select for Doge + UI update for Get Rate Inferred. --- basicswap/templates/offer_new_1.html | 348 ++++++++++++++------------- 1 file changed, 185 insertions(+), 163 deletions(-) diff --git a/basicswap/templates/offer_new_1.html b/basicswap/templates/offer_new_1.html index e85d32c..2b2c309 100644 --- a/basicswap/templates/offer_new_1.html +++ b/basicswap/templates/offer_new_1.html @@ -283,15 +283,15 @@ if (document.readyState === 'loading') {
-

Rate

-
-
- {{ select_rate_svg | safe }} -
- -
-
- Get Rate Inferred: +

Rate

+
+
+
+ {{ select_rate_svg | safe }} +
+ +
+
@@ -306,7 +306,6 @@ if (document.readyState === 'loading') {
- {% if debug_mode == true %}
@@ -414,181 +413,204 @@ if (document.readyState === 'loading') {
- + xhr_rate.open('POST', '/json/rate'); + xhr_rate.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xhr_rate.send(params); +} + +document.addEventListener("DOMContentLoaded", function() { + const coin_from = document.getElementById('coin_from').value; + const coin_to = document.getElementById('coin_to').value; + const swap_type = document.getElementById('swap_type'); + set_swap_type_enabled(coin_from, coin_to, swap_type); +}); +
{% include 'footer.html' %}