remove "warm" sorting

master
Aevann1 2022-07-13 19:32:31 +02:00
parent b2de11cb1a
commit 5fb6bd86f9
4 changed files with 3 additions and 5 deletions

View File

@ -120,7 +120,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
if request.host == 'rdrama.net': num = 5
else: num = 0.5
if sort in ("hot","warm"):
if sort == 'hot':
ti = int(time.time()) + 3600
if SITE == 'watchpeopledie.co':
posts = posts.order_by(-1000000*(Submission.upvotes - Submission.downvotes + 1 + Submission.comment_count/num)/(func.power(((ti - Submission.created_utc)/1000), 1.23)), Submission.created_utc.desc())

View File

@ -237,7 +237,7 @@ def settings_profile_post(v):
defaultsorting = request.values.get("defaultsorting")
if defaultsorting:
if defaultsorting in {"hot", "warm", "bump", "new", "old", "comments", "controversial", "top", "bottom"}:
if defaultsorting in {"hot", "bump", "new", "old", "comments", "controversial", "top", "bottom"}:
v.defaultsorting = defaultsorting
updated = True
else: abort(400)

View File

@ -78,7 +78,6 @@
<div class="dropdown dropdown-actions ml-2">
<button class="btn btn-secondary dropdown-toggle smol-fp" type="button" id="dropdownMenuButton2" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if sort=="hot" %}<i class="fas fa-fire mr-2 "></i>{% endif %}
{% if sort=="warm" %}<i class="fas fa-fire mr-2 "></i>{% endif %}
{% if sort=="bump" %}<i class="fas fa-arrow-up mr-2 "></i>{% endif %}
{% if sort=="top" %}<i class="fas fa-arrow-alt-circle-up mr-2 "></i>{% endif %}
{% if sort=="bottom" %}<i class="fas fa-arrow-alt-circle-down mr-2 "></i>{% endif %}
@ -90,7 +89,6 @@
</button>
<div class="dropdown-menu smol-fp" aria-labelledby="dropdownMenuButton2" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px;">
{% if sort != "hot" %}<a class="dropdown-item" href="?sort=hot&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-fire mr-2 "></i>Hot</a>{% endif %}
{% if sort != "warm" %}<a class="dropdown-item" href="?sort=warm&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-fire mr-2 "></i>Warm</a>{% endif %}
{% if sort != "bump" %}<a class="dropdown-item" href="?sort=bump&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-up mr-2 "></i>Bump</a>{% endif %}
{% if sort != "top" %}<a class="dropdown-item" href="?sort=top&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-alt-circle-up mr-2 "></i>Top</a>{% endif %}
{% if sort != "bottom" %}<a class="dropdown-item" href="?sort=bottom&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-alt-circle-down mr-2 "></i>Bottom</a>{% endif %}

View File

@ -90,7 +90,7 @@
<p>Change the default sorting for posts.</p>
<div class="input-group mb2">
<select autocomplete="off" id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="post_toast(this,'/settings/profile?defaultsorting='+document.getElementById('defaultsorting').value)">
{% for entry in ["hot", "warm", "bump", "new", "old", "top", "bottom", "controversial", "comments"] %}
{% for entry in ["hot", "bump", "new", "old", "top", "bottom", "controversial", "comments"] %}
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
{% endfor %}
</select>