rDrama/files/templates/admin/admin_home.html

144 lines
5.2 KiB
HTML
Raw Normal View History

2022-05-04 23:09:46 +00:00
{% extends "default.html" %}
[DO NOT MERGE] titlesssssssssss (#468) * titles * testing * self * Revert "self" This reverts commit d6c12d5a5ba125feb44673f55e1fdac75f151cb5. * Revert "testing" This reverts commit 86d800f9fd552196b31f0e0b3891d4fc072a9bc0. * testing on devrama * rewrite the html head * reference error or smth idk * tempalte debug * template debug redux * default2 * rename default2 -> root, page title * fix settings2 * include the set_variables block * root scope variables 2 * test 3 * remove unnecessary set * add pagetitles to all settings2 pages * add pagetitle to casino * remove bloat * remove duplicate site name thingy * page titles 2 * page titles 3 * remove duplicate imports and add page titles everywhere iirc * ok but actually this time * remove unnecessary newlines * fix title lol * > * fsdfsfsfsfsfs * fsfs * template configurations * fix 500 * reduce login template bloat * move files and add status codes where needful * move authfroms to login * remove 2fa bloat * verification code * sign up fixes * readability * fssfsfsfs * move forgot password to login/ * readability * don't emit comments * add page titles where needful * gsgsgs * modals: move to respective pages * testing on devrama * get home garbage out of title * remove insane amount of icon duplication * sign up text * add votes pagetitle * fix blank lines * Revert "fix blank lines" This reverts commit b2c54339970725d00b6fc82bb458c1757909952c. * Fix blank lines on sign_up.html. * title: votes.html more meaningful identifier. * titles: Lottery, Directory, Notifications * head final in submission.html * fix missing comma * > * test * title: /comments * fsfsfsfsf * titles: user_cards * head: only load video and audio meta attributes if they actually exist * titlessssss: /admin/lottery/participants * titlessssssss: extra quote in search.html * titlessssss: userpage voters. * titties: /h/<sub>/{followers,blockers,exilees[sic]} * test banner * Revert "test banner" This reverts commit c3d875d03f3e60d72a60dab7d28bf108554a5826. * make submit.html inherit from default.html Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 08:52:22 +00:00
{% block pagetitle %}Admin Home{% 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="py-2">Admin Tools</h3>
2023-03-05 10:03:21 +00:00
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] and (SITE_NAME == 'rDrama' or SIDEBAR_THREAD or BANNER_THREAD or BADGE_THREAD or SNAPPY_THREAD) %}
<h4>Add Stuff</h4>
<ul>
2023-03-05 10:03:21 +00:00
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] %}
2022-10-06 06:18:08 +00:00
{% 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 %}
2023-03-05 10:03:21 +00:00
{% if SNAPPY_THREAD %}
<li><a href="/post/{{SNAPPY_THREAD}}">Add Snappy Quotes</a></li>
{% endif %}
{% endif %}
2023-03-05 10:03:21 +00:00
2022-09-17 15:08:24 +00:00
{% if SITE_NAME == 'rDrama' %}
2023-02-18 21:07:37 +00:00
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %}
<li><a href="/submit/emojis">Approve or Reject Emojis</a></li>
2023-02-18 21:07:37 +00:00
<li><a href="/submit/hats">Approve or Reject Hats</a></li>
{% endif %}
{% if v.admin_level >= PERMS['UPDATE_ASSETS'] %}
<li><a href="/admin/update/emojis">Update Emojis</a></li>
2023-02-18 21:07:37 +00:00
<li><a href="/admin/update/hats">Update Hats</a></li>
{% endif %}
2022-09-17 15:08:24 +00:00
{% endif %}
</ul>
{% endif %}
<h4>Content</h4>
<ul>
2023-05-12 15:27:46 +00:00
{% if v.admin_level >= PERMS['ENABLE_DM_MEDIA'] %}
<li><a href="/admin/dm_media">DM Media</a></li>
{% endif %}
<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['USER_SHADOWBAN'] %}
<li><a href="/admin/shadowbanned">Shadowbanned Users</a></li>
{% endif %}
2023-02-19 19:17:09 +00:00
<li><a href="/banned">Banned Users</a></li>
2022-07-19 23:59:39 +00:00
{% if FEATURES['AWARDS'] -%}
<li><a href="/chuds">Chudded Users</a></li>
2022-07-19 23:59:39 +00:00
<li><a href="/grassed">Currently Grassed Users</a></li>
{%- endif %}
2023-01-22 08:04:49 +00:00
{% if FEATURES['MARSEYBUX'] and v.admin_level >= PERMS['VIEW_PATRONS'] -%}
2023-05-03 14:45:14 +00:00
<li><a href="/admin/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>
2023-02-19 19:31:26 +00:00
{% if v.admin_level >= PERMS['DELETE_MEDIA'] %}
<li><a href="/admin/delete_media">Delete Media</a></li>
{% endif %}
2023-02-19 19:17:09 +00:00
{% if v.admin_level >= PERMS['DOMAINS_BAN'] %}
<li><a href="/admin/banned_domains">Banned Domains</a></li>
{% endif %}
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">Alt Vote Analysis</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
{% endif %}
</ul>
2023-03-15 04:50:56 +00:00
{% if FEATURES['BADGES'] and v.admin_level >= PERMS['USER_BADGES'] -%}
<h4>Badges</h4>
<ul>
2023-03-15 04:50:56 +00:00
<li><a href="/admin/badge_grant">Grant Badges</a></li>
<li><a href="/admin/badge_remove">Remove Badges</a></li>
</ul>
2022-07-19 23:59:39 +00:00
{%- endif %}
2023-03-15 04:50:56 +00:00
{% if FEATURES['GAMBLING'] and v.admin_level >= PERMS['LOTTERY_VIEW_PARTICIPANTS'] -%}
<h4>Casino</h4>
<ul>
2023-03-15 04:50:56 +00:00
<li><a href="/admin/lottery/participants">Participants</a></li>
</ul>
{%- endif %}
Bring back orgies (watchparties), now controllable by admins, and generally better in all ways (#165) This PR adds orgies back into rdrama. Long ago, snakes made the original orgy code, and it was super fun. But he had to rush it out, and ended up making it a bit unsustainable, and had a couple questionable coding decisions, which meant that it had to be removed. Hey, the man literally did it in a few hours before the DB trial continued, lmao. Anyways, I took my own approach to it. I do not use iframes, i just just repurpose code from /chat window. Because I had that freedom, I also moved things around to make the user experience a bit better. I also added a title to give users some context about what's happening. Check it out ![image](/attachments/6719146c-4922-4d75-967d-8d424a09b198) Most importantly, this is all configurable from the site. Admins with the permission "ORGIES" will see this in their control panel ![image](/attachments/423d6046-a11d-4e84-bd2c-a2a641afd552) Nigga, idk where to put it, so I made my own category. If there is no orgy in progress, admins will see this: ![image](/attachments/7c64b9fa-cdf4-4986-a0c4-f2324878062e) Click the button, and, viola, the orgy begins. If there is an orgy in progress, the page will look like this: ![image](/attachments/b65be4b3-5db1-43cb-8857-7d3a8ea24ca7) Click the button, and the orgy stops. If an orgy is in progress, navigating to /chat will take the user to the orgy seemlessly. But what if they don't want to participate, liek some kind of spoilsport? Just navigate to /old_chat. That's just about it, it's really that simple. I have lots of ideas for the future, but I'll let that wait til later :). A few notes about implementation: - I moved some functionality out of /templates/chat.html and into /templates/util/macros.html. This is just so I could reference the code directly from my new template, /templates/orgy.html. - The orgy is stored as a single row in the new table "orgies". Okay, I know this is a little silly, but you know what they say: "if it's stupid and it works, it's not stupid". (tbf the oceangate ceo also said that) Co-authored-by: Chuck Sneed <sneed@formerlychucks.net> Reviewed-on: https://fsdfsd.net/rDrama/rDrama/pulls/165 Co-authored-by: HeyMoon <heymoon@noreply.fsdfsd.net> Co-committed-by: HeyMoon <heymoon@noreply.fsdfsd.net>
2023-07-02 23:55:37 +00:00
{% if v.admin_level >= PERMS['ORGIES'] %}
<h4>Misc</h4>
<ul>
<li><a href="/admin/orgy">Start/Stop Orgy</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>
2023-01-27 13:00:06 +00:00
<ul class="pb-3">
{% if v.admin_level >= PERMS['EDIT_RULES'] %}
<li><a href="/admin/edit_rules">Edit the Rules</a></li>
{%- endif %}
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'] %}
{% for setting in SITE_SETTINGS.keys() %}
2023-04-08 22:38:26 +00:00
{% if not (setting == "offline_mode" and v.admin_level < PERMS["SITE_OFFLINE_MODE"]) and setting !="ddos_detected" %}
2023-03-25 21:35:13 +00:00
<div class="custom-control custom-switch{% if loop.index > 1 %} mt-1{% endif %}" id="settings-{{setting}}-container">
2023-04-08 22:38:26 +00:00
{% set disabled = (setting in ("under_attack", "login_required") and SITE_SETTINGS["ddos_detected"]) %}
<input {% if disabled %}disabled checked{% endif %} autocomplete="off" type="checkbox" class="custom-control-input" id="settings-{{setting}}-checkbox" {% if SITE_SETTINGS[setting] %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this, '/admin/site_settings/{{setting}}');">
2023-03-25 21:35:13 +00:00
<label class="custom-control-label" for="settings-{{setting}}-checkbox">{{setting.replace('_', ' ').title()}}</label>
</div>
{% endif %}
2022-11-30 18:26:07 +00:00
{% endfor %}
{% endif %}
2022-05-04 23:09:46 +00:00
{% if v.admin_level >= PERMS['SITE_CACHE_PURGE_CDN'] %}
2023-01-28 10:50:54 +00:00
<button type="button" class="btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/admin/clear_cloudflare_cache');" style="margin-bottom: 2em;">CLEAR CLOUDFLARE CACHE</button>
{% endif %}
2022-10-05 21:23:00 +00:00
{% endblock %}