From 83e9f4c8527387a3fbacf915e20f0851ab1bbf5c Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 27 Oct 2023 14:13:07 +0300 Subject: [PATCH] quick hack to hide shadowbanned users in tables --- files/assets/css/main.css | 4 ++++ files/templates/user_in_table.html | 25 +++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/files/assets/css/main.css b/files/assets/css/main.css index 69508392f..3bec13d1b 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -7566,3 +7566,7 @@ ul { flex: 1; margin-left: 0.5rem; } + +tr:has(hideme) { + display: none +} diff --git a/files/templates/user_in_table.html b/files/templates/user_in_table.html index 029bfddce..7b06bf084 100644 --- a/files/templates/user_in_table.html +++ b/files/templates/user_in_table.html @@ -1,12 +1,17 @@ {% if user %} -{%- include 'admin/shadowbanned_tooltip.html' -%} - -
- - {% if user.hat_active(v)[0] -%} - - {%- endif %} -
- {{user.user_name}} -
+ {%- include 'admin/shadowbanned_tooltip.html' -%} + + {% if not can_see(v, user) %} + + {% else %} + +
+ + {% if user.hat_active(v)[0] -%} + + {%- endif %} +
+ {{user.user_name}} +
+ {% endif %} {% endif %}