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">
<div class="pf-c-card__title">${t`Change your password`}</div>
<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`}
</a>
</div>

View file

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

View file

@ -45,7 +45,12 @@ export class SourceSettingsOAuth extends BaseUserSettings {
</button>`;
}
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`}
</a>`;
}),