From af876fa1663c44fd5ba5335d18374287ba5d1445 Mon Sep 17 00:00:00 2001
From: gerlofvanek
Date: Wed, 2 Aug 2023 17:38:15 +0200
Subject: [PATCH] ui/ux: Update
- Fixed UI (wallet) reseed wallet button styling/footer.
- Fixed (wallet page) coin icon sizes.
- Added BSX version in footer (unlock).
- Added version (Global for all pages) in render_template (http_server.py).
- Added (BSX) in title (header/unlock/error/info).
- Fixed dots dark/light mode (footer).
- Added UX lock Rate / Amount Variable / Rate Variable discriptions (offer_new_1).
---
basicswap/http_server.py | 6 +++--
basicswap/templates/error.html | 2 +-
basicswap/templates/footer.html | 8 +++---
basicswap/templates/header.html | 2 +-
basicswap/templates/index.html | 2 +-
basicswap/templates/info.html | 2 +-
basicswap/templates/offer_new_1.html | 40 +++++++++++++++++++++-------
basicswap/templates/unlock.html | 5 +++-
basicswap/templates/wallet.html | 36 ++++++++++++++++++-------
9 files changed, 73 insertions(+), 30 deletions(-)
diff --git a/basicswap/http_server.py b/basicswap/http_server.py
index 4fe91ec..6681c57 100644
--- a/basicswap/http_server.py
+++ b/basicswap/http_server.py
@@ -131,7 +131,7 @@ class HttpHandler(BaseHTTPRequestHandler):
self.server.last_form_id[name] = form_id
return form_data
- def render_template(self, template, args_dict, status_code=200):
+ def render_template(self, template, args_dict, status_code=200, version=__version__):
swap_client = self.server.swap_client
if swap_client.ws_server:
args_dict['ws_url'] = swap_client.ws_server.url
@@ -175,6 +175,8 @@ class HttpHandler(BaseHTTPRequestHandler):
if self.server.msg_id_counter >= 0x7FFFFFFF:
self.server.msg_id_counter = 0
+ args_dict['version'] = version
+
self.putHeaders(status_code, 'text/html')
return bytes(template.render(
title=self.server.title,
@@ -381,11 +383,11 @@ class HttpHandler(BaseHTTPRequestHandler):
template = env.get_template('index.html')
return self.render_template(template, {
'refresh': 30,
- 'version': __version__,
'summary': summary,
'use_tor_proxy': swap_client.use_tor_proxy
})
+
def page_404(self, url_split):
swap_client = self.server.swap_client
summary = swap_client.getSummary()
diff --git a/basicswap/templates/error.html b/basicswap/templates/error.html
index 620e2e1..84fb999 100644
--- a/basicswap/templates/error.html
+++ b/basicswap/templates/error.html
@@ -3,7 +3,7 @@
- {{ title }}
+ (BSX) BasicSwap - v{{ version }}
{{ title_str }}
diff --git a/basicswap/templates/footer.html b/basicswap/templates/footer.html
index 4c9a491..e52c66b 100644
--- a/basicswap/templates/footer.html
+++ b/basicswap/templates/footer.html
@@ -21,15 +21,15 @@
-
© 2023~
-
{{ title }}
-
GUI 2.0.2
+
© 2023~ (BSX) BasicSwap
+
BSX: v{{ version }}
+
GUI: v2.0.2
Made with
- by TV and CRZ
+
by TV and CRZ
diff --git a/basicswap/templates/header.html b/basicswap/templates/header.html
index 3cea536..c939198 100644
--- a/basicswap/templates/header.html
+++ b/basicswap/templates/header.html
@@ -86,7 +86,7 @@
-
{{ title }}
+
(BSX) BasicSwap - v{{ version }}
diff --git a/basicswap/templates/index.html b/basicswap/templates/index.html
index c55909c..5557e05 100644
--- a/basicswap/templates/index.html
+++ b/basicswap/templates/index.html
@@ -3,7 +3,7 @@
-
BasicSwap version: {{ version }}
+
(BSX) BasicSwap v{{ version }}
Welcome to BasicSwap DEX
Swap cryptocurrencies in total privacy with no middlemen, fees, or restrictions.
diff --git a/basicswap/templates/info.html b/basicswap/templates/info.html
index 620e2e1..84fb999 100644
--- a/basicswap/templates/info.html
+++ b/basicswap/templates/info.html
@@ -3,7 +3,7 @@
-
{{ title }}
+ (BSX) BasicSwap - v{{ version }}
{{ title_str }}
diff --git a/basicswap/templates/offer_new_1.html b/basicswap/templates/offer_new_1.html
index 6c492ec..bd1aae0 100644
--- a/basicswap/templates/offer_new_1.html
+++ b/basicswap/templates/offer_new_1.html
@@ -326,10 +326,17 @@
-
-
- Lock Rate
-
+
+
+
@@ -343,14 +350,27 @@
Options
diff --git a/basicswap/templates/unlock.html b/basicswap/templates/unlock.html
index 115748e..e177863 100644
--- a/basicswap/templates/unlock.html
+++ b/basicswap/templates/unlock.html
@@ -23,7 +23,7 @@
document.documentElement.classList.toggle('dark', isDarkMode);
- {{ title }}
+ (BSX) BasicSwap - v{{ version }}
+
+ {{ title }} - GUI 2.0.2
+
diff --git a/basicswap/templates/wallet.html b/basicswap/templates/wallet.html
index 571fc1b..728a7ae 100644
--- a/basicswap/templates/wallet.html
+++ b/basicswap/templates/wallet.html
@@ -39,7 +39,7 @@
-
+
{{ w.name }} Wallet -
Manage your {{ w.ticker }} wallet. {% if refresh %} (Page Refresh: {{ refresh }} seconds) {% endif %}
@@ -206,15 +206,33 @@
-
-
+
+
+
+
+
+
+
{% else %}
{% if w.cid == '1' %}