From 6e83ca1614f97436833326ea0efe491f34ca3f7e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 24 Nov 2021 01:01:50 +0200 Subject: [PATCH] dfsfsd --- files/classes/mod_logs.py | 20 ++++++++++---------- files/routes/static.py | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index 3516b750d..93fb41ee5 100644 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -319,16 +319,6 @@ ACTIONTYPES2={ "icon": "fa-user-slash", "color": "bg-muted", }, - "club_allow":{ - "str":'allowed user {self.target_link} into the {cc}', - "icon":"fa-user-slash", - "color": "bg-danger", - }, - "club_ban":{ - "str":'disallowed user {self.target_link} from the {cc}', - "icon": "fa-user-slash", - "color": "bg-muted", - }, "nuke_user":{ "str":'removed all content of {self.target_link}', "icon":"fa-user-slash", @@ -399,6 +389,16 @@ ACTIONTYPES2={ "icon":"fa-feather-alt", "color": "bg-muted", }, + "club":{ + "str": 'marked post {self.target_link} as club-only', + "icon":"fa-eye-slash", + "color": "bg-danger", + }, + "unclub":{ + "str": 'unmarked post {self.target_link} as club-only', + "icon":"fa-eye", + "color": "bg-muted", + }, "ban_comment":{ "str": 'removed {self.target_link}', "icon":"fa-comment", diff --git a/files/routes/static.py b/files/routes/static.py index baaa7afc7..585f34a72 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -190,9 +190,10 @@ def log(v): actions = g.db.query(ModAction) if not (v and v.admin_level > 1): - actions = actions.filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub", ModAction.kind!="check") + actions = actions.filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club_allow", ModAction.kind!="club_ban", ModAction.kind!="check") if admin_id: actions = actions.filter_by(user_id=admin_id) + if kind: actions = actions.filter_by(kind=kind) actions = actions.order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all() next_exists=len(actions)>25