forked from MarseyWorld/MarseyWorld
parent
612fd44298
commit
13a6fc8871
|
@ -21,7 +21,6 @@ app = Flask(__name__, template_folder='templates')
|
|||
app.url_map.strict_slashes = False
|
||||
app.jinja_env.cache = {}
|
||||
app.jinja_env.auto_reload = True
|
||||
app.jinja_env.add_extension('jinja2.ext.do')
|
||||
faulthandler.enable()
|
||||
|
||||
app.config["SITE_NAME"]=environ.get("SITE_NAME").strip()
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{% extends "default.html" %}
|
||||
|
||||
{# Title (~25char max),
|
||||
Icon (fa-foo-bar), Color (#ff0000),
|
||||
(URL /admin/.../, Link Name) #}
|
||||
{# Title (~25char max), Description (~80char max),
|
||||
Icon (fa-foo-bar), Color (#ff0000), URL (/post/12345/) #}
|
||||
{%-
|
||||
set ADMIN_INDEX = [
|
||||
(
|
||||
|
@ -15,12 +14,17 @@ set ADMIN_INDEX = [
|
|||
),
|
||||
),
|
||||
(
|
||||
'Statistics',
|
||||
'fa-chart-line', '#c9d1d9',
|
||||
'Users',
|
||||
'fa-user', '#f5fffa',
|
||||
(
|
||||
('/stats','Content Stats'),
|
||||
('/weekly_chart','Weekly Stat Chart'),
|
||||
('/daily_chart','Daily Stat Chart'),
|
||||
('/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'),
|
||||
),
|
||||
),
|
||||
(
|
||||
|
@ -40,20 +44,6 @@ set ADMIN_INDEX = [
|
|||
('/admin/badge_remove','Remove Badges'),
|
||||
),
|
||||
),
|
||||
(
|
||||
'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'),
|
||||
),
|
||||
),
|
||||
(
|
||||
'API Access Control',
|
||||
'fa-robot', 'red',
|
||||
|
@ -61,32 +51,17 @@ set ADMIN_INDEX = [
|
|||
('/admin/apps','Apps'),
|
||||
),
|
||||
),
|
||||
(
|
||||
'Statistics',
|
||||
'fa-chart-line', '#c9d1d9',
|
||||
(
|
||||
('/stats','Content Stats'),
|
||||
('/weekly_chart','Weekly Stat Chart'),
|
||||
('/daily_chart','Daily Stat Chart'),
|
||||
),
|
||||
),
|
||||
]
|
||||
-%}
|
||||
{%- if LOTTERY_ENABLED -%}
|
||||
{%- do ADMIN_INDEX.append(
|
||||
(
|
||||
'Lottery',
|
||||
'fa-sack-dollar', '#ffd700',
|
||||
(
|
||||
('/admin/lottery/participants','Participants'),
|
||||
),
|
||||
),
|
||||
) -%}
|
||||
{%- endif -%}
|
||||
{%- if SITE_NAME == 'PCM' -%}
|
||||
{%- do ADMIN_INDEX.append(
|
||||
(
|
||||
'Configuration',
|
||||
'fa-sidebar', '#f5fffa',
|
||||
(
|
||||
('/admin/sidebar','Edit Sidebar'),
|
||||
),
|
||||
),
|
||||
) -%}
|
||||
{%- endif -%}
|
||||
|
||||
{% block Banner %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="directory--wrapper">
|
||||
|
@ -95,18 +70,34 @@ set ADMIN_INDEX = [
|
|||
<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 link in thread[3] %}
|
||||
<a href="{{link[0]}}">{{link[1]}}</a><br>
|
||||
{% for asdf in thread[3] %}
|
||||
<a href="{{asdf[0]}}">{{asdf[1]}}</a><br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if v.admin_level >= 3 -%}
|
||||
{% if LOTTERY_ENABLED -%}
|
||||
<div class="directory--link">
|
||||
<div class="directory--link-content">
|
||||
<div class="directory--link--title">Toggles</div>
|
||||
<div id="directory-admin--toggles">
|
||||
<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>
|
||||
|
||||
{% if v.admin_level > 2 %}
|
||||
<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>
|
||||
|
@ -134,21 +125,12 @@ set ADMIN_INDEX = [
|
|||
<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');">PURGE CACHE</button>
|
||||
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');" style="margin-bottom: 2em;">PURGE CACHE</button>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
<div class="directory--link">
|
||||
<div class="directory--link-content">
|
||||
<div class="directory--link--title">Server Status</div>
|
||||
<div>
|
||||
Live Revision: <code>{{ gitref }}</code> <br>
|
||||
</div>
|
||||
</div>
|
||||
<h4>Server Status</h4>
|
||||
<div>
|
||||
Live Revision: <code>{{ gitref }}</code> <br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{%-
|
||||
set CACHE_VER = {
|
||||
'css/main.css': 328,
|
||||
'css/main.css': 327,
|
||||
|
||||
'css/4chan.css': 61,
|
||||
'css/classic.css': 61,
|
||||
|
|
Loading…
Reference in New Issue