2021-12-31 21:17:05 +00:00
{%
set colors = {
'fa-user-slash': 'text-red-600',
'fa-feather-alt': 'text-gray-500',
'fa-eye-evil': 'text-red-600'
2021-12-31 21:18:10 +00:00
}
2021-12-31 21:17:05 +00:00
%}
2021-12-31 16:33:21 +00:00
{% extends "CHRISTMAS/default.html" %}
2021-12-14 22:48:37 +00:00
{% block pagetitle %}Moderation Log{% endblock %}
2021-12-31 20:35:25 +00:00
{% block subHeader %}
< div class = "relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t" >
< div class = "absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-300 to-gray-200 dark:bg-none dark:bg-gray-800 rounded-t sub-header-shadow dark:border-b dark:border-gray-700 sub-header" > < / div >
< div class = "relative col-span-full flex items-center" >
< div >
< h1 class = "font-bold text-xl font-heading leading-normal mb-0" >
Moderation Log
< / h1 >
< ul class = "flex space-x-2 text-xs text-gray-500 dark:text-gray-400 leading-normal mb-0" >
2021-12-31 20:40:19 +00:00
{% if v and v.admin_level > 2 %}
2021-12-31 20:35:25 +00:00
< li >
< a href = "/admin" class = "text-gray-500 hover:underline" > Admin Dashboard< / a >
< / li >
< li >
< i class = "fas fa-arrow-alt-right text-shadow fa-fw fa-sm" > < / i >
< / li >
2021-12-31 20:40:19 +00:00
{% endif %}
2021-12-31 20:35:25 +00:00
< li >
< a href = "#" class = "text-gray-700 dark:text-gray-500 hover:underline" > Moderation Log< / a >
< / li >
< / ul >
< / div >
2021-12-31 20:45:57 +00:00
< div class = "ml-auto flex space-x-2" >
2021-12-31 21:13:43 +00:00
<!-- Filter by mod -->
2021-12-31 20:35:25 +00:00
< div class = "dropdown" >
2021-12-31 21:24:25 +00:00
< button class = "inline-flex items-center px-4 py-2 bg-gradient-to-t from-gray-200 to-gray-100 focus:from-gray-100 focus:to-gray-200 border border-gray-300 rounded-md text-shadow shadow-inset-t-white-10 text-sm font-bold text-gray-700 focus:text-gray-900 focus:shadow-inner focus:outline-none dropdown-toggle" type = "button" id = "dropdownLogSortsButton" data-bs-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
2021-12-31 20:35:25 +00:00
{% if admin %}
2021-12-31 21:25:05 +00:00
< img src = "/@{{admin}}/pic" alt = "{{ admin }}avatar" class = "flex-shrink-0 w-4 h-4 object-cover mr-2" > {{ admin }}
2021-12-31 20:35:25 +00:00
{% else %}
2021-12-31 21:25:05 +00:00
< img src = "/assets/images/emojis/marseyjanny.webp" alt = "default mod avatar" class = "flex-shrink-0 w-4 h-4 object-cover mr-4" > All
2021-12-31 20:35:25 +00:00
{% endif %}
< / button >
< ul class = "dropdown-menu w-56 bg-gray-900 rounded-md shadow-lg" aria-labelledby = "dropdownLogSortsButton" x-placement = "bottom-start" >
2021-12-31 20:40:19 +00:00
< li >
2021-12-31 20:41:09 +00:00
< a class = "dropdown-item dropdown-item-primary" href = "/log{% if type %}?kind={{type}}{% endif %}" >
2021-12-31 21:25:05 +00:00
< img src = "/assets/images/emojis/marseyjanny.webp" alt = "default mod avatar" class = "flex-shrink-0 w-4 h-4 object-cover mr-4" > All
2021-12-31 20:35:25 +00:00
< / a >
< / li >
2021-12-31 20:40:19 +00:00
{% for a in admins %}
< li >
2021-12-31 20:41:09 +00:00
< a class = "dropdown-item dropdown-item-primary" href = "?admin={{a}}{% if type %}&kind={{type}}{% endif %}" >
2021-12-31 21:25:05 +00:00
< img src = "/@{{a}}/pic" alt = "{{ a }} avatar" class = "flex-shrink-0 w-4 h-4 object-cover mr-4" > {{ a }}
2021-12-31 20:35:25 +00:00
< / a >
< / li >
2021-12-31 20:40:19 +00:00
{% endfor %}
2021-12-31 20:35:25 +00:00
< / ul >
< / div >
2021-12-31 21:13:43 +00:00
<!-- Filter by action -->
2021-12-31 20:45:57 +00:00
< div class = "dropdown" >
2021-12-31 21:24:25 +00:00
< button class = "inline-flex items-center px-4 py-2 bg-gradient-to-t from-gray-200 to-gray-100 focus:from-gray-100 focus:to-gray-200 border border-gray-300 rounded-md text-shadow shadow-inset-t-white-10 text-sm font-bold text-gray-700 focus:text-gray-900 focus:shadow-inner focus:outline-none dropdown-toggle" type = "button" id = "dropdownLogActionSortsButton" data-bs-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
{% if type %}
< i class = "fas {{types[type]['icon']}} fa-fw mr-2" > < / i > {{type}}
{% else %}
< i class = "fas fa-broom fa-fw mr-2" > < / i > All
{% endif %}
2021-12-31 20:45:57 +00:00
< / button >
< ul class = "dropdown-menu w-56 bg-gray-900 rounded-md shadow-lg" aria-labelledby = "dropdownLogActionSortsButton" x-placement = "bottom-start" >
< li >
< a class = "dropdown-item dropdown-item-primary" href = "/log{% if admin %}?admin={{admin}}{% endif %}" >
< i class = "fas fa-broom fa-fw mr-2" > < / i > All
< / a >
< / li >
{% for t, v in types.items() %}
< li >
< a class = "dropdown-item dropdown-item-primary" href = "?{% if admin %}admin={{admin}}&{% endif %}kind={{t}}" >
< i class = "fas {{v['icon']}} fa-fw mr-2" > < / i > {{t}}
< / a >
< / li >
{% endfor %}
< / ul >
< / div >
2021-12-14 22:48:37 +00:00
< / div >
2021-12-31 20:45:57 +00:00
< / div >
< / div >
{% endblock %}
2021-12-14 22:48:37 +00:00
2021-12-31 20:45:57 +00:00
{% block content %}
2021-12-31 20:35:25 +00:00
2021-12-31 20:45:57 +00:00
< div class = "col-span-full my-4" >
2021-12-14 22:48:37 +00:00
2021-12-31 21:18:10 +00:00
{% if actions %}
< ul class = "flex flex-col divide-y divide-gray-300 dark:divide-gray-700 space-y-2.5 mb-0 list-none" >
{% for ma in actions %}
< li id = "action-{{ma.id}}" class = "relative flex pt-2.5 first:pt-0" >
< div class = "w-6 h-6 flex justify-center items-center flex-shrink-0" >
< i class = "far {{ ma.icon }} {{ colors[ma.icon] }} fa-fw" > < / i >
< / div >
< div class = "pl-2 text-gray-500 dark:text-gray-400 text-sm" >
< div >
< a href = "{{ma.user.url}}" class = "font-font text-black dark:text-gray-200 hover:text-primary dark:hover:text-primary" target = "_self" > @{{ma.user.username}}
< / a >
< span > {{ma.string | safe}}< / span >
2021-12-31 21:17:05 +00:00
< / div >
2021-12-31 21:18:10 +00:00
< div class = "text-gray-400 dark:text-gray-500 text-xs" >
< span > {{ma.age_string}}< / span >
2021-12-14 22:48:37 +00:00
< / div >
2021-12-31 21:18:10 +00:00
< / div >
< / li >
{% endfor %}
< / ul >
{% else %}
< div class = "flex flex-col items-center justify-center py-24 md:py-48" >
< img loading = "lazy" src = "https://c.tenor.com/NhDy-AkelhQAAAAM/marsey-drama.gif" class = "w-20 h-20 mb-4 rounded-md object-cover" >
< h2 class = "text-xl font-bold leading-normal font-heading" > No logs< / h2 >
< p class = "text-gray-500 text-sm" >
When mods perform actions, it will show up here.
< / p >
{% if v and v.admin_level > 2 %}
< a href = "/admin" class = "mt-3 btn btn-gray" >
Go to admin dashboard
< / a >
2021-12-31 21:17:05 +00:00
{% else %}
2021-12-31 21:18:10 +00:00
< a href = "/" class = "mt-3 btn btn-gray" >
Go to homepage
< / a >
2021-12-31 21:17:05 +00:00
{% endif %}
< / div >
2021-12-31 21:18:10 +00:00
{% endif %}
2021-12-14 22:48:37 +00:00
2021-12-31 21:17:05 +00:00
< nav aria-label = "Page navigation" class = "mb-5" >
< ul class = "pagination pagination-sm mb-0" >
{% if page>1 %}
< li class = "page-item" >
< small > < a class = "page-link" href = "/log?page={{page+1}}{% if admin %}&admin={{admin}}{% endif %}{% if type %}&kind={{type}}{% endif %}" tabindex = "-1" > Prev< / a > < / small >
< / li >
{% else %}
< li class = "page-item disabled" > < span class = "page-link" > Prev< / span > < / li >
{% endif %}
{% if next_exists %}
< li class = "page-item" >
< small > < a class = "page-link" href = "/log?page={{page+1}}{% if admin %}&admin={{admin}}{% endif %}{% if type %}&kind={{type}}{% endif %}" > Next< / a > < / small >
< / li >
{% else %}
< li class = "page-item disabled" > < span class = "page-link" > Next< / span > < / li >
{% endif %}
< / ul >
< / nav >
2021-12-14 22:48:37 +00:00
< / div >
{% endblock %}