LoginLApp:Confirm: change styles of confirm pages for new layout
This commit is contained in:
parent
fca620274c
commit
01248668f0
@ -29,25 +29,32 @@ import { FormWrapper } from "@docspace/shared/components/form-wrapper";
|
||||
import { getSettings, getUserFromConfirm } from "@/utils/actions";
|
||||
|
||||
import ActivateUserForm from "@/components/ActivateUserForm";
|
||||
import { GreetingContainer } from "@/components/GreetingContainer";
|
||||
import {
|
||||
GreetingCleateUserContainer,
|
||||
GreetingContainer,
|
||||
} from "@/components/GreetingContainer";
|
||||
|
||||
type ActivationProps = {
|
||||
searchParams: { [key: string]: string };
|
||||
};
|
||||
|
||||
async function Page({ searchParams }: ActivationProps) {
|
||||
const type = searchParams.type;
|
||||
|
||||
const settings = await getSettings();
|
||||
|
||||
return (
|
||||
<>
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer />
|
||||
<FormWrapper id="activation-form">
|
||||
<ActivateUserForm passwordHash={settings.passwordHash} />
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
<div className="content-top">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingCleateUserContainer type={type} />
|
||||
<FormWrapper id="activation-form">
|
||||
<ActivateUserForm passwordHash={settings.passwordHash} />
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ async function Page({ searchParams }: PasswordChangProps) {
|
||||
const settings = await getSettings();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer greetingSettings={settings?.greetingSettings} />
|
||||
@ -47,7 +47,7 @@ async function Page({ searchParams }: PasswordChangProps) {
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ async function Page({ searchParams }: PhoneActivationProps) {
|
||||
const settings = await getSettings();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer greetingSettings={settings?.greetingSettings} />
|
||||
@ -47,7 +47,7 @@ async function Page({ searchParams }: PhoneActivationProps) {
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ async function Page({ searchParams }: PortalContinueProps) {
|
||||
const settings = await getSettings();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer greetingSettings={settings?.greetingSettings} />
|
||||
@ -47,7 +47,7 @@ async function Page({ searchParams }: PortalContinueProps) {
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ async function Page({ searchParams }: PortalOwnerChangeProps) {
|
||||
]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer greetingSettings={settings.greetingSettings} />
|
||||
@ -54,7 +54,7 @@ async function Page({ searchParams }: PortalOwnerChangeProps) {
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ async function Page({ searchParams }: RemovePortalProps) {
|
||||
]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer greetingSettings={settings?.greetingSettings} />
|
||||
@ -50,7 +50,7 @@ async function Page({ searchParams }: RemovePortalProps) {
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ async function Page({ searchParams }: PortalSuspendProps) {
|
||||
]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer greetingSettings={settings?.greetingSettings} />
|
||||
@ -50,7 +50,7 @@ async function Page({ searchParams }: PortalSuspendProps) {
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
import { GreetingContainer } from "@/components/GreetingContainer";
|
||||
import { getColorTheme, getSettings } from "@/utils/actions";
|
||||
import ProfileRemoveForm from "@/components/ProfileRemoveForm ";
|
||||
|
||||
@ -43,7 +42,7 @@ async function Page({ searchParams }: ProfileRemoveProps) {
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<ProfileRemoveForm
|
||||
@ -53,7 +52,7 @@ async function Page({ searchParams }: ProfileRemoveProps) {
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ async function Page({ searchParams }: TfaActivationProps) {
|
||||
const user = await getUserFromConfirm(uid, confirmKey);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<StyledForm className="set-app-container">
|
||||
<TfaActivationForm
|
||||
@ -65,7 +65,7 @@ async function Page({ searchParams }: TfaActivationProps) {
|
||||
/>
|
||||
</StyledForm>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ async function Page({ searchParams }: TfaAuthProps) {
|
||||
const user = await getUserFromConfirm(uid, confirmKey);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="content-center">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingContainer />
|
||||
@ -54,7 +54,7 @@ async function Page({ searchParams }: TfaAuthProps) {
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -54,24 +54,26 @@ async function Page({ searchParams, params }: LinkInviteProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<LanguageComboboxWrapper />
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingCleateUserContainer
|
||||
type={type}
|
||||
firstName={user?.firstName}
|
||||
lastName={user?.lastName}
|
||||
/>
|
||||
<FormWrapper id="invite-form">
|
||||
<CreateUserForm
|
||||
userNameRegex={settings.userNameRegex}
|
||||
passwordHash={settings.passwordHash}
|
||||
<div className="content-top">
|
||||
<LanguageComboboxWrapper />
|
||||
{settings && typeof settings !== "string" && (
|
||||
<>
|
||||
<GreetingCleateUserContainer
|
||||
type={type}
|
||||
firstName={user?.firstName}
|
||||
lastName={user?.lastName}
|
||||
/>
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
<FormWrapper id="invite-form">
|
||||
<CreateUserForm
|
||||
userNameRegex={settings.userNameRegex}
|
||||
passwordHash={settings.passwordHash}
|
||||
firstName={user?.firstName}
|
||||
lastName={user?.lastName}
|
||||
/>
|
||||
</FormWrapper>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -25,11 +25,7 @@
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
import ConfirmRoute from "@/components/ConfirmRoute";
|
||||
import {
|
||||
StyledBody,
|
||||
StyledContent,
|
||||
StyledPage,
|
||||
} from "@/components/StyledConfirm.styled";
|
||||
import { StyledBody, StyledPage } from "@/components/StyledConfirm.styled";
|
||||
|
||||
import { getSettings } from "@/utils/actions";
|
||||
|
||||
@ -42,18 +38,16 @@ export default async function Layout({
|
||||
|
||||
return (
|
||||
<StyledPage id="confirm-page">
|
||||
<StyledContent id="confirm-content">
|
||||
<StyledBody id="confirm-body">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<ConfirmRoute
|
||||
defaultPage={settings?.defaultPage}
|
||||
socketUrl={settings?.socketUrl}
|
||||
>
|
||||
{children}
|
||||
</ConfirmRoute>
|
||||
)}
|
||||
</StyledBody>
|
||||
</StyledContent>
|
||||
<StyledBody id="confirm-body">
|
||||
{settings && typeof settings !== "string" && (
|
||||
<ConfirmRoute
|
||||
defaultPage={settings?.defaultPage}
|
||||
socketUrl={settings?.socketUrl}
|
||||
>
|
||||
{children}
|
||||
</ConfirmRoute>
|
||||
)}
|
||||
</StyledBody>
|
||||
</StyledPage>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user