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')
|
copyfile(f'files/templates/donate_rDrama.html', f'files/templates/donate_{SITE_NAME}.html')
|
||||||
|
|
||||||
@app.get('/donate')
|
@app.get('/donate')
|
||||||
@auth_required
|
@app.get('/logged_out/donate')
|
||||||
|
@auth_desired_with_logingate
|
||||||
def donate(v):
|
def donate(v):
|
||||||
if v.truecoins < TRUESCORE_DONATE_LIMIT: abort(404)
|
|
||||||
return render_template(f'donate_{SITE_NAME}.html', v=v)
|
return render_template(f'donate_{SITE_NAME}.html', v=v)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,12 @@
|
||||||
<div class="overflow-x-auto">
|
<div class="overflow-x-auto">
|
||||||
<table class="table table-striped mb-5">
|
<table class="table table-striped mb-5">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
{% if v and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||||
<td>Kofi</td>
|
<tr>
|
||||||
<td><a rel="nofollow noopener" href="{{KOFI_LINK}}">{{KOFI_LINK}}</a></td>
|
<td>Kofi</td>
|
||||||
</tr>
|
<td><a rel="nofollow noopener" href="{{KOFI_LINK}}">{{KOFI_LINK}}</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Ethereum/Brave Attention Token</td>
|
<td>Ethereum/Brave Attention Token</td>
|
||||||
<td>0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea</td>
|
<td>0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea</td>
|
||||||
|
|
|
@ -9,10 +9,12 @@
|
||||||
<div class="overflow-x-auto">
|
<div class="overflow-x-auto">
|
||||||
<table class="table table-striped mb-5">
|
<table class="table table-striped mb-5">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
{% if v and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||||
<td>Gumroad</td>
|
<tr>
|
||||||
<td><a rel="nofollow noopener" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a></td>
|
<td>Gumroad</td>
|
||||||
</tr>
|
<td><a rel="nofollow noopener" href="{{GUMROAD_LINK}}">{{GUMROAD_LINK}}</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Ethereum/Brave Attention Token</td>
|
<td>Ethereum/Brave Attention Token</td>
|
||||||
<td>0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea</td>
|
<td>0xBBf1043A60C6894Db17b3118CA960FFDF84c9eea</td>
|
||||||
|
|
|
@ -238,7 +238,7 @@
|
||||||
<div class="px-2">
|
<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="{{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>
|
<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>
|
<a class="dropdown-item" rel="nofollow noopener" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -260,17 +260,20 @@
|
||||||
|
|
||||||
{% if SITE_NAME == 'rDrama' %}
|
{% if SITE_NAME == 'rDrama' %}
|
||||||
<a class="dropdown-item" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>
|
<a class="dropdown-item" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>
|
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>
|
||||||
<button type="button" class="dropdown-item" onclick="postToast(this,'/logout', true)"><i class="fas fa-sign-out fa-fw mr-3"></i>Log out</button>
|
<button type="button" class="dropdown-item" onclick="postToast(this,'/logout', true)"><i class="fas fa-sign-out fa-fw mr-3"></i>Log out</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% 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">
|
<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>
|
<a class="btn btn-primary" href="/contact">Contact us</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item d-flex align-items-center justify-content-center mx-1">
|
<li class="nav-item d-flex align-items-center justify-content-center mx-1">
|
||||||
<a class="btn btn-primary" href="/login?redirect={{request.path | urlencode}}">Sign in</a>
|
<a class="btn btn-primary" href="/login?redirect={{request.path | urlencode}}">Sign in</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item d-flex align-items-center justify-content-center mx-1">
|
<li class="nav-item d-flex align-items-center justify-content-center mx-1">
|
||||||
|
@ -298,7 +301,7 @@
|
||||||
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
||||||
</li>
|
</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>
|
<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 %}
|
{% 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>
|
<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 %}
|
{% 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>
|
<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">
|
<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>
|
<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>
|
</li>
|
||||||
{% else %}
|
{% 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">
|
<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>
|
<a class="btn btn-primary btn-block" href="/contact">Contact us</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
{% if FEATURES['PROCOINS'] %}
|
||||||
{% if KOFI_TOKEN %}
|
{% if KOFI_TOKEN %}
|
||||||
<button type="button" class="btn btn-success" onclick="postToast(this,'/settings/kofi')">Claim {{patron}} rewards</button>
|
<button type="button" class="btn btn-success" onclick="postToast(this,'/settings/kofi')">Claim {{patron}} rewards</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -57,12 +57,15 @@
|
||||||
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Add email">
|
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Add email">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
{% if FEATURES['PROCOINS'] %}
|
||||||
<span class="text-small text-muted pl-1">Must be same email as the one you used to donate on
|
<span class="text-small text-muted pl-1">Must be same email as the one you used to donate
|
||||||
{% if KOFI_TOKEN %}
|
{% if v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||||
<a rel="nofollow noopener" class="text-primary" href="{{KOFI_LINK}}">Kofi</a>
|
on
|
||||||
{% else %}
|
{% if KOFI_TOKEN %}
|
||||||
<a rel="nofollow noopener" class="text-primary" href="{{GUMROAD_LINK}}">Gumroad</a>
|
<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 %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue