web/admin: add notice for recovery

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-24 11:50:52 +02:00
parent cab7593dca
commit e681654af7
1 changed files with 68 additions and 62 deletions

View File

@ -171,19 +171,22 @@ export class UserListPage extends TablePage<User> {
</div> </div>
</dd> </dd>
</div> </div>
${until( <div class="pf-c-description-list__group">
tenant().then((te) => {
if (!te.flowRecovery) {
return html``;
}
return html`<div class="pf-c-description-list__group">
<dt class="pf-c-description-list__term"> <dt class="pf-c-description-list__term">
<span class="pf-c-description-list__text" <span class="pf-c-description-list__text">${t`Recovery`}</span>
>${t`Recovery`}</span
>
</dt> </dt>
<dd class="pf-c-description-list__description"> <dd class="pf-c-description-list__description">
<div class="pf-c-description-list__text"> <div class="pf-c-description-list__text">
${until(
tenant().then((te) => {
if (!te.flowRecovery) {
return html`
<p>
${t`To directly reset a user's password, configure a recovery flow on the currently active tenant.`}
</p>
`;
}
return html`
<ak-action-button <ak-action-button
.apiRequest=${() => { .apiRequest=${() => {
return new CoreApi(DEFAULT_CONFIG) return new CoreApi(DEFAULT_CONFIG)
@ -213,7 +216,9 @@ export class UserListPage extends TablePage<User> {
? html`<ak-forms-modal ? html`<ak-forms-modal
.closeAfterSuccessfulSubmit=${false} .closeAfterSuccessfulSubmit=${false}
> >
<span slot="submit"> ${t`Send link`} </span> <span slot="submit">
${t`Send link`}
</span>
<span slot="header"> <span slot="header">
${t`Send recovery link to user`} ${t`Send recovery link to user`}
</span> </span>
@ -232,11 +237,12 @@ export class UserListPage extends TablePage<User> {
: html`<span : html`<span
>${t`Recovery link cannot be emailed, user has no email address saved.`}</span >${t`Recovery link cannot be emailed, user has no email address saved.`}</span
>`} >`}
</div> `;
</dd>
</div>`;
}), }),
)} )}
</div>
</dd>
</div>
</dl> </dl>
</div> </div>
</td> </td>