diff --git a/.changeset/tiny-insects-speak.md b/.changeset/tiny-insects-speak.md new file mode 100644 index 000000000000..569911de2638 --- /dev/null +++ b/.changeset/tiny-insects-speak.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +refactor: Rewrite `AwaitingConfirmationPage` page diff --git a/apps/meteor/client/views/setupWizard/providers/SetupWizardProvider.tsx b/apps/meteor/client/views/setupWizard/providers/SetupWizardProvider.tsx index be385e34e0b3..95a42af83413 100644 --- a/apps/meteor/client/views/setupWizard/providers/SetupWizardProvider.tsx +++ b/apps/meteor/client/views/setupWizard/providers/SetupWizardProvider.tsx @@ -201,7 +201,7 @@ const SetupWizardProvider = ({ children }: { children: ReactElement }): ReactEle saveWorkspaceData, saveOrganizationData, completeSetupWizard, - maxSteps: data.serverAlreadyRegistered ? 2 : 3, + maxSteps: data.serverAlreadyRegistered ? 2 : 4, }), [ setupWizardData, diff --git a/apps/meteor/client/views/setupWizard/steps/CloudAccountConfirmation.tsx b/apps/meteor/client/views/setupWizard/steps/CloudAccountConfirmation.tsx index 3a9c7fbd5772..f5be377d8223 100644 --- a/apps/meteor/client/views/setupWizard/steps/CloudAccountConfirmation.tsx +++ b/apps/meteor/client/views/setupWizard/steps/CloudAccountConfirmation.tsx @@ -10,6 +10,8 @@ const setIntervalTime = (interval?: number): number => (interval ? interval * 10 const CloudAccountConfirmation = (): ReactElement => { const { registerServer, + currentStep, + maxSteps, goToStep, setupWizardData: { registrationData }, saveWorkspaceData, @@ -43,6 +45,8 @@ const CloudAccountConfirmation = (): ReactElement => { return ( => registerServer({ email: registrationData.cloudEmail, resend: true })} diff --git a/apps/meteor/client/views/setupWizard/steps/RegisterServerStep.tsx b/apps/meteor/client/views/setupWizard/steps/RegisterServerStep.tsx index 6bc2e25259b6..d7421b79a308 100644 --- a/apps/meteor/client/views/setupWizard/steps/RegisterServerStep.tsx +++ b/apps/meteor/client/views/setupWizard/steps/RegisterServerStep.tsx @@ -11,7 +11,7 @@ const SERVER_OPTIONS = { }; const RegisterServerStep = (): ReactElement => { - const { goToPreviousStep, currentStep, setSetupWizardData, registerServer, maxSteps, offline, completeSetupWizard } = + const { goToPreviousStep, currentStep, goToNextStep, setSetupWizardData, registerServer, maxSteps, offline, completeSetupWizard } = useSetupWizardContext(); const [serverOption, setServerOption] = useState(SERVER_OPTIONS.REGISTERED); @@ -24,6 +24,7 @@ const RegisterServerStep = (): ReactElement => { const handleRegister: ComponentProps['onSubmit'] = async (data) => { if (data.registerType !== 'standalone') { + goToNextStep(); setSetupWizardData((prevState) => ({ ...prevState, serverData: data })); await registerServer(data); } diff --git a/apps/meteor/package.json b/apps/meteor/package.json index c1014a749158..5ab27e25a605 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -258,7 +258,7 @@ "@rocket.chat/models": "workspace:^", "@rocket.chat/mp3-encoder": "0.24.0", "@rocket.chat/omnichannel-services": "workspace:^", - "@rocket.chat/onboarding-ui": "^0.32.1", + "@rocket.chat/onboarding-ui": "0.33.0", "@rocket.chat/password-policies": "workspace:^", "@rocket.chat/pdf-worker": "workspace:^", "@rocket.chat/poplib": "workspace:^", diff --git a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json index 91993ff443fb..0f7451731edf 100644 --- a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json @@ -5875,10 +5875,8 @@ "onboarding.component.form.action.registerNow": "Register now", "onboarding.component.form.action.confirm": "Confirm", "onboarding.component.form.termsAndConditions": "I agree with <1>Terms and Conditions and <3>Privacy Policy", - "onboarding.component.emailCodeFallback": "Didn’t receive email? <1>Resend or <3>Change email", + "onboarding.component.emailCodeFallback": "Didn’t receive email? <1>Resend or <3>Change email.", "onboarding.page.form.title": "Let's launch your workspace", - "onboarding.page.awaitingConfirmation.title": "Awaiting confirmation", - "onboarding.page.awaitingConfirmation.subtitle": "We have sent you an email to {{emailAddress}} with a confirmation link. Please verify that the security code below matches the one in the email.", "onboarding.page.emailConfirmed.title": "Email Confirmed!", "onboarding.page.emailConfirmed.subtitle": "You can return to your Rocket.Chat application – we have launched your workspace already.", "onboarding.page.checkYourEmail.title": "Check your email", @@ -5914,6 +5912,9 @@ "onboarding.form.adminInfoForm.fields.password.label": "Password", "onboarding.form.adminInfoForm.fields.password.placeholder": "Create password", "onboarding.form.adminInfoForm.fields.keepPosted.label": "Keep me posted about Rocket.Chat updates", + "onboarding.form.awaitConfirmationForm.title": "Awaiting confirmation", + "onboarding.form.awaitConfirmationForm.content.securityCode": "Security code", + "onboarding.form.awaitConfirmationForm.content.sentEmail": "Email sent to <1>{{email}} with a confirmation link.Please verify that the security code below matches the one in the email.", "onboarding.form.organizationInfoForm.title": "Organization Info", "onboarding.form.organizationInfoForm.subtitle": "We need to know who you are.", "onboarding.form.organizationInfoForm.fields.organizationName.label": "Organization name", diff --git a/yarn.lock b/yarn.lock index 7d75c388dc29..1b6168b9e384 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8730,7 +8730,7 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/mp3-encoder": 0.24.0 "@rocket.chat/omnichannel-services": "workspace:^" - "@rocket.chat/onboarding-ui": ^0.32.1 + "@rocket.chat/onboarding-ui": 0.33.0 "@rocket.chat/password-policies": "workspace:^" "@rocket.chat/pdf-worker": "workspace:^" "@rocket.chat/poplib": "workspace:^" @@ -9175,9 +9175,9 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/onboarding-ui@npm:^0.32.1": - version: 0.32.1 - resolution: "@rocket.chat/onboarding-ui@npm:0.32.1" +"@rocket.chat/onboarding-ui@npm:0.33.0": + version: 0.33.0 + resolution: "@rocket.chat/onboarding-ui@npm:0.33.0" dependencies: i18next: ~21.6.16 react-hook-form: ~7.27.1 @@ -9192,7 +9192,7 @@ __metadata: react: 17.0.2 react-dom: 17.0.2 react-i18next: ~11.15.4 - checksum: 362938332de5d865e12b891288e631e579e1f6f0d8da99004d27d1fc5722e25821b68cb60de8cb51cf8768daae0f9bf68cbd374580e8e8bfdb292f8ed6ee8cb1 + checksum: d09e9bd4443410d9064a7a759dcb96f23deec77eb4ae1049d0d94ee0403d8f8c9c3a64290ce7011d48ae13ff0150ad915585a47520621f8680a89035c9637652 languageName: node linkType: hard