forked from MarseyWorld/MarseyWorld
constantify TRUESCORE_DONATE_LIMIT
parent
5af772c1f9
commit
23883c530b
|
@ -333,6 +333,7 @@ COMMENT_MAX_DEPTH = 200
|
|||
TRANSFER_MESSAGE_LENGTH_LIMIT = 200 # do not make larger than 10000 characters (comment limit) without altering the table
|
||||
MIN_REPOST_CHECK_URL_LENGTH = 9 # also change the constant in checkRepost() of submit.js
|
||||
ADMIN_PING_TRUESCORE_MINIMUM = 500
|
||||
TRUESCORE_DONATE_LIMIT = 100
|
||||
|
||||
LOGGEDIN_ACTIVE_TIME = 15 * 60
|
||||
PFP_DEFAULT_MARSEY = True
|
||||
|
|
|
@ -52,4 +52,5 @@ def inject_constants():
|
|||
"EMAIL_REGEX_PATTERN":EMAIL_REGEX_PATTERN,
|
||||
"CONTENT_SECURITY_POLICY_DEFAULT":CONTENT_SECURITY_POLICY_DEFAULT,
|
||||
"CONTENT_SECURITY_POLICY_HOME":CONTENT_SECURITY_POLICY_HOME,
|
||||
"TRUESCORE_DONATE_LIMIT":TRUESCORE_DONATE_LIMIT,
|
||||
}
|
||||
|
|
|
@ -413,7 +413,7 @@ if not os.path.exists(f'files/templates/donate_{SITE_NAME}.html'):
|
|||
@app.get('/donate')
|
||||
@auth_required
|
||||
def donate(v):
|
||||
if v.truecoins < 1000: abort(404)
|
||||
if v.truecoins < TRUESCORE_DONATE_LIMIT: abort(404)
|
||||
return render_template(f'donate_{SITE_NAME}.html', v=v)
|
||||
|
||||
|
||||
|
|
|
@ -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 >= 1000 %}
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
<a class="dropdown-item" rel="nofollow noopener" href="/donate"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
|
||||
{% endif %}
|
||||
|
||||
|
@ -298,7 +298,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 >= 1000 %}
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
<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 %}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
<div class="footer">
|
||||
<div class="d-flex">
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= 1000 %}
|
||||
{% if FEATURES['PROCOINS'] and v.truecoins >= TRUESCORE_DONATE_LIMIT %}
|
||||
{% if KOFI_TOKEN %}
|
||||
<button type="button" class="btn btn-success" onclick="post_toast(this,'/settings/kofi')">Claim {{patron}} rewards</button>
|
||||
{% else %}
|
||||
|
@ -57,7 +57,7 @@
|
|||
<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 >= 1000 %}
|
||||
{% 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 KOFI_TOKEN %}
|
||||
<a rel="nofollow noopener" class="text-primary" href="{{KOFI_LINK}}">Kofi</a>
|
||||
|
|
Loading…
Reference in New Issue