From 0e1dd2717becab8047ee914ef0087fd583a25a94 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 7 Jan 2022 00:18:38 +0200 Subject: [PATCH] fa --- Dockerfile | 2 +- files/classes/badges.py | 11 +++++- files/helpers/const.py | 34 +++++++++++++++++-- files/templates/CHRISTMAS/comments.html | 2 +- files/templates/CHRISTMAS/submission.html | 4 +-- .../CHRISTMAS/submission_listing.html | 2 +- .../CHRISTMAS/submission_listing_compact.html | 2 +- setup | 2 +- 8 files changed, 48 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61bce9027..c5f2df4fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ RUN pip3 install -r requirements.txt EXPOSE 80/tcp -CMD gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --max-requests 1000 --max-requests-jitter 500 \ No newline at end of file +CMD sudo -E gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --max-requests 1000 --max-requests-jitter 500 \ No newline at end of file diff --git a/files/classes/badges.py b/files/classes/badges.py index 596f8ab40..364f17e2e 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -34,7 +34,16 @@ class Badge(Base): if self.name == "Agendaposter": ti = self.user.agendaposter_expires_utc if ti: return self.badge['description'] + " until " + datetime.utcfromtimestamp(ti).strftime('%Y-%m-%d %H:%M:%S') - else: return self.badge['description'] + " permanently" + else: return self.badge['description'] + " permanently" + + elif self.badge_id in (94,95,96,97,98): + if self.badge_id == 94: ti = self.user.progressivestack + elif self.badge_id == 95: ti = self.user.bird + elif self.badge_id == 96: ti = self.user.flairchanged + elif self.badge_id == 97: ti = self.user.longpost + else: ti = self.user.marseyawarded + return self.badge['description'] + " until " + datetime.utcfromtimestamp().strftime('%Y-%m-%d %H:%M:%S') + elif self.description: return self.description else: return self.badge['description'] diff --git a/files/helpers/const.py b/files/helpers/const.py index d815b9107..f39370229 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -414,15 +414,15 @@ BADGES = { 'name': 'Unblockable', 'description': 'This user is unblockable' }, - 88: { + 88: { 'name': 'Provider', 'description': 'This user provided a bountiful feast for Thanksgiving' }, - 89: { + 89: { 'name': 'Dinner', 'description': 'Yes, it is edible' }, - 90: { + 90: { 'name': 'Fish', 'description': 'This user cannot be unfollowed' }, @@ -430,6 +430,34 @@ BADGES = { 'name': 'Grinch', 'description': 'This user is a joyless grinch who pays money to avoid having fun' }, + 92: { + 'name': 'NFT Artist', + 'description': 'Drew a marsey that was used as an NFT' + }, + 93: { + 'name': 'NFT Owner', + 'description': 'Bought a marsey NFT' + }, + 94: { + 'name': 'Progressive Stack Award', + 'description': "Upvotes/downvotes on this user's posts and comments have double the ranking effect" + }, + 95: { + 'name': 'Bird Site Award', + 'description': 'This user is limited to 140 characters' + }, + 96: { + 'name': 'Flairlock Award', + 'description': "This user's flair has been locked by someone else" + }, + 97: { + 'name': 'Pizzashill Award', + 'description': 'This user has to make their posts and comments more than 280 characters' + }, + 98: { + 'name': 'Marsey Award', + 'description': 'This user is limited to posting marseys' + }, } AWARDS = { diff --git a/files/templates/CHRISTMAS/comments.html b/files/templates/CHRISTMAS/comments.html index 58cbf255a..03d7d6835 100644 --- a/files/templates/CHRISTMAS/comments.html +++ b/files/templates/CHRISTMAS/comments.html @@ -307,7 +307,7 @@ Reported by:

 				
diff --git a/files/templates/CHRISTMAS/submission.html b/files/templates/CHRISTMAS/submission.html
index edbfc8c37..d26171c1d 100644
--- a/files/templates/CHRISTMAS/submission.html
+++ b/files/templates/CHRISTMAS/submission.html
@@ -211,7 +211,7 @@
 				Reported by: