rDrama/files/templates/admin/admin_home.html

161 lines
6.6 KiB
HTML
Raw Normal View History

2022-05-04 23:09:46 +00:00
{% extends "default.html" %}
2022-11-19 22:20:38 +00:00
{% block pagetitle %}{{SITE_NAME}}{% endblock %}
2022-10-23 15:24:38 +00:00
{% block customPadding %}px-3{% endblock %}
2022-05-04 23:09:46 +00:00
{% block content %}
<h3 class="pb-2 mt-2">Admin Tools</h3>
2022-10-06 06:18:08 +00:00
{% if (v.admin_level >= PERMS['SITE_SETTINGS_SIDEBARS_BANNERS_BADGES'] or v.admin_level >= PERMS['SITE_SETTINGS_SNAPPY_QUOTES']) and (SITE_NAME == 'rDrama' or SIDEBAR_THREAD or BANNER_THREAD or BADGE_THREAD or SNAPPY_THREAD) %}
<h4>Add Stuff</h4>
<ul>
2022-10-06 06:18:08 +00:00
{% if v.admin_level >= PERMS['SITE_SETTINGS_SIDEBARS_BANNERS_BADGES'] %}
{% if SIDEBAR_THREAD %}
<li><a href="/post/{{SIDEBAR_THREAD}}">Add Sidebar Images</a></li>
{% endif %}
{% if BANNER_THREAD %}
<li><a href="/post/{{BANNER_THREAD}}">Add Banners</a></li>
{% endif %}
{% if BADGE_THREAD %}
<li><a href="/post/{{BADGE_THREAD}}">Add Badges</a></li>
{% endif %}
{% endif %}
2022-10-06 06:18:08 +00:00
{% if SNAPPY_THREAD and v.admin_level >= PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] %}
<li><a href="/post/{{SNAPPY_THREAD}}">Add Snappy Quotes</a></li>
{% endif %}
2022-09-17 15:08:24 +00:00
{% if SITE_NAME == 'rDrama' %}
<li><a href="/admin/update/marseys">Update Marseys</a></li>
2022-09-18 17:38:53 +00:00
<li><a href="/admin/update/hats">Update Hats</a></li>
2022-09-17 15:08:24 +00:00
{% endif %}
</ul>
{% endif %}
<h4>Content</h4>
<ul>
<li><a href="/log">Moderation Log</a></li>
2022-10-06 06:18:08 +00:00
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<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>
{% endif %}
</ul>
<h4>Users</h4>
<ul>
2022-10-06 06:18:08 +00:00
{% if v.admin_level >= PERMS['VIEW_ALL_USERS'] %}
<li><a href="/admin/users">Users Feed</a></li>
{% endif %}
{% if v.admin_level >= PERMS['USER_SHADOWBAN'] %}
<li><a href="/admin/shadowbanned">Shadowbanned Users</a></li>
{% endif %}
<li><a href="/banned">Permabanned Users</a></li>
2022-07-19 23:59:39 +00:00
{% if FEATURES['AWARDS'] -%}
2022-11-20 17:37:45 +00:00
<li><a href="/chuds">Permachudded Users</a></li>
2022-07-19 23:59:39 +00:00
<li><a href="/grassed">Currently Grassed Users</a></li>
{%- endif %}
2022-09-30 21:07:53 +00:00
{% if FEATURES['PROCOINS'] and (not AEVANN_ID or v.id in (AEVANN_ID, CARP_ID, SNAKES_ID)) -%}
2022-09-17 22:06:49 +00:00
<li><a href="/patrons">Patrons</a></li>
2022-07-19 23:59:39 +00:00
{%- endif %}
2022-10-06 06:18:08 +00:00
{% if v.admin_level >= PERMS['VIEW_ACTIVE_USERS'] %}
<li><a href="/admin/loggedin">Currently Logged-in Users</a></li>
<li><a href="/admin/loggedout">Currently Logged-out Users</a></li>
{% endif %}
</ul>
<h4>Safety</h4>
<ul>
<li><a href="/admin/banned_domains">Banned Domains</a></li>
account linking improvements (#448) currently account delinking is very messy and can sometimes just not work we do codey stuff so it's not as bad also we create a pretty page for mops to mop up borked account links * alts: allow proper delinking * fix prev commit * url fix * fix 500 * fixes * :pepodrool: * flag * :pepodrool: redux * sdsdsdsds * correct endpoint * fix html page * alts: only adjust session history if flag is set * fix 500 * allow relinking * fsdsds * :pepodrool: redux * alts: don't fail if an alt isn't history * use postToastSwitch + some API changes * remove unnecessary variables * d-none * delink accounts mod action * fa-link-slash * alts: add form to create alt * remove copied and pasted template * rounded section * UI improvement + fix * \n * fix status * admin: remove duplicate route admin: do a permissions check on 2 pages that need it admin: set the manual flag for manually flagged alts * variable change * fix 500 * alts * add shadowban icon to alt link tool * shadowbanned tooltip * add user info section * fix 500, remove unnecessary form, and add alt votes button * trans and also link to page * margin * sdsdsd * stop the count * fix prev commit * with ctx * plural * alts * don't show shadowbanned users to those who can't see them this is... extremely rare and won't ever be seen in production however if perms were ever rearranged in the future, this keeps permissions correct * shadowban check in alt list * let shadow realm enthusiasts see shadowban alts * sdsdsds * test * be graceful where needed * sdsdsdsds * alts: don't allow adding the same account alts: clarify wording * rename and reorder on admin panel * EOL * remove frankly unnecessary check * try with a set * test * Revert "try with a set" This reverts commit 72be353fba5ffa39b37590cc5d3bf584c94ee06e. * Revert "Revert "try with a set"" This reverts commit 81e41890a192e8b46d0463477998e905fddf56ba. * Revert "Revert "Revert "try with a set""" This reverts commit be51592135a3c09848f993f0154bd2ac862ae505. * clean up test
2022-11-14 17:32:13 +00:00
{% if v.admin_level >= PERMS['USER_LINK'] %}
<li><a href="/admin/alts/">View and Link Alts</a></li>
{% endif %}
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
<li><a href="/admin/alt_votes">Multi Vote Analysis</a></li>
{% endif %}
</ul>
2022-11-18 15:30:17 +00:00
{% if FEATURES['BADGES'] -%}
<h4>Grant</h4>
<ul>
2022-10-06 06:18:08 +00:00
{% if FEATURES['BADGES'] and v.admin_level >= PERMS['USER_BADGES'] -%}
2022-07-19 23:59:39 +00:00
<li><a href="/admin/badge_grant">Grant Badges</a></li>
<li><a href="/admin/badge_remove">Remove Badges</a></li>
{%- endif %}
</ul>
2022-07-19 23:59:39 +00:00
{%- endif %}
2022-10-11 13:19:55 +00:00
{% if FEATURES['GAMBLING'] -%}
<h4>Casino</h4>
<ul>
<li><a href="/admin/lottery/participants">Participants</a></li>
</ul>
{%- endif %}
<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>
2022-07-12 19:32:34 +00:00
<h4>Configuration</h4>
<ul>
2022-10-06 06:18:08 +00:00
{% if v.admin_level >= PERMS['HOLE_CREATE'] %}
2022-10-10 05:23:02 +00:00
<li><a href="/create_hole">Create {{HOLE_NAME | capitalize}}</a></li>
2022-10-06 06:18:08 +00:00
{% endif %}
{% if v.admin_level >= PERMS['APPS_MODERATION'] %}
2022-10-06 06:18:08 +00:00
<li><a href="/admin/apps">Apps</a></li>
{% endif %}
2022-07-12 19:32:34 +00:00
</ul>
2022-05-04 23:09:46 +00:00
2022-10-06 06:18:08 +00:00
{% if v.admin_level >= PERMS['SITE_SETTINGS'] %}
<div class="custom-control custom-switch mt-1">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="signups" {% if site_settings['Signups'] %}checked{% endif %} onchange="postToastSwitch(this,'/admin/site_settings/Signups');">
2022-05-04 23:09:46 +00:00
<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="postToastSwitch(this,'/admin/site_settings/Bots');">
2022-10-27 08:38:07 +00:00
<label class="custom-control-label" for="bots">Bots</label>
</div>
2022-05-04 23:09:46 +00:00
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="login_required" {% if site_settings['login_required'] %}checked{% endif %} onchange="postToastSwitch(this,'/admin/site_settings/login_required');">
2022-10-27 08:38:07 +00:00
<label class="custom-control-label" for="login_required">Login Required</label>
2022-05-04 23:09:46 +00:00
</div>
<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="postToastSwitch(this,'/admin/site_settings/Fart mode');">
2022-05-04 23:09:46 +00:00
<label class="custom-control-label" for="Fart mode">Fart mode</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="postToastSwitch(this,'/admin/site_settings/Read-only mode');">
2022-05-04 23:09:46 +00:00
<label class="custom-control-label" for="Read-only mode">Read-only mode</label>
</div>
2022-10-06 06:18:08 +00:00
{% if v.admin_level >= PERMS['SITE_SETTINGS_UNDER_ATTACK'] %}
<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="postToastSwitch(this,'/admin/under_attack');">
2022-10-06 06:18:08 +00:00
<label class="custom-control-label" for="under_attack">Under attack mode</label>
</div>
{% endif %}
2022-06-22 16:17:26 +00:00
<br>
{% if SITE == 'pcmemes.net' and v.admin_level >= PERMS['PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES'] %}
<button type="button" class="btn btn-primary" onclick="postToastSwitch(this,'/kippy');" style="margin-bottom: 2em;">Print 10k Marseybux</button>
2022-06-22 16:17:26 +00:00
{% endif %}
{% endif %}
2022-05-04 23:09:46 +00:00
{% if v.admin_level >= PERMS['SITE_CACHE_PURGE_CDN'] or v.admin_level >= PERMS['SITE_CACHE_DUMP_INTERNAL'] %}
<h4>Caching</h4>
{% if v.admin_level >= PERMS['SITE_CACHE_PURGE_CDN'] %}
2022-11-06 05:28:44 +00:00
<button type="button" class="btn btn-primary mt-3" onclick="postToastSwitch(this,'/admin/clear_cloudflare_cache');" style="margin-bottom: 2em;">CLEAR CLOUDFLARE CACHE</button>
{% endif %}
{% if v.admin_level >= PERMS['SITE_CACHE_DUMP_INTERNAL'] %}
2022-11-06 05:28:44 +00:00
<button type="button" class="btn btn-primary mt-3 ml-2" onclick="postToastSwitch(this,'/admin/clear_internal_cache');" style="margin-bottom: 2em;">CLEAR INTERNAL CACHE</button>
{% endif %}
{% endif %}
<h4>Server Status</h4>
<div>
Live Revision: <code>{{gitref[0]}}</code><code>{{gitref[1]}}</code>
</div>
2022-10-05 21:23:00 +00:00
{% endblock %}