forked from rDrama/rDrama
1
0
Fork 0
retarD/files/templates/admin/admin_home.html

137 lines
4.4 KiB
HTML
Raw Normal View History

2022-05-04 23:09:46 +00:00
{% extends "default.html" %}
{# Title (~25char max), Description (~80char max),
Icon (fa-foo-bar), Color (#ff0000), URL (/post/12345/) #}
{%-
set ADMIN_INDEX = [
(
'Content',
'fa-book', '#6b8e23',
(
('/admin/image_posts','Image Posts'),
('/admin/reported/posts','Reported Posts/Comments'),
('/admin/removed/posts','Removed Posts/Comments'),
),
),
(
'Users',
'fa-user', '#f5fffa',
(
('/admin/users','Users Feed'),
('/admin/shadowbanned','Shadowbanned Users'),
('/banned','Permabanned Users'),
('/agendaposters','Users with Chud Theme'),
('/grassed','Currently Grassed Users'),
('/patrons','Patrons / Paypigs'),
('/admin/loggedin','Currently Logged-in Users'),
('/admin/loggedout','Currently Logged-out Users'),
),
),
(
'Safety',
'fa-shield', '#87cefa',
(
('/admin/banned_domains','Banned Domains'),
('/admin/alt_votes','Multi Vote Analysis'),
),
),
(
'Grant',
'fa-award', '#adff2f',
(
('/admin/awards','Give User Award'),
('/admin/badge_grant','Grant Badges'),
('/admin/badge_remove','Remove Badges'),
),
),
(
'API Access Control',
'fa-robot', 'red',
(
('/admin/apps','Apps'),
),
),
(
'Statistics',
'fa-chart-line', '#c9d1d9',
(
('/stats','Content Stats'),
('/weekly_chart','Weekly Stat Chart'),
('/daily_chart','Daily Stat Chart'),
),
),
]
-%}
2022-05-04 23:09:46 +00:00
{% block content %}
<div id="directory--wrapper">
{% for thread in ADMIN_INDEX %}
<div class="directory--link">
<div class="directory--link-content">
<i class="directory--link--icon fas {{thread[1]}}" style="color:{{thread[2]}}"></i>
<div class="directory--link--title">{{thread[0]|safe}}</div>
{% for asdf in thread[3] %}
<a href="{{asdf[0]}}">{{asdf[1]}}</a><br>
{% endfor %}
</div>
</div>
{% endfor %}
{% if LOTTERY_ENABLED -%}
<div class="directory--link">
<div class="directory--link-content">
<i class="directory--link--icon fas fa-sack-dollar" style="color:#ffd700"></i>
<div class="directory--link--title">Lottery</div>
<a href="/admin/lottery/participants">Participants</a><br>
</div>
</div>
{%- endif %}
{% if SITE_NAME == 'PCM' %}
<div class="directory--link">
<div class="directory--link-content">
<i class="directory--link--icon fas fa-sidebar" style="color:#f5fffa"></i>
<div class="directory--link--title">Configuration</div>
<a href="/admin/sidebar">Edit Sidebar</a><br>
</div>
</div>
{% endif %}
</div>
2022-05-04 23:09:46 +00:00
{% if v.admin_level > 2 %}
<pre></pre>
2022-05-04 23:09:46 +00:00
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="signups" {% if site_settings['Signups'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Signups');">
<label class="custom-control-label" for="signups">Signups</label>
</div>
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="bots" {% if site_settings['Bots'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Bots');">
<label class="custom-control-label" for="bots">Bots</label>
</div>
2022-05-25 11:24:34 +00:00
{% if SITE_NAME == 'rDrama' %}
2022-05-04 23:09:46 +00:00
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="Fart mode" {% if site_settings['Fart mode'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Fart mode');">
<label class="custom-control-label" for="Fart mode">Fart mode</label>
</div>
2022-05-25 11:24:34 +00:00
{% endif %}
2022-05-04 23:09:46 +00:00
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="Read-only mode" {% if site_settings['Read-only mode'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Read-only mode');">
<label class="custom-control-label" for="Read-only mode">Read-only mode</label>
</div>
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="under_attack" name="under_attack" {% if under_attack%}checked{% endif %} onchange="post_toast(this,'/admin/under_attack');">
<label class="custom-control-label" for="under_attack">Under attack mode</label>
</div>
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');" style="margin-bottom: 2em;">PURGE CACHE</button>
{% endif %}
2022-05-04 23:09:46 +00:00
<h4>Server Status</h4>
<div>
Live Revision: <code>{{ gitref }}</code> <br>
</div>
{% endblock %}