mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2026-01-09 11:19:36 +01:00
- Update lock removal timer and behaviour - Redirect to previous path on sign-in and out - Fix dashbaord UI and other UX elemets - Lose sanity threlf times
64 lines
2.8 KiB
Twig
64 lines
2.8 KiB
Twig
{% extends 'layout.twig' %}
|
|
|
|
{% block header %}
|
|
<div class="action-links">
|
|
{% if currentUser %}
|
|
<!-- Account Dropdown (logged in) -->
|
|
{% if authEnabled %}
|
|
<div class="action-dropdown">
|
|
<button class="dropdown-toggle" aria-label="Account menu">Account ▾</button>
|
|
<div class="dropdown-menu">
|
|
<a href="/account" aria-label="Account settings">Settings</a>
|
|
<a href="/logout?redirect=/" aria-label="Logout">Logout</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if authEnabled %}
|
|
<a href="/auth" aria-label="Login or Register">Account</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<a href="/inbox/{{ example }}" aria-label="View example inbox">Example Inbox</a>
|
|
<button class="theme-toggle" id="themeToggle" aria-label="Toggle dark/light mode">
|
|
<svg class="theme-icon theme-icon-dark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
</svg>
|
|
<svg class="theme-icon theme-icon-light" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<div id="login">
|
|
<h1>Welcome!</h1>
|
|
<h4>Here you can either create a new Inbox, or access your old one</h4>
|
|
|
|
{% if userInputError %}
|
|
<blockquote class="warning">
|
|
Your input was invalid. Please try other values.
|
|
</blockquote>
|
|
{% endif %}
|
|
<form method="POST" action="/">
|
|
<fieldset>
|
|
<label for="nameField">Name</label>
|
|
<input type="text" id="nameField" name="username" value="{{ username }}">
|
|
<label for="commentField">Domain ({{ domains|length }})</label>
|
|
<div class="dropdown">
|
|
<select id="commentField" name="domain">
|
|
{% for domain in domains %}
|
|
<option value="{{ domain }}">{{ domain }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="buttons">
|
|
<input class="button" type="submit" value="Access This Inbox">
|
|
<a class="button" href="/inbox/random">Create Random Inbox</a>
|
|
</div>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
|
|
{% endblock %}
|