aboutsummaryrefslogtreecommitdiff
path: root/src/components/registration/registration.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2024-01-13 23:44:06 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2024-01-13 23:44:06 +0000
commitae4e360157234a352f71c90e84b9861ee572472e (patch)
treed3c83c6555cb83285adc0923a96dac0a9bf84d47 /src/components/registration/registration.js
parent9277a0cc0c85e6a9b9b6800f8769a868f8b355b5 (diff)
parent209c0a83325b9475b5ff9a4fd1ebede17d06ed63 (diff)
Merge branch 'tusooa/registration-notice' into 'develop'
Show a dedicated registration notice page when further action is required after registering See merge request pleroma/pleroma-fe!1851
Diffstat (limited to 'src/components/registration/registration.js')
-rw-r--r--src/components/registration/registration.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index b88bdeec..78d31980 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -83,6 +83,8 @@ const registration = {
signedIn: (state) => !!state.users.currentUser,
isPending: (state) => state.users.signUpPending,
serverValidationErrors: (state) => state.users.signUpErrors,
+ signUpNotice: (state) => state.users.signUpNotice,
+ hasSignUpNotice: (state) => !!state.users.signUpNotice.message,
termsOfService: (state) => state.instance.tos,
accountActivationRequired: (state) => state.instance.accountActivationRequired,
accountApprovalRequired: (state) => state.instance.accountApprovalRequired,
@@ -107,8 +109,12 @@ const registration = {
if (!this.v$.$invalid) {
try {
- await this.signUp(this.user)
- this.$router.push({ name: 'friends' })
+ const status = await this.signUp(this.user)
+ if (status === 'ok') {
+ this.$router.push({ name: 'friends' })
+ }
+ // If status is not 'ok' (i.e. it needs further actions to be done
+ // before you can login), display sign up notice, do not switch anywhere
} catch (error) {
console.warn('Registration failed: ', error)
this.setCaptcha()