forked from rDrama/rDrama
parent
9bfbe44bf0
commit
8a8c55ed09
|
@ -36,6 +36,17 @@ function popclick(e) {
|
||||||
let popover = document.getElementsByClassName("popover")
|
let popover = document.getElementsByClassName("popover")
|
||||||
popover = popover[popover.length-1]
|
popover = popover[popover.length-1]
|
||||||
|
|
||||||
|
if (popover.getElementsByClassName('pop-badges').length > 0) {
|
||||||
|
const badgesDOM = popover.getElementsByClassName('pop-badges')[0];
|
||||||
|
badgesDOM.innerHTML = "";
|
||||||
|
for (const badge of author["badges"]) {
|
||||||
|
const badgeDOM = popClickBadgeTemplateDOM.cloneNode();
|
||||||
|
badgeDOM.src = badge + "?b=4";
|
||||||
|
|
||||||
|
badgesDOM.append(badgeDOM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
popover.getElementsByClassName('pop-banner')[0].src = author["bannerurl"]
|
popover.getElementsByClassName('pop-banner')[0].src = author["bannerurl"]
|
||||||
popover.getElementsByClassName('pop-picture')[0].src = author["profile_url"]
|
popover.getElementsByClassName('pop-picture')[0].src = author["profile_url"]
|
||||||
if (author["hat"]) popover.getElementsByClassName('pop-hat')[0].src = author['hat'] + "?h=7"
|
if (author["hat"]) popover.getElementsByClassName('pop-hat')[0].src = author['hat'] + "?h=7"
|
||||||
|
|
|
@ -807,6 +807,7 @@ class User(Base):
|
||||||
'coins': self.coins,
|
'coins': self.coins,
|
||||||
'post_count': 0 if self.shadowbanned and not (v and v.can_see_shadowbanned) else self.post_count,
|
'post_count': 0 if self.shadowbanned and not (v and v.can_see_shadowbanned) else self.post_count,
|
||||||
'comment_count': 0 if self.shadowbanned and not (v and v.can_see_shadowbanned) else self.comment_count,
|
'comment_count': 0 if self.shadowbanned and not (v and v.can_see_shadowbanned) else self.comment_count,
|
||||||
|
'badges': [x.path for x in self.badges],
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if FEATURES['BADGES'] -%}
|
||||||
|
<div class="pop-badges ml-3 mr-3 my-2">
|
||||||
|
</div>
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
<div class="border-top d-flex align-items-center p-3 gap-3 smol">
|
<div class="border-top d-flex align-items-center p-3 gap-3 smol">
|
||||||
<span>
|
<span>
|
||||||
<strong class="pop-postcount text-black"></strong>
|
<strong class="pop-postcount text-black"></strong>
|
||||||
|
|
Loading…
Reference in New Issue