diff --git a/files/classes/user.py b/files/classes/user.py index 2b8f53e30..c8c6b26e1 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -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 diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 0530af742..141b9848c 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -1,5 +1,4 @@ -