-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
924c027
commit ca6e15e
Showing
5 changed files
with
226 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
packages/web/src/pages/sign-in-page/SignInPageDesktop.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import { | ||
Box, | ||
Button, | ||
Flex, | ||
IconArrowRight, | ||
IconVisibilityHidden, | ||
Text | ||
} from '@audius/harmony' | ||
import { Button as ButtonTmp } from '@audius/stems' | ||
import { Form } from 'formik' | ||
import { Link } from 'react-router-dom' | ||
|
||
import audiusLogoColored from 'assets/img/audiusLogoColored.png' | ||
import { HarmonyTextField } from 'components/form-fields/HarmonyTextField' | ||
import PreloadImage from 'components/preload-image/PreloadImage' | ||
import { PageWithAudiusValues } from 'pages/sign-on/components/desktop/PageWithAudiusValues' | ||
import { SIGN_UP_PAGE } from 'utils/route' | ||
|
||
import styles from './SignInPage.module.css' | ||
|
||
const messages = { | ||
title: 'Sign Into Audius', | ||
emailLabel: 'Email', | ||
passwordLabel: 'Password', | ||
signIn: 'Sign In', | ||
createAccount: 'Create An Account', | ||
forgotPassword: 'Forgot password?' | ||
} | ||
|
||
export const SignInPageDesktop = () => { | ||
return ( | ||
<Flex h='100%' alignItems='center' justifyContent='center'> | ||
<PageWithAudiusValues> | ||
<Flex | ||
className={styles.root} | ||
h='100%' | ||
w={480} | ||
// want 80px but don't have var for it | ||
pv='4xl' | ||
ph='2xl' | ||
direction='column' | ||
gap='2xl' | ||
justifyContent='space-between' | ||
> | ||
{/* TODO: confirm 40px spacing value */} | ||
<Flex direction='column' gap='2xl' alignItems='center'> | ||
<PreloadImage | ||
src={audiusLogoColored} | ||
className={styles.logo} | ||
alt='Audius Colored Logo' | ||
/> | ||
<Flex w='100%' direction='row' justifyContent='flex-start'> | ||
<Text variant='heading' size='l' tag='h1' color='heading'> | ||
{messages.title} | ||
</Text> | ||
</Flex> | ||
<Box w='100%'> | ||
<Form> | ||
<Flex direction='column' gap='2xl' w='100%'> | ||
<Flex direction='column' gap='l'> | ||
{/* TODO: replace old TextField */} | ||
<HarmonyTextField | ||
name='email' | ||
label={messages.emailLabel} | ||
/> | ||
{/* TODO: password visibility icon and toggle */} | ||
<HarmonyTextField | ||
name='password' | ||
label={messages.passwordLabel} | ||
endIcon={IconVisibilityHidden} | ||
type='password' | ||
/> | ||
</Flex> | ||
<Flex direction='column' gap='l'> | ||
<Button iconRight={IconArrowRight} type='submit'> | ||
{messages.signIn} | ||
</Button> | ||
<Flex direction='row' alignItems='flexStart'> | ||
<Text color='heading'> | ||
{/* TODO: link destination */} | ||
<Link to={''}>{messages.forgotPassword}</Link> | ||
</Text> | ||
</Flex> | ||
</Flex> | ||
</Flex> | ||
</Form> | ||
</Box> | ||
</Flex> | ||
{/* TODO: switch to stems button when we have asChild support */} | ||
<ButtonTmp | ||
// @ts-ignore | ||
as={Link} | ||
to={SIGN_UP_PAGE} | ||
text={messages.createAccount} | ||
/>{' '} | ||
</Flex> | ||
</PageWithAudiusValues> | ||
</Flex> | ||
) | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/web/src/pages/sign-in-page/SignInPageMobile.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.root { | ||
background: radial-gradient( | ||
77.16% 77.16% at 50% 51.81%, | ||
rgba(91, 35, 225, 0.8) 0%, | ||
rgba(113, 41, 230, 0.64) 67.96%, | ||
rgba(162, 47, 235, 0.5) 100% | ||
), | ||
url('../../assets/img/2-DJ-4-3.jpg'), lightgray 50% / cover no-repeat; | ||
background-position-y: bottom; | ||
background-position-x: -110px; | ||
background-size: 150%; | ||
} | ||
|
||
.content { | ||
background-color: var(--harmony-bg-white); | ||
border-bottom-left-radius: var(--harmony-border-radius-2xl); | ||
border-bottom-right-radius: var(--harmony-border-radius-2xl); | ||
} | ||
|
||
.createAccountRow { | ||
color: var(--harmony-white); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import { | ||
Box, | ||
Button, | ||
Flex, | ||
IconArrowRight, | ||
IconAudiusLogoHorizontalColor, | ||
IconVisibilityHidden, | ||
Text | ||
} from '@audius/harmony' | ||
import { Form } from 'formik' | ||
import { Link } from 'react-router-dom' | ||
|
||
import { HarmonyTextField } from 'components/form-fields/HarmonyTextField' | ||
|
||
import styles from './SignInPageMobile.module.css' | ||
|
||
const messages = { | ||
title: 'Sign Into Audius', | ||
emailLabel: 'Email', | ||
passwordLabel: 'Password', | ||
signIn: 'Sign In', | ||
newToAudius: 'New to Audius?', | ||
createAccount: 'Create an Account', | ||
forgotPassword: 'Forgot password?' | ||
} | ||
|
||
export const SignInPageMobile = () => { | ||
return ( | ||
<Flex | ||
className={styles.root} | ||
direction='column' | ||
w='100%' | ||
h='100%' | ||
justifyContent='space-between' | ||
pb='4xl' | ||
> | ||
<Flex | ||
className={styles.content} | ||
w='100%' | ||
pv='2xl' | ||
ph='l' | ||
direction='column' | ||
gap='2xl' | ||
justifyContent='space-between' | ||
> | ||
<Flex direction='column' gap='2xl' alignItems='center'> | ||
<IconAudiusLogoHorizontalColor /> | ||
<Text variant='heading' size='l' tag='h1' color='heading'> | ||
{messages.title} | ||
</Text> | ||
<Box w='100%'> | ||
<Form> | ||
<Flex direction='column' gap='2xl' w='100%'> | ||
<Flex direction='column' gap='l'> | ||
{/* TODO: replace old TextField */} | ||
<HarmonyTextField name='email' label={messages.emailLabel} /> | ||
{/* TODO: password visibility icon and toggle */} | ||
<HarmonyTextField | ||
name='password' | ||
label={messages.passwordLabel} | ||
endIcon={IconVisibilityHidden} | ||
type='password' | ||
/> | ||
</Flex> | ||
<Flex direction='column' gap='l'> | ||
<Button iconRight={IconArrowRight} type='submit'> | ||
{messages.signIn} | ||
</Button> | ||
<Text color='heading' variant='body'> | ||
{/* TODO: link destination */} | ||
{messages.forgotPassword} | ||
</Text> | ||
</Flex> | ||
</Flex> | ||
</Form> | ||
</Box> | ||
</Flex> | ||
</Flex> | ||
<Flex | ||
className={styles.createAccountRow} | ||
direction='row' | ||
w='100%' | ||
justifyContent='center' | ||
gap='xs' | ||
mb='4xl' | ||
> | ||
{/* TODO: args look good but style doesn't match design */} | ||
<Text variant='title'>{messages.newToAudius}</Text> | ||
<Link to={''}>{messages.createAccount}</Link> | ||
</Flex> | ||
</Flex> | ||
) | ||
} |