From d4b3e4ac5beb2e16828ecd1453a98858fd26ef0d Mon Sep 17 00:00:00 2001 From: justcool393 Date: Thu, 6 Oct 2022 03:05:18 -0700 Subject: [PATCH] fix some stuff in the user page template including add mute to user page properly --- files/helpers/const.py | 2 +- files/templates/userpage.html | 72 ++++++++++++++++------------------- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 274817246..0045a579b 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -190,7 +190,7 @@ PERMS = { # Minimum admin_level to perform action. 'MESSAGE_BLOCKED_USERS': 1, 'APPS_MODERATION': 3, 'STREAMERS_MODERATION': 2, - 'UNKNOWN_ADMIN_LEVEL2_PERM4': 2, + 'UNKNOWN_ADMIN_LEVEL2_PERM4': 2, # TODO: figure out what this is and remove it if unnecessary } FEATURES = { diff --git a/files/templates/userpage.html b/files/templates/userpage.html index f34c39b59..d5222408e 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -270,7 +270,7 @@ Toggle anthem {% endif %} - {% if v and v.id != u.id and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %} + {% if v and v.id != u.id and v.admin_level >= PERMS['USER_MODERATION_TOOLS_VISIBLE'] %}

{% if v.admin_level >= PERMS['USER_TITLE_CHANGE'] %} @@ -350,13 +350,11 @@ Disable Chud Theme {% endif %}

-
+					{% if v and v.admin_level >= PERMS['USER_BAN']}
 						Mute
-
 						Unmute
-
-
 						

+					{% endif %}
 					{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
 						
@@ -370,14 +368,10 @@
{% endif %} - {% if v and v.admin_level >= PERMS['USER_CLUB_ALLOW_BAN'] %} + {% if FEATURES['COUNTRY_CLUB'] and v and v.admin_level >= PERMS['USER_CLUB_ALLOW_BAN'] %}

-						{% if FEATURES['COUNTRY_CLUB'] -%}
 						
 						
-						{%- endif %}
-
-						{% endif %}
 					{% endif %}
 					

 					
@@ -386,7 +380,7 @@

True score: {{u.truecoins}}

Winnings: {{u.winnings}}

{% if u.is_private %} -

User has private mode enabled.

+

User has private mode enabled

{% endif %} {% if v and (v.admin_level >= PERMS['VIEW_ALTS'] or v.alt) %} Alts: @@ -711,34 +705,34 @@ {% endif %}

 						

-
-						
- - - -
+ {% if v.admin_level >= PERMS['USER_AGENDAPOSTER'] %} +
+ + + +
+

+							Disable Chud Theme
+							

+						{% endif %}
+						{% if v.admin_level >= PERMS['USER_BAN'] %}
+							Mute
+							Unmute
+						{% endif %}
 						

-
-						Disable Chud Theme
-
-						

-
-						Mute
-
-						Unmute
-
-						

-						
- - - -
-

-						
- - - -
+ {% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} +
+ + + +
+

+							
+ + + +
+ {% endif %} {% endif %} {% endif %}

@@ -748,7 +742,7 @@
 					

True score: {{u.truecoins}}

Winnings: {{u.winnings}}

{% if u.is_private %} -

User has private mode enabled.

+

User has private mode enabled

{% endif %} {% if v and (v.admin_level >= PERMS['VIEW_ALTS'] or v.alt) %} Alts: