From 82c00449638a7aa06b63454f6dc5a44924a6d36e Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 25 Jul 2023 10:46:27 -0400 Subject: Show a dedicated registration notice page when further action is required after registering --- src/components/registration/registration.js | 10 ++++++++-- src/components/registration/registration.vue | 14 +++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'src/components/registration') diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index b88bdeec..ca1fed94 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' }) + } else { + // display sign up notice, do not switch anywhere + } } catch (error) { console.warn('Registration failed: ', error) this.setCaptcha() diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue index 7438a5f4..5c913f94 100644 --- a/src/components/registration/registration.vue +++ b/src/components/registration/registration.vue @@ -3,7 +3,10 @@
{{ $t('registration.registration') }}
-
+
+
+

+ {{ signUpNotice.message }} +

+
@@ -404,6 +412,10 @@ $validations-cRed: #f04124; } } +.registration-notice { + margin: 0.6em; +} + @media all and (max-width: 800px) { .registration-form .container { flex-direction: column-reverse; -- cgit v1.2.3-70-g09d2 From 209c0a83325b9475b5ff9a4fd1ebede17d06ed63 Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 13 Jan 2024 17:44:13 -0500 Subject: Remove empty else branch and detail the comments --- src/components/registration/registration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/registration') diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index ca1fed94..78d31980 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -112,9 +112,9 @@ const registration = { const status = await this.signUp(this.user) if (status === 'ok') { this.$router.push({ name: 'friends' }) - } else { - // display sign up notice, do not switch anywhere } + // 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() -- cgit v1.2.3-70-g09d2 From d2a74ea1a2965eb38609bb8029a41b45beab89ce Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 7 Feb 2024 15:53:49 +0200 Subject: add .input class to all inputs --- .../announcement_editor/announcement_editor.vue | 4 ++- src/components/autosuggest/autosuggest.vue | 2 +- src/components/chat_new/chat_new.vue | 1 + src/components/checkbox/checkbox.vue | 25 +++++++++--------- src/components/desktop_nav/desktop_nav.scss | 30 +++------------------- src/components/emoji_input/emoji_input.vue | 9 ++++--- src/components/emoji_picker/emoji_picker.vue | 2 +- src/components/font_control/font_control.vue | 4 +-- src/components/image_cropper/image_cropper.vue | 2 +- src/components/importer/importer.vue | 1 + src/components/lists_edit/lists_edit.vue | 1 + .../lists_user_search/lists_user_search.vue | 1 + src/components/login_form/login_form.vue | 4 +-- src/components/mention_link/mention_link.vue | 2 +- src/components/mfa_form/recovery_form.vue | 2 +- src/components/mfa_form/totp_form.vue | 2 +- src/components/mobile_nav/mobile_nav.vue | 2 +- src/components/opacity_input/opacity_input.vue | 2 +- src/components/password_reset/password_reset.vue | 2 +- src/components/poll/poll.vue | 4 ++- src/components/poll/poll_form.vue | 4 +-- .../post_status_form/post_status_form.vue | 8 +++--- src/components/range_input/range_input.vue | 6 ++--- src/components/registration/registration.vue | 20 +++++++-------- src/components/report/report.vue | 2 +- src/components/search/search.vue | 2 +- src/components/search_bar/search_bar.vue | 2 +- .../settings_modal/helpers/attachment_setting.vue | 2 +- .../settings_modal/helpers/number_setting.vue | 2 +- .../settings_modal/helpers/size_setting.vue | 2 +- .../settings_modal/helpers/string_setting.vue | 2 +- .../settings_modal/tabs/filtering_tab.vue | 2 +- src/components/settings_modal/tabs/profile_tab.vue | 10 +++++--- .../settings_modal/tabs/security_tab/mfa.vue | 2 ++ .../settings_modal/tabs/security_tab/mfa_totp.vue | 1 + .../tabs/security_tab/security_tab.vue | 9 +++++++ .../settings_modal/tabs/theme_tab/preview.vue | 2 ++ src/components/shadow_control/shadow_control.vue | 18 ++++++------- src/components/user_card/user_card.vue | 4 +-- src/components/user_note/user_note.vue | 2 +- .../user_reporting_modal/user_reporting_modal.vue | 2 +- 41 files changed, 108 insertions(+), 98 deletions(-) (limited to 'src/components/registration') diff --git a/src/components/announcement_editor/announcement_editor.vue b/src/components/announcement_editor/announcement_editor.vue index 0f29f9f7..017b6f5f 100644 --- a/src/components/announcement_editor/announcement_editor.vue +++ b/src/components/announcement_editor/announcement_editor.vue @@ -3,7 +3,7 @@