Add missing recovery email address warning and improve info layout
This commit is contained in:
parent
a9f56cd0cf
commit
a2e6dfbeaf
|
@ -37,6 +37,7 @@ export default class AccountController extends Controller {
|
|||
const userMailIdentity = user.as(UserMailIdentityComponent);
|
||||
|
||||
res.render('account', {
|
||||
main_email: await user.mainEmail.get(),
|
||||
emails: await user.emails.get(),
|
||||
mailboxIdentity: await (await userMailIdentity.mainMailIdentity.get())?.toEmail(),
|
||||
identities: await Promise.all((await userMailIdentity.mailIdentities.get()).map(async identity => ({
|
||||
|
|
|
@ -4,12 +4,19 @@
|
|||
|
||||
{% block body %}
|
||||
<main class="container">
|
||||
<div class="panel">
|
||||
<i data-feather="user"></i>
|
||||
<h1>My account</h1>
|
||||
<h1>My account</h1>
|
||||
|
||||
{% if emails | length <= 0 %}
|
||||
{{ macros.message('warning', 'To avoid losing access to your account, please add a recovery email address.') }}
|
||||
{% endif %}
|
||||
|
||||
<section class="panel">
|
||||
<h2><i data-feather="user"></i> Personnal info</h2>
|
||||
|
||||
<p>Name: {{ user.name }}</p>
|
||||
</div>
|
||||
|
||||
<p>Contact email: {{ main_email.email | default('-') }}</p>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<h2><i data-feather="key"></i> Change password</h2>
|
||||
|
|
Loading…
Reference in New Issue