2026-04-27 16:47:08 -04:00
|
|
|
{% extends "_layout.html.j2" %}
|
|
|
|
|
|
|
|
|
|
{%- block head -%}
|
|
|
|
|
<link rel="stylesheet" href="{{ crate::ROUTE_PREFIX }}/resources/login.css">
|
|
|
|
|
{%- endblock -%}
|
|
|
|
|
|
|
|
|
|
{%- block title -%}
|
|
|
|
|
Log in
|
|
|
|
|
{%- endblock -%}
|
|
|
|
|
|
|
|
|
|
{%- block content -%}
|
|
|
|
|
<div class="panel narrow">
|
|
|
|
|
{% match body %}
|
2026-05-07 10:04:46 -04:00
|
|
|
{% when LoginBody::Unauthenticated { server_name, registration_available, next } %}
|
2026-04-27 16:47:08 -04:00
|
|
|
<h1 class="with-matrix-icon">
|
2026-05-07 10:04:46 -04:00
|
|
|
{% if next.is_some() %}
|
2026-04-30 08:54:55 -04:00
|
|
|
Log in to continue
|
|
|
|
|
{% else %}
|
|
|
|
|
Log in to Matrix
|
|
|
|
|
{% endif %}
|
2026-04-27 16:47:08 -04:00
|
|
|
<a href="https://matrix.org" target="_blank" noreferer>
|
|
|
|
|
<img class="matrix-icon" alt="Matrix logo" aria-ignore src="{{ crate::ROUTE_PREFIX }}/resources/matrix-icon.svg">
|
|
|
|
|
</a>
|
|
|
|
|
</h1>
|
|
|
|
|
<p>
|
|
|
|
|
You're about to log in to your account on <em>{{ server_name }}</em>
|
|
|
|
|
</p>
|
|
|
|
|
<hr>
|
|
|
|
|
<form method="post">
|
|
|
|
|
<p>
|
|
|
|
|
<label for="identifier">Username or email address</label>
|
|
|
|
|
<input type="text" name="identifier" autocomplete="username">
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
<label for="password">Password</label>
|
|
|
|
|
<input type="password" name="password" autocomplete="current-password">
|
|
|
|
|
</p>
|
|
|
|
|
<button type="submit">Log in</button>
|
|
|
|
|
</form>
|
2026-05-06 14:00:41 -04:00
|
|
|
<div class="centered-links">
|
|
|
|
|
{% if registration_available %}
|
2026-05-07 10:04:46 -04:00
|
|
|
{% let query = next.as_ref().map(serde_urlencoded::to_string).transpose().unwrap().unwrap_or_default() %}
|
|
|
|
|
<a href="{{ crate::ROUTE_PREFIX }}/account/register/?{{ query }}">Sign up</a>
|
2026-05-06 14:00:41 -04:00
|
|
|
{% endif %}
|
|
|
|
|
<a href="{{ crate::ROUTE_PREFIX }}/account/password/reset/">Forgot your password?</a>
|
|
|
|
|
</div>
|
2026-04-27 16:47:08 -04:00
|
|
|
{% when LoginBody::Authenticated { user_card } %}
|
|
|
|
|
<h1>Confirm your identity</h1>
|
|
|
|
|
{{ user_card }}
|
|
|
|
|
<p>Enter your password to continue.</p>
|
|
|
|
|
<form method="post">
|
|
|
|
|
<p>
|
|
|
|
|
<label for="password">Password</label>
|
|
|
|
|
<input type="password" name="password" autocomplete="current-password">
|
|
|
|
|
</p>
|
|
|
|
|
<button type="submit">Continue</button>
|
|
|
|
|
</form>
|
2026-05-06 14:00:41 -04:00
|
|
|
<div class="centered-links">
|
|
|
|
|
<a href="{{ crate::ROUTE_PREFIX }}/account/password/reset/">Forgot your password?</a>
|
|
|
|
|
</div>
|
2026-04-27 16:47:08 -04:00
|
|
|
{% endmatch %}
|
|
|
|
|
{% if let Some(error) = login_error %}
|
|
|
|
|
<small class="error">{{ error }}</small>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{%- endblock -%}
|