Skip to content

Commit

Permalink
feat(burger): ajout écran "Qui peut voir mes données ?"
Browse files Browse the repository at this point in the history
  • Loading branch information
tangimds committed Dec 22, 2021
1 parent f2cff26 commit a7cafb3
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 2 deletions.
19 changes: 19 additions & 0 deletions assets/svg/Lock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import Svg, {Path} from 'react-native-svg';

const SvgComponent = (props) => (
<Svg
width={60}
height={60}
viewBox="0 0 60 60"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<Path
d="M30 .56C13.756.56.56 13.756.56 30S13.756 59.44 30 59.44 59.44 46.244 59.44 30 46.244.56 30 .56Zm0 2.56c14.86 0 26.88 12.02 26.88 26.88S44.86 56.88 30 56.88 3.12 44.86 3.12 30 15.14 3.12 30 3.12Zm0 8.96a7.663 7.663 0 0 0-7.68 7.68v3.84h-1.28a3.859 3.859 0 0 0-3.84 3.84v12.8c0 2.106 1.734 3.84 3.84 3.84h17.92c2.106 0 3.84-1.734 3.84-3.84v-12.8c0-2.106-1.734-3.84-3.84-3.84h-1.28v-3.84A7.664 7.664 0 0 0 30 12.08Zm0 2.56c2.914 0 5.12 2.206 5.12 5.12v3.84H24.88v-3.84c0-2.914 2.207-5.12 5.12-5.12Zm-8.96 11.52h2.345c.138.023.28.023.418 0h12.382c.138.023.28.023.418 0h2.357c.71 0 1.28.57 1.28 1.28v12.8c0 .71-.57 1.28-1.28 1.28H21.04c-.71 0-1.28-.57-1.28-1.28v-12.8c0-.71.57-1.28 1.28-1.28ZM30 30a2.56 2.56 0 0 0-1.28 4.775V36.4c0 .768.512 1.28 1.28 1.28s1.28-.512 1.28-1.28v-1.627a2.56 2.56 0 0 0 1.28-2.213A2.56 2.56 0 0 0 30 30Z"
fill="currentColor"
/>
</Svg>
);

export default SvgComponent;
2 changes: 2 additions & 0 deletions src/components/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Text from '../components/MyText';
import PhoneSvg from '../../assets/svg/Phone';
import PeopleSvg from '../../assets/svg/People';
import GlobeSvg from '../../assets/svg/Globe';
import LockSvg from '../../assets/svg/Lock';

import {
StyleSheet,
Expand Down Expand Up @@ -65,6 +66,7 @@ const mapIconToSvg = (icon) => {
PhoneSvg,
GlobeSvg,
PeopleSvg,
LockSvg,
};
return iconMap[icon];
};
Expand Down
11 changes: 9 additions & 2 deletions src/components/drawer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ export default ({navigation, visible, onClick}) => {
onClick={onClick}
icon="PeopleSvg"
/>
<DrawerItem
title="Qui peut voir mes données ?"
path="privacy-light"
navigation={navigation}
onClick={onClick}
icon="LockSvg"
/>
{updateVisible ? (
<DrawerItem
badge
Expand Down Expand Up @@ -158,12 +165,12 @@ const styles = StyleSheet.create({
paddingBottom: 80,
},
versionContainer: {
marginTop: 20,
marginTop: 47,
flex: 1,
alignItems: 'center',
},
versionLabel: {
color: '#ccc',
color: '#ddd',
},
card: {
width: '80%',
Expand Down
2 changes: 2 additions & 0 deletions src/navigation/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import ViewBeck from '../scenes/beck/view';
import Beck from '../scenes/beck';
import Infos from '../scenes/infos';
import Contact from '../scenes/contact';
import PrivacyLight from '../scenes/privacy-light';

const Stack = createStackNavigator();

Expand Down Expand Up @@ -115,6 +116,7 @@ class Router extends React.Component {
<Stack.Screen name="news" component={News} />
<Stack.Screen name="infos" component={Infos} />
<Stack.Screen name="contact" component={Contact} />
<Stack.Screen name="privacy-light" component={PrivacyLight} />
<Stack.Screen name="contribute-pro" component={ContributePro} />
<Stack.Screen name="activate-beck" component={ActivateBeck} />
<Stack.Screen name="view-beck" component={ViewBeck} />
Expand Down
100 changes: 100 additions & 0 deletions src/scenes/privacy-light/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import React from 'react';
import {View, StyleSheet, SafeAreaView, ScrollView, Image} from 'react-native';
import Text from '../../components/MyText';
import {colors} from '../../utils/colors';
import BackButton from '../../components/BackButton';
import Icon from '../../components/Icon';

export default ({navigation}) => {
return (
<SafeAreaView style={styles.safe}>
<View style={styles.headerContainer}>
<BackButton onPress={navigation.goBack} />
<Image
style={styles.image}
source={require('../../../assets/imgs/logo2.png')}
/>
</View>
<ScrollView contentContainerStyle={styles.scrollContainer}>
<Icon
styleContainer={styles.iconContainer}
icon="LockSvg"
color="#d3d3e8"
width={70}
height={70}
/>
<View style={styles.paragraph}>
<Text style={styles.standardText}>
Les <Text style={styles.lightblue}>informations personnelles</Text>{' '}
que je saisis dans Mon Suivi Psy (ressentis, notes, traitements,
exercices, ...) ne sont{' '}
<Text style={styles.lightblue}>pas accessibles</Text> et ne peuvent{' '}
<Text style={styles.lightblue}>pas être lues</Text> ou{' '}
<Text style={styles.lightblue}>utilisées</Text>.
</Text>
</View>
<View style={styles.paragraph}>
<Text style={styles.standardText}>
<Text style={styles.lightblue}>Moi seul</Text> peux{' '}
<Text style={styles.lightblue}>décider</Text> de les{' '}
<Text style={styles.lightblue}>partager</Text> avec la fonction "
<Text style={styles.lightblue}>exporter ses données</Text>".
</Text>
</View>
<View style={styles.paragraph}>
<Text style={styles.standardText}>
Dans le but d'<Text style={styles.lightblue}>améliorer</Text>{' '}
l'application, seules des données{' '}
<Text style={styles.lightblue}>anonymées</Text> concernant la{' '}
<Text style={styles.lightblue}>fréquence</Text> d'utilisation de
l'application et de ses fonctionnalités sont{' '}
<Text style={styles.lightblue}>recueillies</Text> par la Fabrique du
Numérique des Minsitères Sociaux.
</Text>
</View>
</ScrollView>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
iconContainer: {
width: 70,
height: 70,
},
paragraph: {
padding: 20,
fontSize: 18,
},
headerContainer: {
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingRight: 20,
},
image: {
height: 50,
width: 50,
},
safe: {
flex: 1,
backgroundColor: 'white',
},
scrollContainer: {
paddingBottom: 80,
display: 'flex',
alignItems: 'center',
},
standardText: {
fontSize: 18,
color: colors.DARK_BLUE,
textAlign: 'center',
},
bold: {
fontWeight: 'bold',
},
lightblue: {
color: colors.LIGHT_BLUE,
},
});

0 comments on commit a7cafb3

Please sign in to comment.