hide more customization with deleted accounts

master
Aevann 2024-11-14 22:36:37 +02:00
parent 99fea44f01
commit b32dfdde53
3 changed files with 48 additions and 32 deletions

View File

@ -1047,6 +1047,9 @@ class User(Base):
@property
@lazy
def profile_url(self):
if self.username.startswith('deleted~') and not (g.v and g.v.admin_level >= PERMS['VIEW_DELETED_ACCOUNTS']):
return f"{SITE_FULL_IMAGES}/i/default-profile-pic.webp?x=14"
if IS_HOMOWEEN() and self.zombie < 0:
random.seed(self.id)
zombie_num = random.randint(1, 10)

View File

@ -188,6 +188,7 @@
{% if c.ghost %}
<span {% if c.distinguished %}class="mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}"{% endif %}>👻</span>
{% else %}
{% if not (c.author.username.startswith('deleted~') and not (v and v.admin_level >= PERMS['VIEW_DELETED_ACCOUNTS'])) %}
{% if c.author.switched.flag %}
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{c.author.switched.flag}}.webp?e=1" class="patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.switched.flag}}">
{% endif %}
@ -200,7 +201,9 @@
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/houses/{{c.author.switched.house}}.webp?x=14" class="house-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="House {{c.author.switched.house}}" alt="House {{c.author.switched.house}}">
{% endif %}
{% if c.author.switched.verified %}<i class="fas fa-badge-check align-middle ml-1 {{c.author.switched.checkmark_classes}}" style="color:{% if c.author.switched.verifiedcolor %}#{{c.author.switched.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.switched.verified}}"></i>
{% if c.author.switched.verified %}
<i class="fas fa-badge-check align-middle ml-1 {{c.author.switched.checkmark_classes}}" style="color:{% if c.author.switched.verifiedcolor %}#{{c.author.switched.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.switched.verified}}"></i>
{% endif %}
{% endif %}
<a class="user-name text-decoration-none {% if not c.author.switched.earlylife %}unbreakable{% endif %}" href="{{c.author.switched.url}}" data-pop-info='{{c.author.switched.json_popover(v) | tojson}}'' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="manual" data-content-id="popover" tabindex="0" style="color:#{{c.author.switched.name_color}}; font-size:12px; font-weight:bold">
@ -212,6 +215,8 @@
</div>
<span {% if c.author.switched.patron and not c.distinguished %}class="patron" style="background-color:#{{c.author.switched.name_color}}"{% elif c.distinguished %}class="mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}"{% endif %} {% if c.author.switched.pride_username(v) %}pride_username{% endif %}>{{c.author_name}}</span>
</a>
{% if not (c.author.username.startswith('deleted~') and not (v and v.admin_level >= PERMS['VIEW_DELETED_ACCOUNTS'])) %}
{% if FEATURES['PRONOUNS'] and c.author.switched.pronouns %}
<span class="pronouns" style="color:#{{c.author.switched.flaircolor}} !important;border-color:#{{c.author.switched.flaircolor}} !important">{{c.author.switched.pronouns_display}}</span>
{% endif %}
@ -219,6 +224,7 @@
&nbsp;<bdi style="color: #{{c.author.switched.flaircolor}}">&nbsp;{{c.author.switched.flair_html | safe}}</bdi>
{% endif %}
{% endif %}
{% endif %}
{% if c.parent_comment_id %}
<a href="

View File

@ -92,6 +92,7 @@
{% if p.ghost %}
<span {% if p.distinguished %}class="mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}"{% endif %}>👻</span>
{% else %}
{% if not (p.author.username.startswith('deleted~') and not (v and v.admin_level >= PERMS['VIEW_DELETED_ACCOUNTS'])) %}
{% if p.author.switched.flag %}
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{p.author.switched.flag}}.webp?e=1" class="patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.switched.flag}}">
{% endif %}
@ -104,8 +105,11 @@
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/houses/{{p.author.switched.house}}.webp?x=14" class="house-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="House {{p.author.switched.house}}" alt="House {{p.author.switched.house}}">
{% endif %}
{% if p.author.switched.verified %}<i class="fas fa-badge-check align-middle ml-1 {{p.author.switched.checkmark_classes}}" style="color:{% if p.author.switched.verifiedcolor %}#{{p.author.switched.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.switched.verified}}"></i>
{% if p.author.switched.verified %}
<i class="fas fa-badge-check align-middle ml-1 {{p.author.switched.checkmark_classes}}" style="color:{% if p.author.switched.verifiedcolor %}#{{p.author.switched.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.switched.verified}}"></i>
{% endif %}
{% endif %}
<a class="user-name text-decoration-none {% if not p.author.switched.earlylife %}unbreakable{% endif %}" href="{{p.author.switched.url}}" data-pop-info='{{p.author.switched.json_popover(v) | tojson}}' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="manual" data-content-id="popover" tabindex="0" style="color: #{{p.author.switched.name_color}}; font-weight: bold">
<div class="profile-pic-30-wrapper" style="margin-top:9px;margin-bottom:9px">
<img loading="lazy" src="{{p.author.switched.profile_url}}" class="profile-pic-30 mr-2">
@ -115,6 +119,8 @@
</div>
<span {% if p.author.switched.patron and not p.distinguished %}class="patron" style="background-color:#{{p.author.switched.name_color}}"{% elif p.distinguished %}class="mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}"{% endif %} {% if p.author.switched.pride_username(v) %}pride_username{% endif %}>{{p.author_name}}</span>
</a>
{% if not (p.author.username.startswith('deleted~') and not (v and v.admin_level >= PERMS['VIEW_DELETED_ACCOUNTS'])) %}
{% if FEATURES['PRONOUNS'] and p.author.switched.pronouns %}
<span class="pronouns" style="color:#{{p.author.switched.flaircolor}} !important;border-color:#{{p.author.switched.flaircolor}} !important">{{p.author.switched.pronouns_display}}</span>
{% endif %}
@ -122,6 +128,7 @@
<bdi class="ml-2" style="color: #{{p.author.switched.flaircolor}}">{{p.author.switched.flair_html | safe}}</bdi>
{% endif %}
{% endif %}
{% endif %}
<span class="ml-2 d-inline-block" data-bs-toggle="tooltip" data-bs-placement="bottom" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{p.created_utc}}')" id="timestamp-{{p.id}}">&nbsp;{{p.age_string}}</span>
{% if not p.deleted_utc %}