- {% if v and request.path.startswith('/@') and v.admin_level == 0 %}
+ {% if v and request.path.startswith('/@') and not v.admin_level %}
{% if voted==1 %}
@@ -148,41 +148,39 @@
Copy link
- {% if v and not (v.admin_level == 6 and v.id == p.author_id) %}
-
Unsubscribe
+ {% if v %}
Subscribe
+
Unsubscribe
{% endif %}
- {% if v and p.id in v.saved_idlist() %}
-
Unsave
- {% elif v %}
-
Save
- {% endif %}
+
Save
+
Unsave
Report
{% if v and v.id==p.author_id %}
-
{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}
- {% if p.deleted_utc > 0 %}
-
Undelete
- {% else %}
-
Delete
- {% endif %}
+
Pin to profile
+
Unpin from profile
+
+
Delete
+
Undelete
{% endif %}
{% if v and v.admin_level>=3 %}
-
{% if p.stickied %}Unpin{% else %}Pin{% endif %}
- {% if v==p.author %}
-
Distinguish
- {% endif %}
+
Pin
+
Unpin
+ {% if v==p.author %}
+
Distinguish
+
Undistinguish
+ {% endif %}
{% endif %}
{% if v %}
{% if v.admin_level >=3 %}
-
Approve
-
Remove
+
Remove
+
Approve
{% endif %}
@@ -190,25 +188,20 @@
API App
{% endif %}
- {% if not v.id==p.author_id and v.admin_level == 0 %}
-
Block user
-
Unblock user
+ {% if not v.id==p.author_id and not v.admin_level %}
+
Block user
+
Unblock user
{% endif %}
{% if v and (v.id==p.author_id or v.admin_level>=3) %}
-
Toggle +18
+
Toggle +18
{% endif %}
{% if v.admin_level >=3 and v.id!=p.author_id %}
- {% if p.author.is_suspended %}
-
Unban user
- {% else %}
-
Ban user
- {% endif %}
+
Ban user
+
Unban user
{% endif %}
{% endif %}
@@ -235,7 +228,7 @@
{% endif %}
{% if not postembed %}
- {% if v and request.path.startswith('/@') and v.admin_level == 0 %}
+ {% if v and request.path.startswith('/@') and not v.admin_level %}
{% if voted==1 %}
@@ -299,9 +292,9 @@
Publish
{% endif %}
- {% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}
+ {% if p.is_pinned %}Unpin from profile{% else %}Pin to profile{% endif %}
- {% if p.deleted_utc > 0 %}
+ {% if p.deleted_utc %}
Undelete
{% else %}
Delete
@@ -343,7 +336,7 @@
{% endif %}
- {% if v and v.id != p.author_id and v.admin_level == 0 %}
+ {% if v and v.id != p.author_id and not v.admin_level %}
Block user
Toggle +18
{% endif %}
+ {% if not v.id==p.author_id and v.admin_level == 1 %}
+ Ban user
+
Unban user
+ {% endif %}
+
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
{% if p.author.is_suspended %}
Unban user
diff --git a/restart b/restart
index dffca0e74..a49abcda2 100644
--- a/restart
+++ b/restart
@@ -1,3 +1,3 @@
source /env
killall gunicorn
-gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80
\ No newline at end of file
+gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --reload-extra-file ./files/templates/
\ No newline at end of file
diff --git a/supervisord.conf b/supervisord.conf
index beaf519ed..3125863a8 100644
--- a/supervisord.conf
+++ b/supervisord.conf
@@ -5,7 +5,7 @@ logfile=/tmp/supervisord.log
[program:service]
directory=/service
-command=gunicorn files.__main__:app -k gevent -w 2 --max-requests 10000 --max-requests-jitter 500 --reload --bind 0.0.0.0:80
+command=gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --reload-extra-file ./files/templates/
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr