web/user: fix redirect after starting configuration flow from user interface

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-06 12:57:06 +01:00
parent 9b8c1cbea5
commit e9102f4e28
3 changed files with 17 additions and 3 deletions

View File

@ -28,7 +28,12 @@ export class UserSettingsPassword extends LitElement {
return html`<div class="pf-c-card"> return html`<div class="pf-c-card">
<div class="pf-c-card__title">${t`Change your password`}</div> <div class="pf-c-card__title">${t`Change your password`}</div>
<div class="pf-c-card__body"> <div class="pf-c-card__body">
<a href="${ifDefined(this.configureUrl)}" class="pf-c-button pf-m-primary"> <a
href="${ifDefined(this.configureUrl)}?next=${encodeURIComponent(
"/if/user/#/settings;page-details",
)}"
class="pf-c-button pf-m-primary"
>
${t`Change password`} ${t`Change password`}
</a> </a>
</div> </div>

View File

@ -78,7 +78,11 @@ export class MFADevicesPage extends Table<Device> {
.map((stage) => { .map((stage) => {
return html`<li> return html`<li>
<a <a
href="${ifDefined(stage.configureUrl)}" href="${ifDefined(
stage.configureUrl,
)}?next=${encodeURIComponent(
"/if/user/#/settings;page-mfa",
)}"
class="pf-c-dropdown__menu-item" class="pf-c-dropdown__menu-item"
> >
${stageToAuthenticatorName(stage)} ${stageToAuthenticatorName(stage)}

View File

@ -45,7 +45,12 @@ export class SourceSettingsOAuth extends BaseUserSettings {
</button>`; </button>`;
} }
return html`<p>${t`Not connected.`}</p> return html`<p>${t`Not connected.`}</p>
<a class="pf-c-button pf-m-primary" href=${ifDefined(this.configureUrl)}> <a
class="pf-c-button pf-m-primary"
href="${ifDefined(this.configureUrl)}?next=${encodeURIComponent(
"/if/user/#/settings;page-sources",
)}"
>
${t`Connect`} ${t`Connect`}
</a>`; </a>`;
}), }),