From aec5f96a7b79423abfe9553f8a16191107e55595 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 30 Oct 2022 20:43:06 +0200 Subject: [PATCH] changes to donation flow --- files/routes/static.py | 4 ++-- files/templates/donate_WPD.html | 10 ++++++---- files/templates/donate_rDrama.html | 10 ++++++---- files/templates/header.html | 21 +++++++++++++++------ files/templates/settings_security.html | 17 ++++++++++------- 5 files changed, 39 insertions(+), 23 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 4fd54dc57..cd0392b70 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -411,9 +411,9 @@ if not os.path.exists(f'files/templates/donate_{SITE_NAME}.html'): copyfile(f'files/templates/donate_rDrama.html', f'files/templates/donate_{SITE_NAME}.html') @app.get('/donate') -@auth_required +@app.get('/logged_out/donate') +@auth_desired_with_logingate def donate(v): - if v.truecoins < TRUESCORE_DONATE_LIMIT: abort(404) return render_template(f'donate_{SITE_NAME}.html', v=v) diff --git a/files/templates/donate_WPD.html b/files/templates/donate_WPD.html index d316fa2f2..4089f595e 100644 --- a/files/templates/donate_WPD.html +++ b/files/templates/donate_WPD.html @@ -9,10 +9,12 @@
- - - - + {% if v and v.truecoins >= TRUESCORE_DONATE_LIMIT %} + + + + + {% endif %} diff --git a/files/templates/donate_rDrama.html b/files/templates/donate_rDrama.html index 939d083e8..059b9214b 100644 --- a/files/templates/donate_rDrama.html +++ b/files/templates/donate_rDrama.html @@ -9,10 +9,12 @@
Kofi{{KOFI_LINK}}
Kofi{{KOFI_LINK}}
Ethereum/Brave Attention Token 0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea
- - - - + {% if v and v.truecoins >= TRUESCORE_DONATE_LIMIT %} + + + + + {% endif %} diff --git a/files/templates/header.html b/files/templates/header.html index 9572d7081..1429632be 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -238,7 +238,7 @@
My profile Settings - {% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %} + {% if FEATURES['PROCOINS'] %} Donate {% endif %} @@ -260,17 +260,20 @@ {% if SITE_NAME == 'rDrama' %} Archives - {% endif %} - Contact us + {% endif %} + Contact us
{% else %} + - - {% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %} + {% if FEATURES['PROCOINS'] %} Donate {% endif %} @@ -322,13 +325,19 @@ Telegram Channel {% endif %} - {% if SITE_NAME == 'rDrama' %}Archives{% endif %} + {% if SITE_NAME == 'rDrama' %} + Archives + {% endif %} + Contact us {% else %} + diff --git a/files/templates/settings_security.html b/files/templates/settings_security.html index cb05b18d5..32cf0fc8d 100644 --- a/files/templates/settings_security.html +++ b/files/templates/settings_security.html @@ -44,7 +44,7 @@
Gumroad{{GUMROAD_LINK}}
Gumroad{{GUMROAD_LINK}}
Ethereum/Brave Attention Token 0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea