-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3079 from pranshuchittora/pranshuchittora/feat/la…
…nding-design feat: New landing page design
- Loading branch information
Showing
24 changed files
with
466 additions
and
266 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
114 changes: 40 additions & 74 deletions
114
src/pages/signin/SignInPageLayout/SignInPageLayoutNarrow.js
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 |
---|---|---|
@@ -1,100 +1,66 @@ | ||
import React from 'react'; | ||
import { | ||
Image, | ||
ScrollView, | ||
View, | ||
} from 'react-native'; | ||
import {ScrollView, View} from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import styles from '../../../styles/styles'; | ||
import variables from '../../../styles/variables'; | ||
import ExpensifyCashLogo from '../../../components/ExpensifyCashLogo'; | ||
import welcomeScreenshot from '../../../../assets/images/welcome-screenshot.png'; | ||
import TermsAndLicenses from '../TermsAndLicenses'; | ||
import WelcomeText from '../../../components/WelcomeText'; | ||
import Text from '../../../components/Text'; | ||
import TextLink from '../../../components/TextLink'; | ||
import CONST from '../../../CONST'; | ||
import TermsAndLicenses from '../TermsAndLicenses'; | ||
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; | ||
import compose from '../../../libs/compose'; | ||
import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; | ||
|
||
const propTypes = { | ||
|
||
/** The children to show inside the layout */ | ||
children: PropTypes.node.isRequired, | ||
|
||
/** Whether we should show the welcome elements */ | ||
shouldShowWelcomeText: PropTypes.bool, | ||
shouldShowWelcomeScreenshot: PropTypes.bool, | ||
|
||
...windowDimensionsPropTypes, | ||
...withLocalizePropTypes, | ||
}; | ||
|
||
const defaultProps = { | ||
shouldShowWelcomeText: true, | ||
shouldShowWelcomeScreenshot: true, | ||
}; | ||
|
||
const SignInPageLayoutNarrow = props => ( | ||
<ScrollView keyboardShouldPersistTaps="handled"> | ||
<View> | ||
<View style={[styles.signInPageInnerNative]}> | ||
<View style={[styles.signInPageLogoNative]}> | ||
<ExpensifyCashLogo width={variables.componentSizeLarge} height={variables.componentSizeLarge} /> | ||
</View> | ||
|
||
<View style={[styles.mb6, styles.alignItemsCenter]}> | ||
<Text style={[styles.h1]}> | ||
{props.translate('signInPage.expensifyDotCash')} | ||
</Text> | ||
</View> | ||
|
||
<View style={[styles.signInPageFormContainer]}> | ||
{props.children} | ||
|
||
{props.shouldShowWelcomeScreenshot | ||
&& ( | ||
<View style={[styles.mt5, styles.mb5]}> | ||
<Image | ||
resizeMode="contain" | ||
style={[styles.signinWelcomeScreenshot]} | ||
source={welcomeScreenshot} | ||
/> | ||
</View> | ||
)} | ||
|
||
{props.shouldShowWelcomeText && <WelcomeText />} | ||
<View style={[styles.flexRow, styles.flexWrap, styles.mt6]}> | ||
<Text style={[styles.textLabel]}> | ||
{`${props.translate('signInPage.expensifyIsOpenSource')}. ${ | ||
props.translate('common.view')}`} | ||
{' '} | ||
</Text> | ||
<TextLink style={[styles.textLabel]} href={CONST.GITHUB_URL}> | ||
{props.translate('signInPage.theCode')} | ||
</TextLink> | ||
<Text style={[styles.textLabel]}> | ||
. | ||
</Text> | ||
<Text style={[styles.textLabel]}> | ||
{`${props.translate('common.view')}`} | ||
{' '} | ||
</Text> | ||
<TextLink style={[styles.textLabel]} href={CONST.UPWORK_URL}> | ||
{props.translate('signInPage.openJobs')} | ||
</TextLink> | ||
<Text style={[styles.textLabel]}> | ||
. | ||
</Text> | ||
</View> | ||
<ScrollView | ||
keyboardShouldPersistTaps="handled" | ||
contentContainerStyle={[ | ||
styles.flexGrow1, | ||
styles.pb5, | ||
styles.mh5, | ||
styles.signInPageNarrowContentContainer, | ||
styles.alignSelfCenter, | ||
]} | ||
> | ||
<View style={[styles.flexGrow1]}> | ||
<View | ||
style={[ | ||
styles.signInPageInnerNative, | ||
styles.flex1, | ||
styles.dFlex, | ||
styles.flexColumn, | ||
props.windowHeight > props.windowWidth ? styles.mt40Percentage : null, | ||
]} | ||
> | ||
<View style={[styles.signInPageLogoNative, styles.mb2]}> | ||
<ExpensifyCashLogo | ||
width={variables.componentSizeLarge} | ||
height={variables.componentSizeLarge} | ||
/> | ||
</View> | ||
<Text style={[styles.mv5, styles.textLabel, styles.h3]}> | ||
{props.translate('welcomeText.phrase1')} | ||
</Text> | ||
{props.children} | ||
</View> | ||
<View style={[styles.mt3]}> | ||
<TermsAndLicenses /> | ||
</View> | ||
</View> | ||
</ScrollView> | ||
); | ||
|
||
SignInPageLayoutNarrow.propTypes = propTypes; | ||
SignInPageLayoutNarrow.defaultProps = defaultProps; | ||
SignInPageLayoutNarrow.displayName = 'SignInPageLayoutNarrow'; | ||
|
||
|
||
export default withLocalize(SignInPageLayoutNarrow); | ||
export default compose( | ||
withWindowDimensions, | ||
withLocalize, | ||
)(SignInPageLayoutNarrow); |
Oops, something went wrong.