hide a bunch of user customization on shadowbanned profiles
parent
03c0f5c31c
commit
397ab186f6
|
@ -793,7 +793,7 @@ class User(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def banner_url(self):
|
def banner_url(self):
|
||||||
if FEATURES['USERS_PROFILE_BANNER'] and self.bannerurl:
|
if FEATURES['USERS_PROFILE_BANNER'] and self.bannerurl and self.can_see_my_shit:
|
||||||
return self.bannerurl
|
return self.bannerurl
|
||||||
return f"/i/{SITE_NAME}/site_preview.webp?v=3009"
|
return f"/i/{SITE_NAME}/site_preview.webp?v=3009"
|
||||||
|
|
||||||
|
@ -804,7 +804,7 @@ class User(Base):
|
||||||
return f"{SITE_FULL}/e/chudsey.webp"
|
return f"{SITE_FULL}/e/chudsey.webp"
|
||||||
if self.rainbow:
|
if self.rainbow:
|
||||||
return f"{SITE_FULL}/e/marseysalutepride.webp"
|
return f"{SITE_FULL}/e/marseysalutepride.webp"
|
||||||
if self.profileurl:
|
if self.profileurl and self.can_see_my_shit:
|
||||||
if self.profileurl.startswith('/'): return SITE_FULL + self.profileurl
|
if self.profileurl.startswith('/'): return SITE_FULL + self.profileurl
|
||||||
return self.profileurl
|
return self.profileurl
|
||||||
return f"{SITE_FULL}/i/default-profile-pic.webp?v=1008"
|
return f"{SITE_FULL}/i/default-profile-pic.webp?v=1008"
|
||||||
|
@ -1207,3 +1207,9 @@ class User(Base):
|
||||||
@lazy
|
@lazy
|
||||||
def can_toggle_event_music(self):
|
def can_toggle_event_music(self):
|
||||||
return SITE_NAME != 'rDrama' or self.has_badge(91)
|
return SITE_NAME != 'rDrama' or self.has_badge(91)
|
||||||
|
|
||||||
|
@property
|
||||||
|
@lazy
|
||||||
|
def can_see_my_shit(self):
|
||||||
|
v = g.v
|
||||||
|
return not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<div id="profile--lastactive" class="mt-3">Last active on <span id="profile--lastactive--time" data-time="{{u.last_active}}"></span></div>
|
<div id="profile--lastactive" class="mt-3">Last active on <span id="profile--lastactive--time" data-time="{{u.last_active}}"></span></div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{% if FEATURES['USERS_PROFILE_BODYTEXT'] and not hide_bios and u.bio_html and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
|
{% if FEATURES['USERS_PROFILE_BODYTEXT'] and not hide_bios and u.bio_html and u.can_see_my_shit %}
|
||||||
<div class="card-text mt-3">{{u.bio_html | safe}}</div>
|
<div class="card-text mt-3">{{u.bio_html | safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
<div class="container-fluid nobackground">
|
<div class="container-fluid nobackground">
|
||||||
<div class="d-md-flex text-center text-md-left">
|
<div class="d-md-flex text-center text-md-left">
|
||||||
<div id="profile--pfp" {% if u.hat_active(v)[0] %}class="profile--pfp--hat hat"{% endif %}>
|
<div id="profile--pfp" {% if u.hat_active(v)[0] %}class="profile--pfp--hat hat"{% endif %}>
|
||||||
<a rel="nofollow noopener" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-100-wrapper">
|
<a rel="nofollow noopener" href="{% if u.highres and u.can_see_my_shit %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-100-wrapper">
|
||||||
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic profile-pic-100 mb-5">
|
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres and u.can_see_my_shit %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic profile-pic-100 mb-5">
|
||||||
{% if u.hat_active(v)[0] -%}
|
{% if u.hat_active(v)[0] -%}
|
||||||
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_active(v)[1]}}">
|
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres and u.can_see_my_shit %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_active(v)[1]}}">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,11 +53,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if FEATURES['PRONOUNS'] %}
|
{% if FEATURES['PRONOUNS'] and u.can_see_my_shit %}
|
||||||
<p class="font-weight-bolder" id="profile--pronouns" style="color: #{{u.titlecolor}}">{{u.pronouns}}</p>
|
<p class="font-weight-bolder" id="profile--pronouns" style="color: #{{u.titlecolor}}">{{u.pronouns}}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.customtitle %}
|
{% if u.customtitle and u.can_see_my_shit %}
|
||||||
<p class="font-weight-bolder" id="profile--flair" style="color: #{{u.titlecolor}}">{{u.customtitle | safe}}</p>
|
<p class="font-weight-bolder" id="profile--flair" style="color: #{{u.titlecolor}}">{{u.customtitle | safe}}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -90,18 +90,18 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if FEATURES['USERS_PROFILE_BODYTEXT'] -%}
|
{% if FEATURES['USERS_PROFILE_BODYTEXT'] -%}
|
||||||
{% if u.bio_html and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
|
{% if u.bio_html and u.can_see_my_shit %}
|
||||||
<div class="text-muted font-weight-bolder mt-1" id="profile--bio">{{u.bio_html | safe}}</div>
|
<div class="text-muted font-weight-bolder mt-1" id="profile--bio">{{u.bio_html | safe}}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="text-muted" id="profile--bio">No bio...</p>
|
<p class="text-muted" id="profile--bio">No bio...</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.friends_html %}
|
{% if u.friends_html and u.can_see_my_shit %}
|
||||||
<p class="text-muted font-weight-bold">Friends:</p>
|
<p class="text-muted font-weight-bold">Friends:</p>
|
||||||
<div id="profile--friends">{{u.friends_html | safe}}</div>
|
<div id="profile--friends">{{u.friends_html | safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.enemies_html %}
|
{% if u.enemies_html and u.can_see_my_shit %}
|
||||||
<p class="text-muted font-weight-bold">Enemies:</p>
|
<p class="text-muted font-weight-bold">Enemies:</p>
|
||||||
<div id="profile--enemies">{{u.enemies_html | safe}}</div>
|
<div id="profile--enemies">{{u.enemies_html | safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -276,10 +276,10 @@
|
||||||
<div class="row border-bottom">
|
<div class="row border-bottom">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div style="margin-top: -34px;" id="profile-mobile--pfp">
|
<div style="margin-top: -34px;" id="profile-mobile--pfp">
|
||||||
<a rel="nofollow noopener" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-65-wrapper">
|
<a rel="nofollow noopener" href="{% if u.highres and u.can_see_my_shit %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-65-wrapper">
|
||||||
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic-65 bg-white mb-2">
|
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres and u.can_see_my_shit %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic-65 bg-white mb-2">
|
||||||
{% if u.hat_active(v)[0] -%}
|
{% if u.hat_active(v)[0] -%}
|
||||||
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7">
|
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{% if u.highres and u.can_see_my_shit %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -314,11 +314,11 @@
|
||||||
<span class="followsyou badge badge-secondary text-small align-middle mx-1" id="profile-mobile--follows-you">Follows you</span>
|
<span class="followsyou badge badge-secondary text-small align-middle mx-1" id="profile-mobile--follows-you">Follows you</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if FEATURES['PRONOUNS'] %}
|
{% if FEATURES['PRONOUNS'] and u.can_see_my_shit %}
|
||||||
<p style="color: #{{u.titlecolor}}" id="profile-mobile--pronouns">{{u.pronouns}}</p>
|
<p style="color: #{{u.titlecolor}}" id="profile-mobile--pronouns">{{u.pronouns}}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.customtitle %}
|
{% if u.customtitle and u.can_see_my_shit %}
|
||||||
<p style="color: #{{u.titlecolor}}" id="profile-mobile--flair">{{u.customtitle | safe}}</p>
|
<p style="color: #{{u.titlecolor}}" id="profile-mobile--flair">{{u.customtitle | safe}}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -351,16 +351,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if FEATURES['USERS_PROFILE_BODYTEXT'] -%}
|
{% if FEATURES['USERS_PROFILE_BODYTEXT'] -%}
|
||||||
{% if u.bio_html and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
|
{% if u.bio_html and u.can_see_my_shit %}
|
||||||
<div class="text-muted text-break" id="profile-mobile--bio">{{u.bio_html | safe}}</div>
|
<div class="text-muted text-break" id="profile-mobile--bio">{{u.bio_html | safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.friends_html %}
|
{% if u.friends_html and u.can_see_my_shit %}
|
||||||
<p class="text-muted font-weight-bold mt-3">Friends:</p>
|
<p class="text-muted font-weight-bold mt-3">Friends:</p>
|
||||||
<div id="profile-mobile--friends">{{u.friends_html | safe}}</div>
|
<div id="profile-mobile--friends">{{u.friends_html | safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.enemies_html %}
|
{% if u.enemies_html and u.can_see_my_shit %}
|
||||||
<p class="text-muted font-weight-bold mt-3">Enemies:</p>
|
<p class="text-muted font-weight-bold mt-3">Enemies:</p>
|
||||||
<div id="profile-mobile--enemies">{{u.enemies_html | safe}}</div>
|
<div id="profile-mobile--enemies">{{u.enemies_html | safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% if u and u.profile_background %}
|
{% if u and u.profile_background %}
|
||||||
<link rel="stylesheet" href="{{('css/transparent.css') | asset}}">
|
<link rel="stylesheet" href="{{('css/transparent.css') | asset}}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if u and (u.profilecss or u.profile_background) and not request.values.get('nocss') %}
|
{% if u and (u.profilecss or u.profile_background) and not request.values.get('nocss') and u.can_see_my_shit %}
|
||||||
<link rel="stylesheet" href="/{{u.id}}/profilecss">
|
<link rel="stylesheet" href="/{{u.id}}/profilecss">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script defer src="{{'js/userpage.js' | asset}}"></script>
|
<script defer src="{{'js/userpage.js' | asset}}"></script>
|
||||||
{% if not IS_FISTMAS() or SITE_NAME == 'WPD' %}
|
{% if (not IS_FISTMAS() or SITE_NAME == 'WPD') and u.can_see_my_shit %}
|
||||||
<script defer src="{{'js/profile_song.js' | asset}}"></script>
|
<script defer src="{{'js/profile_song.js' | asset}}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
{{0 if u.shadowbanned else u.real_comment_count(v)}}
|
{{0 if u.shadowbanned else u.real_comment_count(v)}}
|
||||||
Comments
|
Comments
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{% if u.bio and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
|
{% if u.bio and u.can_see_my_shit %}
|
||||||
- {{u.bio}}
|
- {{u.bio}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endset %}
|
{% endset %}
|
||||||
|
|
Loading…
Reference in New Issue