forked from MarseyWorld/MarseyWorld
dsfsfd
parent
fa0086da90
commit
1efc3aec63
|
@ -423,6 +423,21 @@ class User(Base):
|
|||
if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=1"
|
||||
return f"https://{site}/assets/images/default-profile-pic.webp"
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def json_popover(self):
|
||||
data = {'username': self.username,
|
||||
'url': self.url,
|
||||
'profile_url': self.profile_url,
|
||||
'bannerurl': self.banner_url,
|
||||
'bio_html': self.bio_html_eager,
|
||||
'coins': self.coins,
|
||||
'post_count': self.post_count,
|
||||
'comment_count': self.comment_count,
|
||||
}
|
||||
|
||||
return data
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def json_raw(self):
|
||||
|
@ -462,7 +477,7 @@ class User(Base):
|
|||
data = self.json_core
|
||||
|
||||
data["badges"] = [x.json_core for x in self.badges]
|
||||
data['coins'] = int(self.coins)
|
||||
data['coins'] = self.coins
|
||||
data['post_count'] = self.post_count
|
||||
data['comment_count'] = self.comment_count
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<script src="/assets/js/award_modal.js?v=60"></script>
|
||||
|
||||
<div class="modal fade" id="awardModal" tabindex="-1" role="dialog" aria-labelledby="awardModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
|
|
|
@ -204,7 +204,7 @@
|
|||
{% if c.author.verified %}<i class="fas fa-badge-check align-middle ml-1" style="color:{% if c.author.verifiedcolor %}#{{c.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{c.author.verified}}"></i>
|
||||
{% endif %}
|
||||
|
||||
<a class="user-name text-decoration-none" onclick='popclick({{c.author.json | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color:#{{c.author.namecolor}}; font-size:12px; font-weight:bold;"><img loading="lazy" src="{{c.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if c.author.patron and not c.distinguish_level %}class="patron" style="background-color:#{{c.author.namecolor}};"{% elif c.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{c.author.username}}</span></a>
|
||||
<a class="user-name text-decoration-none" onclick='popclick({{c.author.json_popover | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color:#{{c.author.namecolor}}; font-size:12px; font-weight:bold;"><img loading="lazy" src="{{c.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if c.author.patron and not c.distinguish_level %}class="patron" style="background-color:#{{c.author.namecolor}};"{% elif c.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{c.author.username}}</span></a>
|
||||
{% if c.author.customtitle %} <bdi style="color: #{{c.author.titlecolor}}"> {% if c.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/quadrants/{{c.author.quadrant}}.webp?v=1">{% endif %}{{c.author.customtitle | safe}}</bdi>{% endif %}
|
||||
|
||||
{% if c.parent_comment_id and not standalone and level != 1 %}<a href="#comment-{{ c.parent_comment_id }}-only" class="text-muted ml-2"><i class="fas fa-reply fa-sm fa-fw fa-flip-horizontal mr-1"></i>{{ c.parent_comment.author.username }}</a>{% endif %}
|
||||
|
@ -756,7 +756,7 @@
|
|||
|
||||
{% include "expanded_image_modal.html" %}
|
||||
|
||||
<script src="/assets/js/comments+submission_listing.js?v=73"></script>
|
||||
<script src="/assets/js/comments+submission_listing.js?v=100"></script>
|
||||
<script src="/assets/js/comments.js?v=13"></script>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -320,7 +320,7 @@
|
|||
{% if p.active_flags %}<a class="btn btn-primary" href="javascript:void(0)" style="padding:1px 5px; font-size:10px;" onclick="document.getElementById('flaggers').classList.toggle('d-none')">{{p.active_flags}} Reports</a>{% endif %}
|
||||
{% if p.author.verified %}<i class="fas fa-badge-check align-middle ml-1" style="color:{% if p.author.verifiedcolor %}#{{p.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{p.author.verified}}"></i>
|
||||
{% endif %}
|
||||
<a class="user-name text-decoration-none" onclick='popclick({{p.author.json | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color: #{{p.author.namecolor}}; font-weight: bold;" class="user-name"><img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.namecolor}};"{% elif p.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{p.author.username}}</span></a>{% if p.author.customtitle %} <bdi style="color: #{{p.author.titlecolor}}"> {% if p.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/quadrants/{{p.author.quadrant}}.webp?v=1">{% endif %}{{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<a class="user-name text-decoration-none" onclick='popclick({{p.author.json_popover | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color: #{{p.author.namecolor}}; font-weight: bold;" class="user-name"><img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.namecolor}};"{% elif p.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{p.author.username}}</span></a>{% if p.author.customtitle %} <bdi style="color: #{{p.author.titlecolor}}"> {% if p.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/quadrants/{{p.author.quadrant}}.webp?v=1">{% endif %}{{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<span data-bs-toggle="tooltip" data-bs-placement="bottom" id="timestamp" onmouseover="timestamp('timestamp','{{p.created_utc}}')"> {{p.age_string}}</span>
|
||||
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
{% if p.active_flags %}<a class="btn btn-primary" href="javascript:void(0)" style="padding:1px 5px; font-size:10px;" onclick="document.getElementById('flaggers-{{p.id}}').classList.toggle('d-none')">{{p.active_flags}} Reports</a>{% endif %}
|
||||
{% if p.author.verified %}<i class="fas fa-badge-check align-middle ml-1" style="color:{% if p.author.verifiedcolor %}#{{p.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{p.author.verified}}"></i>
|
||||
{% endif %}
|
||||
<a class="user-name text-decoration-none" onclick='popclick({{p.author.json | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color: #{{p.author.namecolor}}; font-weight: bold;"><img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.namecolor}};"{% elif p.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{p.author.username}}</span></a>{% if p.author.customtitle %}<bdi style="color: #{{p.author.titlecolor}}"> {% if p.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/quadrants/{{p.author.quadrant}}.webp?v=1">{% endif %}{{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<a class="user-name text-decoration-none" onclick='popclick({{p.author.json_popover | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color: #{{p.author.namecolor}}; font-weight: bold;"><img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.namecolor}};"{% elif p.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{p.author.username}}</span></a>{% if p.author.customtitle %}<bdi style="color: #{{p.author.titlecolor}}"> {% if p.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/quadrants/{{p.author.quadrant}}.webp?v=1">{% endif %}{{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<span data-bs-toggle="tooltip" data-bs-placement="bottom" onmouseover="timestamp('timestamp-{{p.id}}','{{p.created_utc}}')" id="timestamp-{{p.id}}"> {{p.age_string}}</span>
|
||||
|
||||
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" target="_blank">{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
|
@ -654,5 +654,5 @@
|
|||
</style>
|
||||
|
||||
<script src="/assets/js/clipboard.js?v=3"></script>
|
||||
<script src="/assets/js/comments+submission_listing.js?v=73"></script>
|
||||
<script src="/assets/js/comments+submission_listing.js?v=100"></script>
|
||||
<script src="/assets/js/submission_listing.js?v=10"></script>
|
Loading…
Reference in New Issue