From 7ebfd9808d8d03cf7dfc59949cff08fa0da020c0 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 10 May 2023 22:16:18 +0300 Subject: [PATCH] cachebust badges --- files/assets/js/comments+submission_listing.js | 2 +- files/classes/badges.py | 4 ++-- files/templates/admin/patrons.html | 2 +- files/templates/comments.html | 2 +- files/templates/userpage/banner.html | 4 ++-- files/templates/util/macros.html | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files/assets/js/comments+submission_listing.js b/files/assets/js/comments+submission_listing.js index d0745536d..1f148eebd 100644 --- a/files/assets/js/comments+submission_listing.js +++ b/files/assets/js/comments+submission_listing.js @@ -27,7 +27,7 @@ document.addEventListener('shown.bs.popover', (e) => { badgesDOM.innerHTML = ""; for (const badge of author["badges"]) { const badgeDOM = popClickBadgeTemplateDOM.cloneNode(); - badgeDOM.src = badge + "?b=6"; + badgeDOM.src = badge + "?b=8"; badgesDOM.append(badgeDOM); } diff --git a/files/classes/badges.py b/files/classes/badges.py index 8f8efeac5..8bfe7639b 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -27,9 +27,9 @@ class BadgeDef(Base): @lazy def path(self): if self.id == 7 or 20 < self.id < 29 or self.id == 222: - return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/badges/{self.id}.webp?x=7" + return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/badges/{self.id}.webp?b=8" - return f"{SITE_FULL_IMAGES}/i/badges/{self.id}.webp?x=7" + return f"{SITE_FULL_IMAGES}/i/badges/{self.id}.webp?b=8" class Badge(Base): diff --git a/files/templates/admin/patrons.html b/files/templates/admin/patrons.html index 46f40ec80..d050ff631 100644 --- a/files/templates/admin/patrons.html +++ b/files/templates/admin/patrons.html @@ -16,7 +16,7 @@ {% include "user_in_table.html" %} {% if user.patron > 1 %} - 2{{user.patron}} + 2{{user.patron}} {% endif %} {{user.truescore}} diff --git a/files/templates/comments.html b/files/templates/comments.html index 3e5ec103a..0cb3b0219 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -159,7 +159,7 @@ 👻 {% else %} {% if FEATURES['PATRON_ICONS'] and c.author.patron > 1 %} - {{c.author.patron_tooltip}} + {{c.author.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and c.author.house %} diff --git a/files/templates/userpage/banner.html b/files/templates/userpage/banner.html index dfd924a9a..a995c49b1 100644 --- a/files/templates/userpage/banner.html +++ b/files/templates/userpage/banner.html @@ -32,7 +32,7 @@ {% endif %} {% if FEATURES['PATRON_ICONS'] and u.patron > 1 %} - {{u.patron_tooltip}} + {{u.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and u.house %} @@ -294,7 +294,7 @@ {% endif %} {% if FEATURES['PATRON_ICONS'] and u.patron > 1 %} - {{u.patron_tooltip}} + {{u.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and u.house %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index a9de2cc5a..86e829fef 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -60,7 +60,7 @@ 👻 {% else %} {% if FEATURES['PATRON_ICONS'] and p.author.patron > 1 %} - {{p.author.patron_tooltip}} + {{p.author.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and p.author.house %}