This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/views/yuuno/settings/advanced/sessions.twig

50 lines
2.4 KiB
Twig

{% extends 'settings/advanced/master.twig' %}
{% set mode = 'Sessions' %}
{% block description %}
<p>Session keys are a way of identifying yourself with the system without keeping your password in memory.</p>
<p>If someone finds one of your session keys they could possibly compromise your account, if you see any sessions here that shouldn't be here hit the Kill button to kill the selected session.</p>
<p>If you get logged out after clicking one you've most likely killed your current session, to make it easier to avoid this from happening your current session is highlighted.</p>
{% endblock %}
{% block settingsContent %}
<table class="settings-table">
<thead>
<tr><th style="width: 100px;">IP</th><th>Useragent</th><th>Country</th><th style="width: 120px;">Login time</th><th></th></tr>
</thead>
<tfoot>
<tr><th>IP</th><th>Useragent</th><th>Country</th><th>Login time</th><th></th></tr>
</tfoot>
<tbody>
{% for usession in sessions %}
<tr {% if usession.id == active %} class="current-session"{% endif %}>
<td>
{{ usession.ip }}
</td>
<td>
{{ usession.agent }}
</td>
<td>
<img src="/images/flags/{{ usession.country|lower }}.png" alt="{{ usession.country }}"> {{ usession.country(true) }}
</td>
<td>
<time class="time-ago" datetime="{{ usession.start|date('r') }}">{{ usession.start|date(config('general.date_format')) }}</time>
</td>
<td style="width: 90px;">
<form method="post" action="{{ route('settings.advanced.sessions') }}">
<input type="hidden" name="id" value="{{ usession.id }}">
<button class="inputStyling small" name="session" value="{{ session_id() }}">Kill</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="profile-save">
<form method="post" action="{{ route('settings.advanced.sessions') }}">
<input type="hidden" name="all" value="1">
<button class="inputStyling" name="session" value="{{ session_id() }}">Kill all active sessions</button>
</form>
</div>
{% endblock %}