GameExpo23/TFR/server/templates/settings.html

47 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="block">
<h2>Hello, {{ current_user.username }}!</h2>
<p>Sample text</p>
</div>
<div class="block">
<h2>Sessions</h2>
<p>Devices and games that you logged into. If you're looking to logout all website users, reset your password instead.</p>
<div class="table">
<table>
<tr>
<th></th>
<th>Device</th>
<th>Created</th>
<th>Last Used</th>
</tr>
{% if sessions %}
{% for session in sessions %}
<tr id="sess-{{ session.id }}">
<td><button onclick="yeetSession({{ session.id }})" class="button secondary"><i class="ph ph-trash"></i></button></td>
<td>{{ session.device_type }}</td>
<td>{{ session.created_at.strftime('%Y-%m-%d') }}</td>
<td>{{ session.last_used.strftime('%Y-%m-%d') }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="block secondary">
<h2>Danger Zone</h2>
<p>Be careful!</p>
<a href="{{ url_for('views.settings', action='delete') }}" class="button secondary" style="margin-bottom: 0.5rem">Delete Account</a>
<a href="{{ url_for('views.settings', action='password') }}" class="button secondary" style="margin-bottom: 0.5rem">Reset Password</a>
<a href="{{ url_for('views.settings', action='logout') }}" class="button secondary">Logout</a>
</div>
{% endblock %}