From 5b007bb90d851cd4d2324ad11fb87142c6acb8ad Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sat, 22 Apr 2023 23:28:53 -0700 Subject: [PATCH] show donation addresses --- xmrnodes/filters.py | 5 +++++ xmrnodes/static/css/style.css | 10 ++++++++++ xmrnodes/templates/index.html | 8 +++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/xmrnodes/filters.py b/xmrnodes/filters.py index 0378200..82a889b 100644 --- a/xmrnodes/filters.py +++ b/xmrnodes/filters.py @@ -25,3 +25,8 @@ def trim_arg(all_args, arg_to_trim): d = all_args.to_dict() d.pop(arg_to_trim) return urlencode(d) + + +@bp.app_template_filter("seems_legit") +def seems_legit(addy): + return len(addy) == 97 \ No newline at end of file diff --git a/xmrnodes/static/css/style.css b/xmrnodes/static/css/style.css index b69239f..45446ed 100644 --- a/xmrnodes/static/css/style.css +++ b/xmrnodes/static/css/style.css @@ -138,4 +138,14 @@ input[type="text"] { td img { padding-right: .75em; + word-wrap: break-word; } + +.donationAddress { + font-size: .8em; + user-select: all; + color: #ff006e; + display: block; + padding-top: .35em; + word-wrap: break-word; +} \ No newline at end of file diff --git a/xmrnodes/templates/index.html b/xmrnodes/templates/index.html index 6edbb7f..5d0f3c5 100644 --- a/xmrnodes/templates/index.html +++ b/xmrnodes/templates/index.html @@ -108,7 +108,13 @@ {% for node in nodes %} - {% if node.is_tor %}{% endif %}{{ node.url }} + + {% if node.is_tor %}{% endif %} + {{ node.url }} + {% if node.donation_address | seems_legit %} + {{ node.donation_address }} + {% endif %} + {{ node.last_height }} {% if node.available %}