125 lines
4.9 KiB
HTML
125 lines
4.9 KiB
HTML
{% extends "default.html" %}
|
|
|
|
{% block title %}
|
|
<title>{{SITE_TITLE}}</title>
|
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<pre></pre>
|
|
<pre></pre>
|
|
<h3>Admin Tools</h3>
|
|
|
|
<div class="mb-3">
|
|
<strong>Users Here Now:</strong> {{g.loggedin_counter + g.loggedout_counter}} —
|
|
<a href="/admin/loggedin">{{g.loggedin_counter}} Logged-In</a> |
|
|
<a href="/admin/loggedout">{{g.loggedout_counter}} Logged-Out</a>
|
|
</div>
|
|
|
|
<h4>Content</h4>
|
|
<ul>
|
|
<li><a href="/admin/image_posts">Image Posts</a></li>
|
|
<li><a href="/admin/reported/posts">Reported Posts/Comments</a></li>
|
|
<li><a href="/admin/removed/posts">Removed Posts/Comments</a></li>
|
|
</ul>
|
|
|
|
<h4>Filtering</h4>
|
|
<ul>
|
|
<li><a href="/admin/filtered/posts">Filtered Posts/Comments</a></li>
|
|
</ul>
|
|
|
|
<h4>Users</h4>
|
|
<ul>
|
|
<li><a href="/admin/users">Users Feed</a></li>
|
|
<li><a href="/admin/shadowbanned">Shadowbanned Users</a></li>
|
|
<li><a href="/banned">Permabanned Users</a></li>
|
|
</ul>
|
|
|
|
<h4>Safety</h4>
|
|
<ul>
|
|
<li><a href="/admin/banned_domains">Banned Domains</a></li>
|
|
<li><a href="/admin/alt_votes">Multi Vote Analysis</a></li>
|
|
</ul>
|
|
|
|
<h4>Grant</h4>
|
|
<ul>
|
|
<li><a href="/admin/badge_grant">Grant Badges</a></li>
|
|
<li><a href="/admin/badge_remove">Remove Badges</a></li>
|
|
</ul>
|
|
|
|
<h4>API Access Control</h4>
|
|
<ul>
|
|
<li><a href="/admin/apps">Apps</a></li>
|
|
</ul>
|
|
|
|
<h4>Statistics</h4>
|
|
<ul>
|
|
<li><a href="/stats">Content Stats</a></li>
|
|
<li><a href="/weekly_chart">Weekly Stat Chart</a></li>
|
|
<li><a href="/daily_chart">Daily Stat Chart</a></li>
|
|
</ul>
|
|
|
|
{% if v.admin_level >= 3 %}
|
|
<pre></pre>
|
|
<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>
|
|
|
|
<div class="custom-control custom-switch">
|
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="FilterNewPosts" {% if site_settings['FilterNewPosts'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/FilterNewPosts');">
|
|
<label class="custom-control-label" for="FilterNewPosts">Filter New Posts</label>
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<h4>Comment Filtering</h4>
|
|
<div class="custom-control custom-switch">
|
|
<input type="number" class="" id="min_comments" name="min_comments" value="{{ site_settings['FilterCommentsMinComments'] }}"
|
|
onblur="post_toast(null, '/admin/site_settings/FilterCommentsMinComments', false, { new_value: this.value })"/>
|
|
<label for="min_comments">Minimum Comments</label>
|
|
</div>
|
|
<div class="custom-control custom-switch">
|
|
<input type="number" class="" id="min_karma" name="min_karma" value="{{ site_settings['FilterCommentsMinKarma'] }}"
|
|
onblur="post_toast(null, '/admin/site_settings/FilterCommentsMinKarma', false, { new_value: this.value })"/>
|
|
<label for="min_karma">Minimum Karma</label>
|
|
</div>
|
|
<div class="custom-control custom-switch">
|
|
<input type="number" class="" id="min_age" name="min_age" value="{{ site_settings['FilterCommentsMinAgeDays'] }}"
|
|
onblur="post_toast(null, '/admin/site_settings/FilterCommentsMinAgeDays', false, { new_value: this.value })"/>
|
|
<label for="min_age">Minimum Account Age (days)</label>
|
|
</div>
|
|
|
|
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');">PURGE CDN CACHE</button>
|
|
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/dump_cache');">DUMP INTERNAL CACHE</button>
|
|
{% endif %}
|
|
{% if g.debug %}
|
|
<section id="admin-section-debug" class="admin-section mt-3">
|
|
<h4>Debug Options</h4>
|
|
{% if v.admin_level >= PERMS["DEBUG_LOGIN_TO_OTHERS"] %}
|
|
<div class="login-to-others mt-3">
|
|
<h5>Login to another's account</h5>
|
|
<form action="/dev/sessions/" method="post">
|
|
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
|
<label for="username">Username</label>
|
|
<input name="username" required>
|
|
<button type="submit" class="btn btn-primary">Login</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
</section>
|
|
{% endif %}
|
|
{% endblock %}
|