Revert "Add user title coin cost parameter."

This reverts commit dece3fd460.
master
Aevann1 2022-06-13 20:10:53 +02:00
parent 07f2c0d2ca
commit f4aa70cc74
4 changed files with 3 additions and 14 deletions

View File

@ -131,13 +131,11 @@ AGENDAPOSTER_MSG = """Hi @{username},\n\nYour {type} has been automatically remo
PIN_LIMIT = 3
POST_RATE_LIMIT = "1/second;2/minute;10/hour;50/day"
USER_TITLE_COST = 0
HOLE_INACTIVITY_DELETION = False
if SITE in {'rdrama.net','devrama.xyz'}:
HOLE_COST = 50000
HOLE_INACTIVITY_DELETION = True
USER_TITLE_COST = 25
NOTIFICATIONS_ID = 1046
AUTOJANNY_ID = 2360
SNAPPY_ID = 261

View File

@ -55,7 +55,4 @@ def inject_constants():
"CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID,
"PIZZASHILL_ID":PIZZASHILL_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR,
"COLORS":COLORS, "ADMIGGERS":ADMIGGERS, "datetime":datetime, "time":time,
"LOTTERY_ENABLED": LOTTERY_ENABLED,
# Below this line really should be refactored as params to render_template
"USER_TITLE_COST": USER_TITLE_COST,
}
"LOTTERY_ENABLED": LOTTERY_ENABLED}

View File

@ -921,10 +921,6 @@ def settings_title_change(v):
v.customtitle = filter_emojis_only(new_name)
if USER_TITLE_COST and v.coins < USER_TITLE_COST:
return render_template("settings_profile.html", v=v, error=f"Changing flair costs {USER_TITLE_COST} DC.")
v.coins -= USER_TITLE_COST
if len(v.customtitle) < 1000:
g.db.add(v)
g.db.commit()

View File

@ -470,13 +470,11 @@
<form id="profile-settings" action="/settings/title_change" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input maxlength=100 {% if v.flairchanged %}disabled{% endif %} autocomplete="off" id="customtitlebody" type="text" name="title" class="form-control" placeholder='Enter a flair here' value="{% if v.flairchanged %}Your flair has been locked until {{ti}}{% elif USER_TITLE_COST > v.coins %}Need {{USER_TITLE_COST}} DC to change flair!{% elif v.customtitleplain %}{{v.customtitleplain}}{% endif %}">
<input maxlength=100 {% if v.flairchanged %}disabled{% endif %} autocomplete="off" id="customtitlebody" type="text" name="title" class="form-control" placeholder='Enter a flair here' value="{% if v.flairchanged %}Your flair has been locked until {{ti}}{% elif v.customtitleplain %}{{v.customtitleplain}}{% endif %}">
<div class="d-flex mt-2">
<a class="format" role="button"><i class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('customtitlebody')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"></i></a>
&nbsp;&nbsp;&nbsp;
<small>Limit of 100 characters
{%- if USER_TITLE_COST %} — Costs {{USER_TITLE_COST}} DC to change.{% endif -%}
</small>
<small>Limit of 100 characters</small>
<input {% if v.flairchanged %}disabled{% endif %} autocomplete="off" class="btn btn-primary ml-auto" id="titleSave" type="submit" value="Change Flair">
</div>
</form>