forked from MarseyWorld/MarseyWorld
changes to donation flow
parent
6778ef14ad
commit
aec5f96a7b
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
<div class="overflow-x-auto">
|
||||
<table class="table table-striped mb-5">
|
||||
<tbody>
|
||||
{% if v and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
<tr>
|
||||
<td>Kofi</td>
|
||||
<td><a rel="nofollow noopener" href="{{KOFI_LINK}}">{{KOFI_LINK}}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>Ethereum/Brave Attention Token</td>
|
||||
<td>0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea</td>
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
<div class="overflow-x-auto">
|
||||
<table class="table table-striped mb-5">
|
||||
<tbody>
|
||||
{% if v and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
<tr>
|
||||
<td>Gumroad</td>
|
||||
<td><a rel="nofollow noopener" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>Ethereum/Brave Attention Token</td>
|
||||
<td>0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea</td>
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
<div class="px-2">
|
||||
<a class="dropdown-item" href="{{v.url}}"><i class="fas fa-user-circle fa-fw mr-3"></i>My profile</a>
|
||||
<a class="dropdown-item" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
{% if FEATURES['PROCOINS'] %}
|
||||
<a class="dropdown-item" rel="nofollow noopener" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
|
||||
{% endif %}
|
||||
|
||||
|
@ -267,6 +267,9 @@
|
|||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item d-flex align-items-center justify-content-center mx-1 mr-2">
|
||||
<a class="btn btn-primary" href="/logged_out/donate">Donate</a>
|
||||
</li>
|
||||
<li class="nav-item d-flex align-items-center justify-content-center mx-1 mr-2">
|
||||
<a class="btn btn-primary" href="/contact">Contact us</a>
|
||||
</li>
|
||||
|
@ -298,7 +301,7 @@
|
|||
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
||||
</li>
|
||||
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
{% if FEATURES['PROCOINS'] %}
|
||||
<a class="nav-item nav-link" rel="nofollow noopener" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
|
||||
{% endif %}
|
||||
|
||||
|
@ -322,13 +325,19 @@
|
|||
<a rel="nofollow noopener" class="nav-item nav-link" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a>
|
||||
{% endif %}
|
||||
|
||||
{% if SITE_NAME == 'rDrama' %}<a class="nav-item nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>{% endif %}
|
||||
{% if SITE_NAME == 'rDrama' %}
|
||||
<a class="nav-item nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>
|
||||
{% endif %}
|
||||
|
||||
<a class="nav-item nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>
|
||||
|
||||
<li class="nav-item border-top border-bottom mt-2 pt-2">
|
||||
<button type="button" class="nav-link" onclick="postToast(this,'/logout', true)"><i class="fas fa-sign-out fa-fw mr-3 text-danger"></i>Log out</button>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item d-flex align-items-center justify-content-center pb-3">
|
||||
<a class="btn btn-primary btn-block" href="/logged_out/donate">Donate</a>
|
||||
</li>
|
||||
<li class="nav-item d-flex align-items-center justify-content-center pb-3">
|
||||
<a class="btn btn-primary btn-block" href="/contact">Contact us</a>
|
||||
</li>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
<div class="footer">
|
||||
<div class="d-flex">
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
{% if FEATURES['PROCOINS'] %}
|
||||
{% if KOFI_TOKEN %}
|
||||
<button type="button" class="btn btn-success" onclick="postToast(this,'/settings/kofi')">Claim {{patron}} rewards</button>
|
||||
{% else %}
|
||||
|
@ -57,13 +57,16 @@
|
|||
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Add email">
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
<span class="text-small text-muted pl-1">Must be same email as the one you used to donate on
|
||||
{% if FEATURES['PROCOINS'] %}
|
||||
<span class="text-small text-muted pl-1">Must be same email as the one you used to donate
|
||||
{% if v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
on
|
||||
{% if KOFI_TOKEN %}
|
||||
<a rel="nofollow noopener" class="text-primary" href="{{KOFI_LINK}}">Kofi</a>
|
||||
{% else %}
|
||||
<a rel="nofollow noopener" class="text-primary" href="{{GUMROAD_LINK}}">Gumroad</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue