WPD: disable cosmetic awards on distinguished posts.

remotes/1693045480750635534/spooky-22
Snakes 2022-08-30 23:18:59 -04:00
parent 3d6a541723
commit 6acf4ff569
Signed by: Snakes
GPG Key ID: E745A82778055C7E
2 changed files with 9 additions and 3 deletions

View File

@ -299,7 +299,13 @@ class Submission(Base):
@lazy
def award_count(self, kind, v):
if v and v.poor: return 0
if v and v.poor:
return 0
elif self.distinguish_level:
if SITE_NAME == 'rDrama' and kind in ('glowie', 'tilt',):
return 0
elif SITE_NAME == 'WPD':
return 0
return len([x for x in self.awards if x.kind == kind])
@lazy

View File

@ -477,7 +477,7 @@
{% if p.award_count("tilt", v) and not p.distinguish_level %}
{% if p.award_count("tilt", v) %}
<style>
@keyframes post-tilt {
0% {transform: rotate(0deg);}
@ -612,7 +612,7 @@
<div id="post-root" class="col-12">
<div class="card border-0 mt-3{% if p.is_banned %} banned{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div id="post-{{p.id}}" class="{% if p.award_count('tilt', v) %}p-3{% endif %} {% if p.award_count('glowie', v) and not p.distinguish_level %}glow{% endif %} {% if p.deleted_utc %}deleted {% endif %}d-flex flex-row-reverse flex-nowrap justify-content-end">
<div id="post-{{p.id}}" class="{% if p.award_count('tilt', v) %}p-3{% endif %} {% if p.award_count('glowie', v) %}glow{% endif %} {% if p.deleted_utc %}deleted {% endif %}d-flex flex-row-reverse flex-nowrap justify-content-end">
{% if not p.is_image and p.thumb_url and not p.embed_url %}
<div class="card-header bg-transparent border-0 d-none d-md-flex flex-row flex-nowrap pl-3 p-0">