Skip to content

Commit

Permalink
Merge pull request #1971 from Expensify/puneet-terms-licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
deetergp authored Mar 23, 2021
2 parents 0ba4b26 + 24bb443 commit ddcebe8
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const CONST = {
PDF_VIEWER_URL: '/pdf/web/viewer.html',
EXPENSIFY_ICON_URL: `${CLOUDFRONT_URL}/images/favicon-2019.png`,
UPWORK_URL: 'https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&user_location_match=2',
TERMS_URL: 'https://use.expensify.com/terms',
PRIVACY_URL: 'https://use.expensify.com/privacy',
LICENSES_URL: 'https://use.expensify.com/licenses',
OPTION_TYPE: {
REPORT: 'report',
PERSONAL_DETAIL: 'personalDetail',
Expand Down
32 changes: 28 additions & 4 deletions src/pages/settings/InitialPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
import ScreenWrapper from '../../components/ScreenWrapper';
import MenuItem from '../../components/MenuItem';
import ROUTES from '../../ROUTES';
import openURLInNewTab from '../../libs/openURLInNewTab';
import CONST from '../../CONST';

const propTypes = {
/* Onyx Props */
Expand Down Expand Up @@ -139,10 +141,32 @@ const InitialSettingsPage = ({
</TouchableOpacity>
</View>
</View>
<Text style={[styles.chatItemMessageHeaderTimestamp]} numberOfLines={1}>
v
{version}
</Text>
<View style={[styles.sidebarFooter]}>
<Text style={[styles.chatItemMessageHeaderTimestamp]} numberOfLines={1}>
v
{version}
</Text>
<Text style={[styles.chatItemMessageHeaderTimestamp]} numberOfLines={1}>
Read the
{' '}
<Text
style={[styles.chatItemMessageHeaderTimestamp, styles.link]}
onPress={() => openURLInNewTab(CONST.TERMS_URL)}
>
terms of service
</Text>
{' '}
and
{' '}
<Text
style={[styles.chatItemMessageHeaderTimestamp, styles.link]}
onPress={() => openURLInNewTab(CONST.PRIVACY_URL)}
>
privacy policy
</Text>
.
</Text>
</View>
</View>
</ScreenWrapper>
);
Expand Down
3 changes: 3 additions & 0 deletions src/pages/signin/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SignInPageLayout from './SignInPageLayout';
import LoginForm from './LoginForm';
import PasswordForm from './PasswordForm';
import ResendValidationForm from './ResendValidationForm';
import TermsAndLicenses from './TermsAndLicenses';

const propTypes = {
/* Onyx Props */
Expand Down Expand Up @@ -92,6 +93,8 @@ class SignInPage extends Component {
)}
</View>
)}

<TermsAndLicenses />
</SignInPageLayout>
</SafeAreaView>
</>
Expand Down
32 changes: 32 additions & 0 deletions src/pages/signin/TermsAndLicenses/TermsOnly.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import {Text, View} from 'react-native';
import styles from '../../../styles/styles';
import CONST from '../../../CONST';
import openURLInNewTab from '../../../libs/openURLInNewTab';

const TermsOnly = () => (
<View style={[styles.mt6]}>
<Text style={[styles.loginTermsText]}>
By logging in, you agree to the
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.TERMS_URL)}
>
terms of service
</Text>
{' '}
and
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.PRIVACY_URL)}
>
privacy policy
</Text>
.
</Text>
</View>
);

export default TermsOnly;
40 changes: 40 additions & 0 deletions src/pages/signin/TermsAndLicenses/TermsWithLicenses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import {Text, View} from 'react-native';
import styles from '../../../styles/styles';
import CONST from '../../../CONST';
import openURLInNewTab from '../../../libs/openURLInNewTab';

const TermsWithLicenses = () => (
<View style={[styles.mt6]}>
<Text style={[styles.loginTermsText]}>
By logging in, you agree to the
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.TERMS_URL)}
>
terms of service
</Text>
{' '}
and
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.PRIVACY_URL)}
>
privacy policy
</Text>
. Money transmission is provided by Expensify Payments LLC (NMLS ID:2017010) pursuant to its
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.LICENSES_URL)}
>
licenses
</Text>
.
</Text>
</View>
);

export default TermsWithLicenses;
3 changes: 3 additions & 0 deletions src/pages/signin/TermsAndLicenses/index.desktop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import TermsOnly from './TermsOnly';

export default TermsOnly;
3 changes: 3 additions & 0 deletions src/pages/signin/TermsAndLicenses/index.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import TermsOnly from './TermsOnly';

export default TermsOnly;
3 changes: 3 additions & 0 deletions src/pages/signin/TermsAndLicenses/index.website.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import TermsWithLicenses from './TermsWithLicenses';

export default TermsWithLicenses;
8 changes: 7 additions & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ const styles = {
width: '100%',
},

loginTermsText: {
color: themeColors.textSupporting,
fontSize: variables.fontSizeSmall,
lineHeight: 20,
},

// Sidebar Styles
sidebar: {
backgroundColor: themeColors.sidebar,
Expand All @@ -395,7 +401,7 @@ const styles = {
sidebarFooter: {
alignItems: 'center',
display: 'flex',
flexDirection: 'row',
flexDirection: 'column',
height: 84,
justifyContent: 'flex-start',
paddingHorizontal: 20,
Expand Down

0 comments on commit ddcebe8

Please sign in to comment.