diff --git a/html/form-base.html b/html/form-base.html
index b5f2e2a..1675c56 100644
--- a/html/form-base.html
+++ b/html/form-base.html
@@ -29,6 +29,7 @@
window.captcha = {{ .captcha }};
window.reCAPTCHA = {{ .reCAPTCHA }};
window.reCAPTCHASiteKey = "{{ .reCAPTCHASiteKey }}";
+ window.userPageEnabled = {{ .userPageEnabled }};
{{ if .passwordReset }}
diff --git a/html/form.html b/html/form.html
index ef2b888..15e83e2 100644
--- a/html/form.html
+++ b/html/form.html
@@ -17,6 +17,7 @@
{{ if .passwordReset }}{{ .strings.passwordReset }}{{ else }}{{ .strings.successHeader }}{{ end }}
{{ if .passwordReset }}{{ .strings.youCanLoginPassword }}{{ else }}{{ .successMessage }}{{ end }}
+ {{ if .userPageEnabled }}
{{ .strings.userPageSuccessMessage }}
{{ end }}
{{ .strings.continue }}
diff --git a/html/user.html b/html/user.html
index 3f78f8b..4c62619 100644
--- a/html/user.html
+++ b/html/user.html
@@ -24,7 +24,7 @@
window.matrixUserID = "{{ .matrixUser }}";
{{ template "header.html" . }}
- {{ .lang.Strings.pageTitle }}
+ {{ .lang.Strings.myAccount }}
diff --git a/lang/form/en-us.json b/lang/form/en-us.json
index 0fb3316..946af1f 100644
--- a/lang/form/en-us.json
+++ b/lang/form/en-us.json
@@ -25,7 +25,9 @@
"editContactMethod": "Edit Contact Method",
"joinTheServer": "Join the server:",
"customMessagePlaceholderHeader": "Customize this card",
- "customMessagePlaceholderContent": "Click the user page edit button in settings to customize this card, or show one on the login screen, and don't worry, the user can't see this."
+ "customMessagePlaceholderContent": "Click the user page edit button in settings to customize this card, or show one on the login screen, and don't worry, the user can't see this.",
+ "userPageSuccessMessage": "You can see and change details about your account later on the {myAccount} page.",
+ "myAccount": "My Account"
},
"notifications": {
"errorUserExists": "User already exists.",
diff --git a/ts/form.ts b/ts/form.ts
index 428f19f..3cd4ba2 100644
--- a/ts/form.ts
+++ b/ts/form.ts
@@ -35,6 +35,7 @@ interface formWindow extends Window {
captcha: boolean;
reCAPTCHA: boolean;
reCAPTCHASiteKey: string;
+ userPageEnabled: boolean;
}
loadLangSelector("form");
@@ -343,6 +344,10 @@ const create = (event: SubmitEvent) => {
const url = ((document.getElementById("modal-success") as HTMLDivElement).querySelector("a.submit") as HTMLAnchorElement).href;
window.location.href = url;
} else {
+ if (window.userPageEnabled) {
+ const userPageNoticeArea = document.getElementById("modal-success-user-page-area");
+ userPageNoticeArea.textContent = userPageNoticeArea.textContent.replace("{myAccount}", userPageNoticeArea.getAttribute("my-account-term"));
+ }
window.successModal.show();
}
} else {
diff --git a/views.go b/views.go
index cf0a836..62f2ed1 100644
--- a/views.go
+++ b/views.go
@@ -625,6 +625,7 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
"captcha": app.config.Section("captcha").Key("enabled").MustBool(false),
"reCAPTCHA": app.config.Section("captcha").Key("recaptcha").MustBool(false),
"reCAPTCHASiteKey": app.config.Section("captcha").Key("recaptcha_site_key").MustString(""),
+ "userPageEnabled": app.config.Section("user_page").Key("enabled").MustBool(false),
}
if telegram {
data["telegramPIN"] = app.telegram.NewAuthToken()