-
Notifications
You must be signed in to change notification settings - Fork 34
[PB-6824]:feat/new dynamic login desgin #1962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
b38eb84
4579bac
f553179
ed9b446
69d7b73
91c756f
9ef15ab
4961a35
a9a24bd
607de49
52d765d
9d5f53b
6b55cfa
ef7423f
e67f1b3
171829b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,19 +11,157 @@ export default function SignInView(props: Readonly<SignInProps>): JSX.Element { | |
| const { translate } = useTranslationContext(); | ||
|
|
||
| return ( | ||
| <div className={`flex h-full w-full flex-col bg-login-gradient ${props.displayIframe ? '' : 'overflow-auto'}`}> | ||
| <div | ||
| className={`relative flex h-full w-full flex-col dark:bg-[#0A0F1C] ${props.displayIframe ? '' : 'overflow-hidden'}`} | ||
| > | ||
| <style>{` | ||
| @keyframes orbTL { | ||
| 0%, 100% { transform: translate(0, 0) rotate(-164.506deg); } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move all this animation into a separate component, that will make it easier to reuse and maintain.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved the animation, also checked with design if we need to update the Sign In and yes! |
||
| 33% { transform: translate(100vw, 0) rotate(-164.506deg); } | ||
| 66% { transform: translate(100vw, 100vh) rotate(-164.506deg); } | ||
| } | ||
| @keyframes orbTR { | ||
| 0%, 100% { transform: translate(0, 0); } | ||
| 33% { transform: translate(0, 100vh); } | ||
| 66% { transform: translate(-100vw, 100vh); } | ||
| } | ||
| @keyframes orbBL { | ||
| 0%, 100% { transform: translate(0, 0) rotate(-133.484deg); } | ||
| 33% { transform: translate(0, -100vh) rotate(-133.484deg); } | ||
| 66% { transform: translate(100vw, -100vh) rotate(-133.484deg); } | ||
| } | ||
| @keyframes orbBR { | ||
| 0%, 100% { transform: translate(0, 0); } | ||
| 33% { transform: translate(-100vw, 0); } | ||
| 66% { transform: translate(-100vw, -100vh); } | ||
| } | ||
| `}</style> | ||
|
|
||
| {/* Light mode orbs */} | ||
| <div | ||
| className="pointer-events-none absolute dark:hidden" | ||
| style={{ | ||
| width: '841.186px', | ||
| height: '863.451px', | ||
| top: '-300px', | ||
| left: '-300px', | ||
| background: 'rgba(0, 102, 255, 0.40)', | ||
| filter: 'blur(175px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbTL 30s ease-in-out infinite', | ||
| }} | ||
| /> | ||
| <div | ||
| className="pointer-events-none absolute dark:hidden" | ||
| style={{ | ||
| width: '932.945px', | ||
| height: '932.945px', | ||
| top: '-350px', | ||
| right: '-350px', | ||
| background: 'rgba(214, 232, 255, 0.60)', | ||
| filter: 'blur(250px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbTR 30s ease-in-out infinite 7s', | ||
| }} | ||
| /> | ||
| <div | ||
| className="pointer-events-none absolute dark:hidden" | ||
| style={{ | ||
| width: '653.061px', | ||
| height: '653.061px', | ||
| bottom: '-250px', | ||
| left: '-200px', | ||
| background: 'rgba(175, 168, 255, 0.30)', | ||
| filter: 'blur(225px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbBL 30s ease-in-out infinite 14s', | ||
| }} | ||
| /> | ||
| <div | ||
| className="pointer-events-none absolute dark:hidden" | ||
| style={{ | ||
| width: '1280px', | ||
| height: '800px', | ||
| bottom: '-400px', | ||
| right: '-400px', | ||
| background: 'rgba(128, 191, 255, 0.40)', | ||
| filter: 'blur(225px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbBR 30s ease-in-out infinite 3s', | ||
| }} | ||
| /> | ||
|
|
||
| {/* Dark mode orbs */} | ||
| <div | ||
| className="pointer-events-none absolute hidden dark:block" | ||
| style={{ | ||
| width: '841.186px', | ||
| height: '863.451px', | ||
| top: '-300px', | ||
| left: '-300px', | ||
| background: 'rgba(0, 102, 255, 0.60)', | ||
| filter: 'blur(250px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbTL 30s ease-in-out infinite', | ||
| }} | ||
| /> | ||
| <div | ||
| className="pointer-events-none absolute hidden dark:block" | ||
| style={{ | ||
| width: '932.945px', | ||
| height: '932.945px', | ||
| aspectRatio: '1/1', | ||
| top: '-350px', | ||
| right: '-350px', | ||
| background: 'rgba(77, 163, 255, 0.65)', | ||
| mixBlendMode: 'soft-light', | ||
| filter: 'blur(175px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbTR 30s ease-in-out infinite 7s', | ||
| }} | ||
| /> | ||
| <div | ||
| className="pointer-events-none absolute hidden dark:block" | ||
| style={{ | ||
| width: '765.146px', | ||
| height: '749.943px', | ||
| bottom: '-300px', | ||
| right: '-300px', | ||
| background: '#003D99', | ||
| mixBlendMode: 'overlay', | ||
| filter: 'blur(200px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbBR 30s ease-in-out infinite 3s', | ||
| }} | ||
| /> | ||
| <div | ||
| className="pointer-events-none absolute hidden dark:block" | ||
| style={{ | ||
| width: '653.061px', | ||
| height: '653.061px', | ||
| aspectRatio: '1/1', | ||
| bottom: '-250px', | ||
| left: '-200px', | ||
| background: 'rgba(107, 92, 255, 0.95)', | ||
| mixBlendMode: 'overlay', | ||
| filter: 'blur(125px)', | ||
| borderRadius: '50%', | ||
| animation: 'orbBL 30s ease-in-out infinite 14s', | ||
| }} | ||
| /> | ||
|
|
||
| {!props.displayIframe && ( | ||
| <div className="flex shrink-0 flex-row justify-center py-10 sm:justify-start sm:pl-20"> | ||
| <div className="relative z-10 flex shrink-0 flex-row justify-center py-10 sm:justify-center"> | ||
| <InternxtLogo className="h-auto w-28 text-gray-100" /> | ||
| </div> | ||
| )} | ||
|
|
||
| <div className={`flex h-full flex-col ${!props.displayIframe && 'items-center justify-center'}`}> | ||
| <div className={`relative z-10 flex h-full flex-col ${!props.displayIframe && 'items-center justify-center'}`}> | ||
| <LogIn /> | ||
| </div> | ||
|
|
||
| {!props.displayIframe && ( | ||
| <div className="flex shrink-0 flex-col items-center justify-center space-x-0 space-y-2 py-8 sm:flex-row sm:space-x-8 sm:space-y-0"> | ||
| <div className="relative z-10 flex shrink-0 flex-col items-center justify-center space-x-0 text-gray-80 dark:text-gray-10 space-y-2 py-8 sm:flex-row sm:space-x-8 sm:space-y-0"> | ||
| {!isMobile && ( | ||
| <a href="https://internxt.com/legal" target="_blank" className="auth-footer-link"> | ||
| {translate('general.terms')} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,16 +216,20 @@ export default function LogIn(): JSX.Element { | |
| }; | ||
|
|
||
| return ( | ||
| <> | ||
| <div | ||
| className="bg-white dark:bg-gray-1 dark:border-gray-5 rounded-2xl " | ||
| style={{ boxShadow: '0 32px 40px 0 rgba(0, 0, 0, 0.08)' }} | ||
| > | ||
| <Helmet> | ||
| <link rel="canonical" href={`${envService.getVariable('hostname')}/login`} /> | ||
| </Helmet> | ||
| <div className="flex h-fit w-96 flex-col items-start justify-center space-y-5 px-8 py-10"> | ||
| <h1 data-cy="loginTitle" className="text-3xl font-medium"> | ||
| <div className="flex h-fit w-96 flex-col items-center justify-center space-y-5 px-8 py-10"> | ||
| <h1 data-cy="loginTitle" className="text-3xl font-medium dark:text-white"> | ||
| {translate('auth.login.title')} | ||
| </h1> | ||
|
|
||
| <form data-cy="loginWrapper" className="flex w-full flex-col space-y-2" onSubmit={handleSubmit(onSubmit)}> | ||
| <p> {translate('auth.emailFloatingLabel')}</p> | ||
| <TextInput | ||
| placeholder={translate('auth.email')} | ||
| inputDataCy="emailInput" | ||
|
|
@@ -234,8 +238,9 @@ export default function LogIn(): JSX.Element { | |
| register={register} | ||
| minLength={{ value: 1, message: 'Email must not be empty' }} | ||
| error={errors.email} | ||
| hasError={showErrors && loginError.length > 0} | ||
| /> | ||
|
|
||
| <p> {translate('auth.passwordFloatingLabel')}</p> | ||
| <PasswordInput | ||
| placeholder={translate('auth.password')} | ||
| inputDataCy="passwordInput" | ||
|
|
@@ -244,6 +249,7 @@ export default function LogIn(): JSX.Element { | |
| required={true} | ||
| minLength={{ value: 1, message: 'Password must not be empty' }} | ||
| error={errors.password} | ||
| passwordError={showErrors && loginError.length > 0} | ||
| /> | ||
|
|
||
| {showTwoFactor && ( | ||
|
|
@@ -271,7 +277,7 @@ export default function LogIn(): JSX.Element { | |
| loading={isLoggingIn} | ||
| buttonDataCy="loginButton" | ||
| variant="primary" | ||
| disabled={isLoggingIn} | ||
| className="disabled:!bg-primary" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove disabled while logging is a specificaction of the task?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No the idea was to not having in gray, updated |
||
| > | ||
| {isLoggingIn && isValid ? translate('auth.decrypting') : translate('auth.button.loginAction')} | ||
| </Button> | ||
|
|
@@ -313,6 +319,6 @@ export default function LogIn(): JSX.Element { | |
| </Link> | ||
| </div> | ||
| </div> | ||
| </> | ||
| </div> | ||
| ); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.