-
-
- {{- template "registrationLimits" . -}} -
- {{- template "customCSSLimits" . -}}
- {{- template "statusLimits" . -}}
- {{- template "pollLimits" . -}} +
- {{- template "customCSSLimits" . -}}
From 9fb8a78f91adffd5f4d28df1270e407c25a7a16e Mon Sep 17 00:00:00 2001
From: tobi <31960611+tsmethurst@users.noreply.github.com>
Date: Thu, 11 Apr 2024 11:45:53 +0200
Subject: [feature] New user sign-up via web page (#2796)
* [feature] User sign-up form and admin notifs
* add chosen + filtered languages to migration
* remove stray comment
* chosen languages schmosen schmanguages
* proper error on local account missing
---
web/source/css/base.css | 73 +++++++++++++++-------------
web/template/about.tmpl | 36 +++++---------
web/template/authorize.tmpl | 37 +++++++-------
web/template/confirm_email.tmpl | 33 +++++++++++++
web/template/confirmed.tmpl | 27 -----------
web/template/confirmed_email.tmpl | 30 ++++++++++++
web/template/email_confirm.tmpl | 12 +++--
web/template/email_new_signup.tmpl | 32 +++++++++++++
web/template/finalize.tmpl | 54 +++++++++++----------
web/template/index.tmpl | 1 +
web/template/index_apps.tmpl | 3 +-
web/template/index_register.tmpl | 41 ++++++++++++++++
web/template/index_what_is_this.tmpl | 5 +-
web/template/oob.tmpl | 2 +-
web/template/sign-in.tmpl | 6 +--
web/template/sign-up.tmpl | 93 ++++++++++++++++++++++++++++++++++++
web/template/signed-up.tmpl | 30 ++++++++++++
17 files changed, 380 insertions(+), 135 deletions(-)
create mode 100644 web/template/confirm_email.tmpl
delete mode 100644 web/template/confirmed.tmpl
create mode 100644 web/template/confirmed_email.tmpl
create mode 100644 web/template/email_new_signup.tmpl
create mode 100644 web/template/index_register.tmpl
create mode 100644 web/template/sign-up.tmpl
create mode 100644 web/template/signed-up.tmpl
(limited to 'web')
diff --git a/web/source/css/base.css b/web/source/css/base.css
index 54754ff8c..ae9724661 100644
--- a/web/source/css/base.css
+++ b/web/source/css/base.css
@@ -407,30 +407,27 @@ pre, pre[class*="language-"] {
}
}
-/***********************************
-***** SECTION 4: SHAMEFUL MESS *****
-************************************/
-
-/*
- EVERYTHING BELOW THIS POINT:
- Should be moved somewhere else
- to avoid cluttering up this file.
-*/
-
/*
- Below section stylings are used
- in transient/error templates.
+ Forms and sign-in / sign-up / confirm pages.
*/
-section.sign-in {
+section.with-form {
form {
display: flex;
flex-direction: column;
gap: 1rem;
-
padding-bottom: 1rem;
padding-top: 1rem;
+ p {
+ /*
+ We use gap so we don't
+ need top + bottom margins.
+ */
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+
label, input {
padding-left: 0.2rem;
}
@@ -441,12 +438,41 @@ section.sign-in {
gap: 0.4rem;
}
+ .checkbox {
+ display: flex;
+ flex-direction: row-reverse;
+ gap: 0.4rem;
+
+ & > input {
+ height: 100%;
+ width: 5%;
+ min-width: 1.2rem;
+ align-self: center;
+ }
+ }
+
.btn {
+ /* Visually separate buttons a bit */
margin-top: 1rem;
}
}
}
+/***********************************
+***** SECTION 4: SHAMEFUL MESS *****
+************************************/
+
+/*
+ EVERYTHING BELOW THIS POINT:
+ Should be moved somewhere else
+ to avoid cluttering up this file.
+*/
+
+/*
+ Below section stylings are used
+ in transient pages + error templates.
+*/
+
section.error {
word-break: break-word;
margin-bottom: 0.5rem;
@@ -470,25 +496,6 @@ section.oob-token {
}
}
-/*
- TODO: This is only used in the "finalize"
- template for new signups; move this elsewhere
- when that stuff is finished up.
-*/
-.callout {
- margin: 1.5rem 0;
- border: .05rem solid $border-accent;
- border-radius: .2rem;
- padding: 0 .6rem .6rem;
- .callout-title {
- margin: 0 -.6rem;
- padding: .6rem;
- font-weight: bold;
- background-color: $border-accent;
- color: $gray1;
- }
-}
-
/*
TODO: list and blocklist are only used
in settings panel and on blocklist page;
diff --git a/web/template/about.tmpl b/web/template/about.tmpl
index 04b0b095f..d8a540d19 100644
--- a/web/template/about.tmpl
+++ b/web/template/about.tmpl
@@ -59,37 +59,26 @@
{{- end }}
{{- end -}}
-{{- define "registrationLimits" -}}
-{{- if .instance.Registrations -}}
- Registration is enabled; new signups can be submitted to this instance.
- {{- if .instance.ApprovalRequired -}}
- Admin approval is required for new registrations.
- {{- else -}}
- Admin approval is not required for registrations; new signups will be automatically approved (pending email confirmation).
- {{- end -}}
-{{- else -}}
- Registration is disabled; new signups are currently closed for this instance.
-{{- end -}}
-{{- end -}}
-
{{- define "customCSSLimits" -}}
+Custom CSS is
{{- if .instance.Configuration.Accounts.AllowCustomCSS -}}
-Users are allowed to set Custom CSS for their profiles.
+enabled
{{- else -}}
-Custom CSS is not enabled for user profiles.
+disabled
{{- end -}}
+ on account profiles.
{{- end -}}
{{- define "statusLimits" -}}
-Statuses can contain up to
-{{- .instance.Configuration.Statuses.MaxCharacters }} characters, and
-{{- .instance.Configuration.Statuses.MaxMediaAttachments }} media attachments.
+Statuses can contain up to
+{{- .instance.Configuration.Statuses.MaxCharacters }} characters, and
+{{- .instance.Configuration.Statuses.MaxMediaAttachments }} media attachments.
{{- end -}}
{{- define "pollLimits" -}}
-Polls can have up to
-{{- .instance.Configuration.Polls.MaxOptions }} options, with
-{{- .instance.Configuration.Polls.MaxCharactersPerOption }} characters per option.
+Polls can have up to
+{{- .instance.Configuration.Polls.MaxOptions }} options, with
+{{- .instance.Configuration.Polls.MaxCharactersPerOption }} characters per option.
{{- end -}}
{{- with . }}
@@ -102,6 +91,7 @@ Polls can have up to
Thanks {{ .username -}}! Your email address {{- .email -}} has been confirmed.
-
Email address {{- .email -}} is now confirmed!
+ {{- if not .approved }} +Once an admin has approved your sign-up, you will be able to log in and use your account.
+ {{- end }} ++ Have an account on this instance and want to log in? GoToSocial does not provide its own webclient, but implements the Mastodon client API. - You can use this server through a variety of other clients: + You can use a variety of clients to log in to your account here:
{{- template "registrationLimits" . -}}
+ {{- if .instance.Registrations }} +To register a new account, please first read the rules and terms.
+Then, use the sign-up page to register an account.
+Manual admin approval is required for new accounts.
+ {{- end }} +You can join the fediverse by running your own instance of an ActivityPub software, or by finding an existing instance that aligns with your values and expectations, - and registering an account there. + and registering an account.
To help you find an instance that suits you, you can try one of the following tools: @@ -53,6 +53,9 @@
Or, just register for an account on this instance!
+ {{- end }}Here's your out-of-band token with scope "{{- .scope -}}", use it wisely:
{{- .oobToken -}}
Hi {{- .username -}}!
+Your sign-up has been registered, and a confirmation email has been sent to {{- .email -}}.
+
Please check your email inbox and click the link to confirm your email.
+Once an admin has approved your sign-up, you will be able to log in and use your account.
+