remotes/1693045480750635534/spooky-22
Aevann1 2022-01-07 00:18:38 +02:00
parent 2c0b81297d
commit 0e1dd2717b
8 changed files with 48 additions and 11 deletions

View File

@ -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
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

View File

@ -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']

View File

@ -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 = {

View File

@ -307,7 +307,7 @@
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
<pre></pre>
<ul style="padding-left:20px; margin-bottom: 0;">
{% for f in c.ordered_flags %}
{% for f in c.flags %}
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.reason | safe}}{% endif %} {% if v and v.admin_level > 1 %}<a href="javascript:void(0)" onclick="post_toast('/del_report/c{{ f.id }}')">[remove]</a>{% endif %}</li>
{% endfor %}
</ul>

View File

@ -211,7 +211,7 @@
<i class="fas fa-flag fa-fw mr-2 fa-sm"></i>Reported by:
</div>
<ul class="mb-0 flex flex-col space-y-3 divide-y divide-red-300 text-black">
{% for f in p.ordered_flags %}
{% for f in p.flags %}
<li class="flex flex-wrap">
<a class="font-bold text-black hover:text-primary" href="{{f.user.url}}">
{{f.user.username}}
@ -333,7 +333,7 @@
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
<pre></pre>
<ul style="padding-left:20px; margin-bottom: 0;">
{% for f in p.ordered_flags %}
{% for f in p.flags %}
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.reason | safe}}{% endif %} {% if v.admin_level==6 %}<a href="javascript:void(0)" onclick="post_toast('/del_report/p{{ f.id }}')">[remove]</a>{% endif %}</li>
{% endfor %}
</ul>

View File

@ -26,7 +26,7 @@
<i class="fas fa-flag fa-fw mr-2 fa-sm"></i>Reported by:
</div>
<ul class="mb-0 flex flex-col space-y-3 divide-y divide-red-300 text-black">
{% for f in p.ordered_flags %}
{% for f in p.flags %}
<li class="flex flex-wrap">
<a class="font-bold text-black hover:text-primary" href="{{f.user.url}}">
{{f.user.username}}

View File

@ -26,7 +26,7 @@
<i class="fas fa-flag fa-fw mr-2 fa-sm"></i>Reported by:
</div>
<ul class="mb-0 flex flex-col space-y-3 divide-y divide-red-300 text-black">
{% for f in p.ordered_flags %}
{% for f in p.flags %}
<li class="flex flex-wrap">
<a class="font-bold text-black hover:text-primary" href="{{f.user.url}}">
{{f.user.username}}

2
setup
View File

@ -15,4 +15,4 @@ mkdir /songs
mkdir /images
cp ./env /env
. /env
gunicorn files.__main__:app -k gevent -w 2 --reload -b localhost:80 --max-requests 1000 --max-requests-jitter 500
sudo -E gunicorn files.__main__:app -k gevent -w 2 --reload -b localhost:80 --max-requests 1000 --max-requests-jitter 500