From edc11b4c9664242aca123f3893d0b0d5c500dad0 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Sat, 18 Jan 2025 09:58:06 +0000 Subject: [PATCH] ui: offers responsive ui ui: offers avoid squishing tiles --- basicswap/static/js/pricechart.js | 4 +-- basicswap/templates/offers.html | 43 ++++++++++++++++--------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/basicswap/static/js/pricechart.js b/basicswap/static/js/pricechart.js index d37e533..507250e 100644 --- a/basicswap/static/js/pricechart.js +++ b/basicswap/static/js/pricechart.js @@ -332,7 +332,7 @@ displayCoinData: (coin, data) => { if (coin === 'BTC') { btcPriceDiv.style.display = 'none'; } else { - priceBtcElement.textContent = isError ? 'N/A' : `${priceBTC.toFixed(8)} BTC`; + priceBtcElement.textContent = isError ? 'N/A' : `${priceBTC.toFixed(8)}`; btcPriceDiv.style.display = 'flex'; } } @@ -460,7 +460,7 @@ displayCoinData: (coin, data) => { if (price < 0.001) return price.toFixed(8); if (price < 1) return price.toFixed(4); if (price < 1000) return price.toFixed(2); - return price.toFixed(1); + return price.toFixed(0); }, setActiveContainer: (containerId) => { diff --git a/basicswap/templates/offers.html b/basicswap/templates/offers.html index e68f1b4..79f8815 100644 --- a/basicswap/templates/offers.html +++ b/basicswap/templates/offers.html @@ -25,9 +25,9 @@ function getWebSocketConfig() { {% if sent_offers %} -
+
-
+
  • Home
  • @@ -48,9 +48,9 @@ function getWebSocketConfig() { {% if sent_offers %}
    {% else %} -
    +
    {% endif %} -
    +
    dots-red wave @@ -59,7 +59,7 @@ function getWebSocketConfig() {

    {{ page_type }}

    {{ page_type_description }}

    - @@ -71,11 +71,11 @@ function getWebSocketConfig() { {% if show_chart %} -
    -
    -
    +
    +
    +
    {% set coin_data = { 'BTC': {'name': 'Bitcoin', 'symbol': 'BTC', 'image': 'Bitcoin.png', 'show': true}, 'XMR': {'name': 'Monero', 'symbol': 'XMR', 'image': 'Monero.png', 'show': true}, @@ -192,9 +192,9 @@ 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'] }}

    {{ coin_data[coin_symbol]['name'] }} {% if coin_data[coin_symbol]['symbol'] != coin_data[coin_symbol]['name'] %}({{ coin_data[coin_symbol]['symbol'] }}){% endif %} @@ -213,12 +213,13 @@ function getWebSocketConfig() {

    {% if coin_symbol != 'BTC' %}
    - BTC: + BTC: +
    {% endif %}
    - VOL: -
    + VOL: +
    @@ -233,15 +234,15 @@ function getWebSocketConfig() {
    -
    +
    -
    +
    -
    +
    @@ -334,10 +335,10 @@ function getWebSocketConfig() { -
    +
    -
    +