Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 134
[C-3270] Mobile UI for create email page#6701
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
13e4a6ae5935492dae4418905f4414589e21236463fce1771c2f3edaa8a11c01e41ff980f6284164521fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| export { Paper } from './Paper' | ||
| export { type PaperProps } from './types' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -11,6 +11,8 @@ import { Link } from 'react-router-dom' | ||
| import { HarmonyPasswordField } from 'components/form-fields/HarmonyPasswordField' | ||
| import { HarmonyTextField } from 'components/form-fields/HarmonyTextField' | ||
| import { ArtworkContainer } from 'pages/sign-on/components/AudiusValues' | ||
| import { SignOnContainerMobile } from 'pages/sign-on/components/mobile/SignOnContainerMobile' | ||
| import styles from './SignInPageMobile.module.css' | ||
| @@ -26,65 +28,63 @@ const messages = { | ||
| 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} /> | ||
| <HarmonyPasswordField | ||
| name='password' | ||
| label={messages.passwordLabel} | ||
| /> | ||
| <SignOnContainerMobile> | ||
| <ArtworkContainer justifyContent='space-between'> | ||
| <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%'> | ||
Contributor 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. Box as=Form ? | ||
| <Form> | ||
| <Flex direction='column' gap='2xl' w='100%'> | ||
| <Flex direction='column' gap='l'> | ||
| {/* TODO: replace old TextField */} | ||
| <HarmonyTextField | ||
| name='email' | ||
| label={messages.emailLabel} | ||
| /> | ||
| <HarmonyPasswordField | ||
| name='password' | ||
| label={messages.passwordLabel} | ||
| /> | ||
| </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> | ||
| <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> | ||
| </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> | ||
| <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> | ||
| </ArtworkContainer> | ||
| </SignOnContainerMobile> | ||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| .artworkBackground { | ||
| 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; | ||
| } | ||
| .artworkBackground.desktop { | ||
| width: 800px; | ||
| height: 864px; | ||
| background-position: -175px; | ||
| background-size: cover; | ||
| } | ||
| .artworkBackground.mobile { | ||
| width: 100%; | ||
| height: 100%; | ||
| background-size: auto 100%; | ||
| background-position: 50%; | ||
| gap: var(--harmony-spacing-2xl); | ||
| } | ||
| .valueRow, | ||
| .artworkBackground h1 { | ||
| color: var(--harmony-static-white); | ||
| } | ||
| .icon path { | ||
| fill: currentColor; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| import React, { PropsWithChildren } from 'react' | ||
| import { | ||
| Box, | ||
| Flex, | ||
| FlexProps, | ||
| IconCloudUpload, | ||
| IconComponent, | ||
| IconHeadphones, | ||
| IconMessage, | ||
| Text | ||
| } from '@audius/harmony' | ||
| import cn from 'classnames' | ||
| import { useMedia } from 'hooks/useMedia' | ||
| import styles from './AudiusValues.module.css' | ||
| const messages = { | ||
| heading: 'Your Music, Your Way', | ||
| unlimitedStreaming: 'Unlimited Streaming & Uploads', | ||
| directMessages: 'Message & Connect With Fans', | ||
| adFree: 'Ad-Free, Offline Listening' | ||
| } | ||
| /** | ||
| * | ||
| * @param param0 | ||
| * @returns | ||
| */ | ||
| export const ArtworkContainer = ({ | ||
| children, | ||
| ...rest | ||
| }: PropsWithChildren<FlexProps>) => { | ||
| const { isDesktop } = useMedia() | ||
| return ( | ||
| <Flex | ||
| className={cn( | ||
| styles.artworkBackground, | ||
| styles[isDesktop ? 'desktop' : 'mobile'] | ||
| )} | ||
| direction='column' | ||
| justifyContent={isDesktop ? 'center' : 'flex-start'} | ||
| {...rest} | ||
| > | ||
| {children} | ||
| </Flex> | ||
| ) | ||
| } | ||
| /** | ||
| * Each individual audius value text + icon row | ||
| */ | ||
| type AudiusValueProps = { icon: IconComponent; text: string } | ||
| const AudiusValue = (props: AudiusValueProps) => { | ||
| const { icon: Icon, text } = props | ||
| const { isDesktop } = useMedia() | ||
| return ( | ||
| <Flex | ||
| className={styles.valueRow} | ||
| direction='row' | ||
| gap='l' | ||
| alignItems='center' | ||
| > | ||
| <Icon className={styles.icon} /> | ||
| <Text | ||
| variant={isDesktop ? 'heading' : 'title'} | ||
| size={isDesktop ? 'xl' : 'l'} | ||
| strength={isDesktop ? 'default' : 'weak'} | ||
| > | ||
| {text} | ||
| </Text> | ||
| </Flex> | ||
| ) | ||
| } | ||
| /** | ||
| * Renders all the audius values | ||
| */ | ||
| export const AudiusValues = () => { | ||
| const { isDesktop } = useMedia() | ||
| return ( | ||
| <Flex direction='column' gap={isDesktop ? 'xl' : 'l'} alignItems='center'> | ||
| {isDesktop ? ( | ||
| <Box pb='l'> | ||
| <Text variant='display' size='s' strength='strong'> | ||
| {messages.heading} | ||
| </Text> | ||
| </Box> | ||
| ) : null} | ||
| <AudiusValue icon={IconCloudUpload} text={messages.unlimitedStreaming} /> | ||
| <AudiusValue icon={IconMessage} text={messages.directMessages} /> | ||
| <AudiusValue icon={IconHeadphones} text={messages.adFree} /> | ||
| </Flex> | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .root { | ||
| background-color: var(--harmony-white); | ||
| text-align: left; | ||
| height: max-content; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { HTMLAttributes, PropsWithChildren } from 'react' | ||
| import { Flex, FlexProps } from '@audius/harmony' | ||
| import cn from 'classnames' | ||
| import styles from './MobileContentContainer.module.css' | ||
| export type MobileContentContainerProps = PropsWithChildren<FlexProps> & | ||
Contributor 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. seems we really only use children + className, can prob just say "FlexProps" ? ContributorAuthor 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. Yeah I tried just FlexProps but it didnt bring in children for some reason 🤷
| ||
| HTMLAttributes<HTMLDivElement> | ||
| export const MobileContentContainer = ({ | ||
ContributorAuthor 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. | ||
| children, | ||
Contributor 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. might be a bit silly, but i like | ||
| className | ||
| }: MobileContentContainerProps) => { | ||
| return ( | ||
| <Flex | ||
| className={cn(className, styles.root)} | ||
DejayJD marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ph='l' | ||
| pv='2xl' | ||
| direction='column' | ||
| gap='2xl' | ||
| alignItems='center' | ||
| w='100%' | ||
| > | ||
| {children} | ||
| </Flex> | ||
| ) | ||
| } | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SignOn or SignIn? or is it used for sign-up and sign-in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! Used it for both sign up/in, so I named it
SignOn