2018-03-23 00:01:42 +00:00
{% extends '@mio/settings/master.twig' %}
{% block settings_content %}
2018-03-26 16:00:51 +00:00
<div class="mio__settings__description">
<p>These are all the login attempts to your account. If any attempt that you don't recognise is marked as successful your account may be compromised, ask a staff member for advice in this case.</p>
</div>
<div class="mio__settings__login-history">
{% for attempt in user_login_attempts %}
<div class="mio__settings__login-history__entry" id="attempt- {{ attempt .attempt_id }} ">
<div class="mio__settings__login-history__column mio__settings__login-history__column--ip">
<div class="mio__settings__login-history__column__name">
IP
</div>
<div class="mio__settings__login-history__column__value">
{{ attempt .attempt_ip .string }}
{% if attempt .attempt_country != 'XX' %}
<img class="mio__settings__login-history__country" src="https://static.flash.moe/flags/fff/ {{ attempt .attempt_country | lower }} .png" alt=" {{ attempt .attempt_country }} " title=" {{ attempt .attempt_country | country_name }} ">
{% endif %}
</div>
</div>
<div class="mio__settings__login-history__column mio__settings__login-history__column--success">
<div class="mio__settings__login-history__column__name">
Was Successful?
</div>
<div class="mio__settings__login-history__column__value mio__settings__login-history__column__value-- {{ attempt .was_successful ? 'successful' : 'failed' }} ">
{{ attempt .was_successful ? 'Yes' : 'No' }}
</div>
</div>
<div class="mio__settings__login-history__column mio__settings__login-history__column--created" onmouseenter="this.children[1].textContent = ' {{ attempt .created_at }} ';" onmouseleave="this.children[1].textContent = ' {{ attempt .created_at .diffForHumans }} ';">
<div class="mio__settings__login-history__column__name">
Attempted
</div>
<div class="mio__settings__login-history__column__value">
{{ attempt .created_at .diffForHumans }}
</div>
</div>
{% if attempt .user_agent | length > 0 %}
<div class="mio__settings__login-history__column mio__settings__login-history__column--user_agent">
<div class="mio__settings__login-history__column__name">
User Agent
</div>
<div class="mio__settings__login-history__column__value">
{{ attempt .user_agent }}
</div>
</div>
{% endif %}
</div>
{% endfor %}
</div>
2018-03-23 00:01:42 +00:00
{% endblock %}