Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ type RegisterWorkspaceModalProps = {
isConnectedToCloud?: boolean | string;
};

const documentationLink =
'https://docs.rocket.chat/setup-and-configure/accessing-your-workspace/rocket.chat-setup-wizard#information-collected-for-registered-workspaces';
Comment thread
csuadev marked this conversation as resolved.
Outdated
Comment thread
csuadev marked this conversation as resolved.
Outdated

const RegisterWorkspaceModal = ({ onClose, onStatusChange, isConnectedToCloud = false, ...props }: RegisterWorkspaceModalProps) => {
const setModal = useSetModal();
const bulletFeatures = useFeatureBullets();
Expand Down Expand Up @@ -59,7 +62,7 @@ const RegisterWorkspaceModal = ({ onClose, onStatusChange, isConnectedToCloud =
</Modal.Content>
<Modal.Footer>
<Box is='div' display='flex' justifyContent='space-between' alignItems='center' w='full'>
<a href={'https://cloud.rocket.chat'} target='_blank' rel='noopener noreferrer'>
<a href={documentationLink} target='_blank' rel='noopener noreferrer'>
{t('Learn_more')}
</a>
<ButtonGroup align='end'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Modal, Box, Field, TextInput } from '@rocket.chat/fuselage';
import { useEndpoint, useToastMessageDispatch, useTranslation } from '@rocket.chat/ui-contexts';
import React, { useCallback, useEffect } from 'react';
import { Trans } from 'react-i18next';

type Props = {
email: string;
Expand Down Expand Up @@ -29,6 +30,7 @@ const RegisterWorkspaceSetupStepTwoModal = ({ email, step, setStep, onClose, int
const handleResendRegistrationEmail = async () => {
try {
await createRegistrationIntent({ resend: true, email });
dispatchToastMessage({ type: 'success', message: t('Email_sent') });
} catch (error: unknown) {
dispatchToastMessage({ type: 'error', message: error });
}
Expand Down Expand Up @@ -66,7 +68,17 @@ const RegisterWorkspaceSetupStepTwoModal = ({ email, step, setStep, onClose, int
</Modal.Header>
<Modal.Content>
<Box fontSize='p2'>
<Box is='p'>{t('RegisterWorkspace_Setup_Email_Confirmation', { email })}</Box>
<Box is='p'>
<Trans i18nKey='RegisterWorkspace_Setup_Email_Confirmation'>
<Box is='p'>
Email sent to{' '}
<Box is='span' fontScale='p2b'>
{email}
</Box>
with a confirmation link.{' '}
</Box>
</Trans>
</Box>
<Box is='p'>{t('RegisterWorkspace_Setup_Email_Verification')}</Box>
<Field pbs={10}>
<Field.Label>{t('Security_code')}</Field.Label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const RegisterWorkspaceTokenModal = ({ onClose, onStatusChange, isConnectedToClo

const [token, setToken] = useState('');
const [processing, setProcessing] = useState(false);
const [error, setError] = useState(false);

const handleBackAction = (): void => {
const handleModalClose = (): void => setModal(null);
Expand All @@ -34,6 +35,7 @@ const RegisterWorkspaceTokenModal = ({ onClose, onStatusChange, isConnectedToClo

const handleConnectButtonClick = async () => {
setProcessing(true);
setError(false);

try {
const isConnected = await connectWorkspace(token);
Expand All @@ -47,6 +49,7 @@ const RegisterWorkspaceTokenModal = ({ onClose, onStatusChange, isConnectedToClo
dispatchToastMessage({ type: 'success', message: t('Connected') });
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });
setError(true);
} finally {
await (onStatusChange && onStatusChange());
setProcessing(false);
Expand Down Expand Up @@ -81,6 +84,7 @@ const RegisterWorkspaceTokenModal = ({ onClose, onStatusChange, isConnectedToClo
<Field.Row>
<TextInput onChange={handleTokenChange} value={token} />
</Field.Row>
{error && <Field.Error>{t('Token_Not_Recognized')}</Field.Error>}
</Field>
</Modal.Content>
<Modal.Footer>
Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -5527,6 +5527,7 @@
"ConnectWorkspace_Button": "Connect workspace",
"Workspace_registered": "Workspace registered",
"Workspace_not_connected": "Workspace not connected",
"Token_Not_Recognized": "Token not recognized",
"RegisterWorkspace_Registered_Description": "These services are available",
"RegisterWorkspace_Registered_Subtitle": "Because this workspace is registered the following is available",
"RegisterWorkspace_Registered_Benefits": "Registration allows automatic license updates, notifications of critical vulnerabilities and access to Rocket.Chat Cloud services. No sensitive workspace data is shared with Rocket.Chat.",
Expand Down Expand Up @@ -5559,7 +5560,7 @@
"RegisterWorkspace_Setup_Have_Account_Subtitle": "Enter your Cloud account email to associate this workspace with your account.",
"RegisterWorkspace_Setup_No_Account_Title": "Don't have an account?",
"RegisterWorkspace_Setup_No_Account_Subtitle": "Enter your email to create a new Cloud account and associate this workspace.",
"RegisterWorkspace_Setup_Email_Confirmation": "Email sent to <strong>__email__</strong> with a confirmation link.",
"cloud.RegisterWorkspace_Setup_Email_Confirmation": "Email sent to <1>email</1> with a confirmation link.",
"RegisterWorkspace_Setup_Email_Verification": "Please verify that the security code below matches the one in the email.",
"RegisterWorkspace_Syncing_Error": "An error occured syncing your workspace",
"RegisterWorkspace_Syncing_Complete": "Sync Complete",
Expand Down