Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 15 additions & 31 deletions src/auth/screens/auth-profile.screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import styled from 'styled-components/native';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import {
StyleSheet,
Text,
RefreshControl,
View,
ActivityIndicator,
Expand Down Expand Up @@ -44,30 +42,17 @@ const mapDispatchToProps = dispatch =>
dispatch
);

const styles = StyleSheet.create({
update: {
flex: 1,
alignItems: 'center',
marginVertical: 40,
},
updateText: {
color: colors.greyDark,
...fonts.fontPrimary,
},
updateTextSub: {
fontSize: normalize(11),
},
note: {
fontSize: normalize(11),
color: colors.primaryDark,
...fonts.fontPrimaryLight,
textAlign: 'center',
padding: 10,
},
noteLink: {
...fonts.fontPrimarySemiBold,
},
});
const Note = styled.Text`
font-size: ${normalize(11)};
color: ${colors.primaryDark};
${fonts.fontPrimaryLight};
text-align: center;
padding: 10px;
`;

const NoteLink = styled.Text`
${fonts.fontPrimarySemiBold};
`;

const BioListItem = styled(ListItem).attrs({
containerStyle: {
Expand Down Expand Up @@ -193,20 +178,19 @@ class AuthProfile extends Component {
navigation={navigation}
/>
))}
<Text style={styles.note}>
<Note>
{translate('auth.profile.orgsRequestApprovalTop', locale)}
{'\n'}
<Text
style={styles.noteLink}
<NoteLink
onPress={() =>
openURLInView('https://github.com/settings/applications')}
>
{translate(
'auth.profile.orgsRequestApprovalBottom',
locale
)}
</Text>
</Text>
</NoteLink>
</Note>
</SectionList>
</View>
)}
Expand Down
155 changes: 79 additions & 76 deletions src/auth/screens/privacy-policy.screen.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
import React, { Component } from 'react';
import { StyleSheet, ScrollView, View, Text } from 'react-native';
import styled from 'styled-components/native';
import { ScrollView } from 'react-native';

import { ViewContainer } from 'components';
import { translate } from 'utils';
import { colors, fonts, normalize } from 'config';
import { v3 } from 'api';

const styles = StyleSheet.create({
container: {
flex: 1,
padding: 15,
},
title: {
fontSize: normalize(14),
color: colors.primaryDark,
...fonts.fontPrimarySemiBold,
marginBottom: 15,
},
section: {
borderTopColor: colors.greyLight,
borderTopWidth: 3,
paddingVertical: 15,
},
sectionTitle: {
fontSize: normalize(12),
color: colors.primaryDark,
...fonts.fontPrimaryBold,
marginBottom: 15,
},
text: {
fontSize: normalize(12),
color: colors.primaryDark,
...fonts.fontPrimary,
marginBottom: 15,
},
link: {
...fonts.fontPrimarySemiBold,
},
});
const Container = styled.View`
flex: 1;
padding: 15px;
`;

const Title = styled.Text`
font-size: ${normalize(14)};
color: ${colors.primaryDark};
${fonts.fontPrimarySemiBold};
margin-bottom: 15;
`;

const Section = styled.View`
border-top-color: ${colors.greyLight};
border-top-width: 3;
padding-vertical: 15;
`;

const SectionTitle = styled.Text`
font-size: ${normalize(12)};
color: ${colors.primaryDark};
${fonts.fontPrimaryBold};
margin-bottom: 15;
`;

const StyledText = styled.Text`
font-size: ${normalize(12)};
color: ${colors.primaryDark};
${fonts.fontPrimary};
margin-bottom: 15;
`;

const Link = styled.Text`
${fonts.fontPrimarySemiBold};
`;

export class PrivacyPolicyScreen extends Component {
props: {
Expand All @@ -51,82 +55,81 @@ export class PrivacyPolicyScreen extends Component {
return (
<ViewContainer>
<ScrollView>
<View style={styles.container}>
<Text style={styles.title}>
<Container>
<Title>
{translate('auth.privacyPolicy.effectiveDate', locale)}
</Text>
</Title>

<View style={styles.section}>
<Text style={styles.text}>
<Section>
<StyledText>
{translate('auth.privacyPolicy.introduction', locale)}
</Text>
</View>
</StyledText>
</Section>

<View style={styles.section}>
<Text style={styles.sectionTitle}>
<Section>
<SectionTitle>
{translate('auth.privacyPolicy.userDataTitle', locale)}
</Text>
</SectionTitle>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.userData1', locale)}
</Text>
</StyledText>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.userData2', locale)}
</Text>
</View>
</StyledText>
</Section>

<View style={styles.section}>
<Text style={styles.sectionTitle}>
<Section>
<SectionTitle>
{translate('auth.privacyPolicy.analyticsInfoTitle', locale)}
</Text>
</SectionTitle>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.analyticsInfo1', locale)}
</Text>
</StyledText>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.analyticsInfo2', locale)}
</Text>
</View>
</StyledText>
</Section>

<View style={styles.section}>
<Text style={styles.sectionTitle}>
<Section>
<SectionTitle>
{translate('auth.privacyPolicy.openSourceTitle', locale)}
</Text>
</SectionTitle>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.openSource1', locale)}
</Text>
</StyledText>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.openSource2', locale)}
</Text>
</View>
</StyledText>
</Section>

<View style={styles.section}>
<Text style={styles.sectionTitle}>
<Section>
<SectionTitle>
{translate('auth.privacyPolicy.contactTitle', locale)}
</Text>
</SectionTitle>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.contact1', locale)}
</Text>
</StyledText>

<Text style={styles.text}>
<StyledText>
{translate('auth.privacyPolicy.contact2', locale)}{' '}
<Text
style={styles.link}
<Link
onPress={() =>
navigation.navigate('Repository', {
repositoryUrl: `${v3.root}/repos/gitpoint/git-point`,
})}
>
{translate('auth.privacyPolicy.contactLink', locale)}
</Text>
</Text>
</View>
</View>
</Link>
</StyledText>
</Section>
</Container>
</ScrollView>
</ViewContainer>
);
Expand Down
34 changes: 15 additions & 19 deletions src/auth/screens/splash.screen.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import styled from 'styled-components/native';
import { connect } from 'react-redux';
import { StyleSheet, View, Image } from 'react-native';

import { colors } from 'config';
import { resetNavigationTo } from 'utils';
Expand All @@ -9,18 +9,17 @@ const mapStateToProps = state => ({
isAuthenticated: state.auth.isAuthenticated,
});

const styles = StyleSheet.create({
logoContainer: {
backgroundColor: colors.white,
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
logo: {
width: 100,
height: 100,
},
});
const LogoContainer = styled.View`
background-color: ${colors.white};
flex: 1;
justify-content: center;
align-items: center;
`;

const Logo = styled.View`
width: 100;
height: 100;
`;

class Splash extends Component {
props: {
Expand All @@ -40,12 +39,9 @@ class Splash extends Component {

render() {
return (
<View style={styles.logoContainer}>
<Image
style={styles.logo}
source={require('../../assets/logo-black.png')}
/>
</View>
<LogoContainer>
<Logo source={require('../../assets/logo-black.png')} />
</LogoContainer>
);
}
}
Expand Down
Loading