Web: Fixed registration form if the user received an invitation by email.

This commit is contained in:
Tatiana Lopaeva 2024-02-22 15:04:50 +03:00
parent 1125472aad
commit 508833e20c
4 changed files with 15 additions and 12 deletions

View File

@ -27,6 +27,7 @@
"SetAppDescription": "Two-factor authentication is enabled. Configure your authenticator app to continue working in the DocSpace. You can use Google Authenticator for <1>Android</1> and <4>iOS</4> or Authenticator for <8>Windows Phone</8>.",
"SetAppInstallDescription": "To connect the app, scan the QR code or manually enter your secret key <1>{{ secretKey }}</1>, and then enter a 6-digit code from your app in the field below.",
"SetAppTitle": "Configure your authenticator application",
"SignUp": "Sign up",
"SuccessDeactivate": "Your account has been successfully deactivated. In 10 seconds you will be redirected to the <1>site</1>.",
"SuccessReactivate": "Your account has been successfully reactivated. In 10 seconds you will be redirected to the <1>portal</1>.",
"SuccessRemoved": "Your account has been successfully removed. In 10 seconds you will be redirected to the <1>site</1>.",

View File

@ -132,14 +132,14 @@ export const RegisterContainer = styled.div`
p{
text-align: center;
}
.sign-in-container {
.back-sign-in-container {
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-bottom: 16px;
p:first-child {
.back-button {
position: absolute;
max-width: 60px;
text-overflow: ellipsis;

View File

@ -52,19 +52,21 @@ const DEFAULT_PORTAL_TEXT =
const DEFAULT_CREATION_TEXT =
"A DocSpace account will be created for {{email}}. Please, complete your registration:";
const RegistrationFormGreeting = ({ email, t, setRegistrationForm }) => {
const RegistrationFormGreeting = ({ email, t, setRegistrationForm, type }) => {
const onClickBack = () => {
setRegistrationForm(false);
};
return (
<div className="greeting-container">
<div className="sign-in-container">
<Text fontWeight={600} onClick={onClickBack}>
<div className="back-sign-in-container">
{type === "LinkInvite" && (
<Text fontWeight={600} onClick={onClickBack} className="back-button">
{t("Back")}
</Text>
)}
<Text fontWeight={600} fontSize={"16px"}>
{t("Common:LoginButton")}
{t("SignUp")}
</Text>
</div>
<Text>
@ -472,7 +474,7 @@ const CreateUserForm = (props) => {
<ConfirmContainer>
<GreetingContainer>
<DocspaceLogo className="docspace-logo" />
{showGreeting && (
{showGreeting && linkData.type === "LinkInvite" && (
<div className="tooltip">
<Text fontSize="16px">
<Trans
@ -558,6 +560,7 @@ const CreateUserForm = (props) => {
email={email}
t={t}
setRegistrationForm={setRegistrationForm}
type={linkData.type}
/>
<FieldContainer
className="form-field"
@ -671,7 +674,7 @@ const CreateUserForm = (props) => {
label={
isLoading
? t("Common:LoadingProcessing")
: t("LoginRegistryButton")
: t("SignUp")
}
tabIndex={1}
isDisabled={isLoading}

View File

@ -61,7 +61,6 @@ const Login: React.FC<ILoginProps> = ({
useEffect(() => {
if (search) {
const encodeString = search.slice(search.indexOf("=") + 1);
const decodeString = atob(encodeString);
@ -200,7 +199,7 @@ const Login: React.FC<ILoginProps> = ({
ssoSVG: SSOIcon,
}
: {};
console.log("invitationLinkData.type", invitationLinkData.type);
return (
<LoginFormWrapper
id="login-page"