forked from rDrama/rDrama
show the earlylife parantheses in more places
parent
9d6dcca07a
commit
4d15d76dfa
|
@ -261,15 +261,7 @@ class Comment(Base):
|
|||
@lazy
|
||||
def author_name(self):
|
||||
if self.ghost: return '👻'
|
||||
if self.author.earlylife:
|
||||
expiry = int(self.author.earlylife - time.time())
|
||||
if expiry > 86400:
|
||||
name = self.author.username
|
||||
for i in range(int(expiry / 86400 + 1)):
|
||||
name = f'((({name})))'
|
||||
return name
|
||||
return f'((({self.author.username})))'
|
||||
return self.author.username
|
||||
return self.author.user_name
|
||||
|
||||
@lazy
|
||||
def award_count(self, kind, v):
|
||||
|
|
|
@ -204,15 +204,7 @@ class Submission(Base):
|
|||
@lazy
|
||||
def author_name(self):
|
||||
if self.ghost: return '👻'
|
||||
if self.author.earlylife:
|
||||
expiry = int(self.author.earlylife - time.time())
|
||||
if expiry > 86400:
|
||||
name = self.author.username
|
||||
for i in range(int(expiry / 86400 + 1)):
|
||||
name = f'((({name})))'
|
||||
return name
|
||||
return f'((({self.author.username})))'
|
||||
return self.author.username
|
||||
return self.author.user_name
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -946,3 +946,16 @@ class User(Base):
|
|||
return False
|
||||
|
||||
return True
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def user_name(self):
|
||||
if self.earlylife:
|
||||
expiry = int(self.earlylife - time.time())
|
||||
if expiry > 86400:
|
||||
name = self.username
|
||||
for i in range(int(expiry / 86400 + 1)):
|
||||
name = f'((({name})))'
|
||||
return name
|
||||
return f'((({self.username})))'
|
||||
return self.username
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{loop.index}}</td>
|
||||
<td><a style="font-weight:bold;color:#{{user.name_color}}" href="/@{{user.username}}"><span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.username}}</span></a></td>
|
||||
<td><a style="font-weight:bold;color:#{{targets[loop.index-1].name_color}}" href="/@{{targets[loop.index-1].username}}"><span {% if targets[loop.index-1].patron %}class="patron" style="background-color:#{{targets[loop.index-1].name_color}}"{% endif %}>{{targets[loop.index-1].username}}</span></a></td>
|
||||
<td><a style="font-weight:bold;color:#{{user.name_color}}" href="/@{{user.username}}"><span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.user_name}}</span></a></td>
|
||||
<td><a style="font-weight:bold;color:#{{targets[loop.index-1].name_color}}" href="/@{{targets[loop.index-1].username}}"><span {% if targets[loop.index-1].patron %}class="patron" style="background-color:#{{targets[loop.index-1].name_color}}"{% endif %}>{{targets[loop.index-1].user_name}}</span></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
{%- endif %}
|
||||
</div>
|
||||
<div class="text-left pl-2">
|
||||
<div style="color: #{{v.name_color}}" class="text-small font-weight-bold"><span id="header--username" {% if v.patron %}class="patron" style="background-color:#{{v.name_color}}"{% endif %}>{{v.username}}</span></div>
|
||||
<div style="color: #{{v.name_color}}" class="text-small font-weight-bold"><span id="header--username" {% if v.patron %}class="patron" style="background-color:#{{v.name_color}}"{% endif %}>{{v.user_name}}</span></div>
|
||||
<div class="header--currency"><img alt="coins" class="mr-1 ml-1" data-bs-toggle="tooltip" data-bs-placement="bottom" src="{{'coins.webp' | asset_siteimg}}" title="coins" aria-label="coins"><span id="user-coins-amount">{{v.coins}}</span>{% if not FEATURES['PROCOINS'] %} Coin{{ help.plural(v.coins) }}{% endif %}</div>
|
||||
{% if FEATURES['PROCOINS'] %}
|
||||
<div class="header--currency"><img alt="marseybux" class="mr-1 ml-1" data-bs-toggle="tooltip" data-bs-placement="bottom" src="/i/marseybux.webp?v=2000" title="Marseybux" aria-label="Marseybux"><span id="user-bux-amount">{{v.procoins}}</span></div>
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
<img class="profile-pic-20-hat hat" loading="lazy" src="{{user.hat_active}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{user.hat_tooltip(v)}}">
|
||||
{%- endif %}
|
||||
</div>
|
||||
<span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.username}}</span>
|
||||
</a>
|
||||
<span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.user_name}}</span>
|
||||
</a>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</h5>
|
||||
{% endif %}
|
||||
<div class="d-flex align-items-center mt-1 mb-2">
|
||||
<h1 class="font-weight-bolder h3 my-0 mr-2" id="profile--name" style="color: #{{u.name_color}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.name_color}}"{% endif %}>{{u.username}}</span></h1>
|
||||
<h1 class="font-weight-bolder h3 my-0 mr-2" id="profile--name" style="color: #{{u.name_color}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.name_color}}"{% endif %}>{{u.user_name}}</span></h1>
|
||||
|
||||
{% if u.username != u.original_username %}
|
||||
<span id="profile--origname">
|
||||
|
@ -444,7 +444,7 @@
|
|||
<h5 class="text-primary" id="profile-mobile--banned">SHADOWBANNED USER{% if u.ban_reason %}: {{u.ban_reason | safe}}{% endif %} (by <a href="/@{{u.shadowbanned}}">@{{u.shadowbanned}}</a>)</h5>
|
||||
{% endif %}
|
||||
|
||||
<h1 class="h5 d-inline-block" id="profile-mobile--name" style="color: #{{u.name_color}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.name_color}}"{% endif %}>{{u.username}}</span></h1>
|
||||
<h1 class="h5 d-inline-block" id="profile-mobile--name" style="color: #{{u.name_color}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.name_color}}"{% endif %}>{{u.user_name}}</span></h1>
|
||||
|
||||
{% if u.username != u.original_username %}
|
||||
<span id="profile-mobile--origname">
|
||||
|
|
Loading…
Reference in New Issue