mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-01-16 03:25:21 +00:00
Remove useless settings pages
This commit is contained in:
parent
5f58575fd5
commit
f3e1afa0bc
|
@ -16,14 +16,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-nav">
|
||||
<a href="{{ url_for('settings.general') }}" class="settings-nav__item {% block settings_general %}{% endblock %}">General</a>
|
||||
<a href="{{ url_for('settings.server') }}" class="settings-nav__item {% block settings_server %}{% endblock %}">Server</a>
|
||||
<a href="{{ url_for('settings.account') }}" class="settings-nav__item {% block settings_account %}{% endblock %}">Account</a>
|
||||
<a href="{{ url_for('settings.logs') }}" class="settings-nav__item {% block settings_logs %}{% endblock %}">Logs</a>
|
||||
</div>
|
||||
|
||||
<div class="settings-content">
|
||||
{% block settings_content %}{% endblock %}
|
||||
<h1>Gwa Gwa</h1>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,12 +0,0 @@
|
|||
{% extends 'settings/settings_layout.html' %}
|
||||
|
||||
{% block settings_account %}settings-nav__item-selected{% endblock %}
|
||||
{% block settings_content %}
|
||||
<h2>Account</h2>
|
||||
<p>Is session fresh?</p>
|
||||
{% if fresh %}
|
||||
<p>Yes</p>
|
||||
{% else %}
|
||||
<p>No</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -1,6 +0,0 @@
|
|||
{% extends 'settings/settings_layout.html' %}
|
||||
|
||||
{% block settings_general %}settings-nav__item-selected{% endblock %}
|
||||
{% block settings_content %}
|
||||
<h2>General</h2>
|
||||
{% endblock %}
|
|
@ -1,30 +0,0 @@
|
|||
{% extends 'settings/settings_layout.html' %}
|
||||
|
||||
{% block settings_logs %}settings-nav__item-selected{% endblock %}
|
||||
{% block settings_content %}
|
||||
<h2>Logs</h2>
|
||||
<div class="settings-list" id="logs">
|
||||
<div class="log" style="display:flex;flex-direction:row;gap:0.5rem;"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script>
|
||||
const output = document.getElementById('logs');
|
||||
|
||||
setInterval(function() {
|
||||
$.ajax({
|
||||
url: '{{ url_for('api.logfile') }}',
|
||||
type: 'GET',
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
|
||||
// for each item in response, log to console
|
||||
response.forEach(function(item) {
|
||||
console.log(item);
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 1000); // 10 seconds
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -1,6 +0,0 @@
|
|||
{% extends 'settings/settings_layout.html' %}
|
||||
|
||||
{% block settings_server %}settings-nav__item-selected{% endblock %}
|
||||
{% block settings_content %}
|
||||
<h2>Server</h2>
|
||||
{% endblock %}
|
|
@ -4,6 +4,7 @@ OnlyLegs - Settings page
|
|||
from flask import Blueprint, render_template
|
||||
from flask_login import login_required
|
||||
|
||||
|
||||
blueprint = Blueprint("settings", __name__, url_prefix="/settings")
|
||||
|
||||
|
||||
|
@ -13,31 +14,4 @@ def general():
|
|||
"""
|
||||
General settings page
|
||||
"""
|
||||
return render_template("settings/general.html")
|
||||
|
||||
|
||||
@blueprint.route("/server")
|
||||
@login_required
|
||||
def server():
|
||||
"""
|
||||
Server settings page
|
||||
"""
|
||||
return render_template("settings/server.html")
|
||||
|
||||
|
||||
@blueprint.route("/account")
|
||||
@login_required
|
||||
def account():
|
||||
"""
|
||||
Account settings page
|
||||
"""
|
||||
return render_template("settings/account.html")
|
||||
|
||||
|
||||
@blueprint.route("/logs")
|
||||
@login_required
|
||||
def logs():
|
||||
"""
|
||||
Logs settings page
|
||||
"""
|
||||
return render_template("settings/logs.html")
|
||||
return render_template("settings.html")
|
Loading…
Reference in a new issue