forked from rDrama/rDrama
1
0
Fork 0
master
kek7198 2021-12-31 15:17:05 -06:00
parent cffd1225da
commit 4d2a91f947
1 changed files with 65 additions and 54 deletions

View File

@ -1,3 +1,11 @@
{%
set colors = {
'fa-user-slash': 'text-red-600',
'fa-feather-alt': 'text-gray-500',
'fa-eye-evil': 'text-red-600'
}
%}
{% extends "CHRISTMAS/default.html" %}
{% block pagetitle %}Moderation Log{% endblock %}
@ -53,9 +61,9 @@
<div class="dropdown">
<button class="block 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}}
<i class="fas {{types[type]['icon']}} fa-fw mr-2"></i>{{type}}
{% else %}
<i class="fas fa-broom fa-fw mr-2"></i>All
<i class="fas fa-broom fa-fw mr-2"></i>All
{% endif %}
</button>
<ul class="dropdown-menu w-56 bg-gray-900 rounded-md shadow-lg" aria-labelledby="dropdownLogActionSortsButton" x-placement="bottom-start">
@ -83,64 +91,67 @@
<div class="col-span-full my-4">
<div class="col h-100">
<div class="rounded border bg-white mx-auto">
<div class="rounded border bg-white mx-auto">
{% 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 %}
<div id="action-{{ma.id}}" class="position-relative d-flex justify-content-between flex-wrap align-items-center h-min-16 px-3 py-3 mb-3 mb-md-2 bg-white{% if loop.index > 1 %} border-top{% endif %}">
<div class="d-flex flex-grow-1 align-items-center">
<div class="d-flex align-items-center justify-content-center {{ma.color}} mr-3 rounded-lg flex-shrink-0" style="width: 32px;height: 32px;"><i class="far text-center {{ma.icon}} text-lg text-white fa-fw"></i></div>
<div class="d-flex align-items-center">
<span class="rounded">
<img src="{{ma.user.profile_url}}" alt="avatar" width=42 height=42 class="rounded-circle">
</span>
<div class="text-muted pl-3">
<div>
<a href="{{ma.user.url}}" class="font-weight-bold text-black" target="_self">@{{ma.user.username}}</a>
<span>{{ma.string | safe}}</span>
</div>
<div class="text-gray-500">{{ma.age_string}} <a href="{{ma.permalink}}"><i class="far fa-link ml-1 text-muted"></i></a>
<a href="javascript:void(0)" class="copy-link" role="button"data-clipboard-text="{{ma.permalink | full_link}}"><i class="far fa-copy ml-1 text-muted"></i></a>
</div>
</div>
<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>
</div>
<div class="text-gray-400 dark:text-gray-500 text-xs">
<span>{{ma.age_string}}</span>
</div>
</div>
</div>
{% else %}
<div>There's nothing here right now.</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>
{% else %}
<a href="/" class="mt-3 btn btn-gray">
Go to homepage
</a>
{% endif }
</div>
<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>
{% endif %}
</div>
<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>
</div>
<script src="/assets/CHRISTMAS/js/clipboard.js?a=1"></script>
{% endblock %}