ADD: ajout de la vue du screen Settings

stub-api
Alban GUILHOT 3 years ago
parent 2f4f5a3ee7
commit c6f34f780f

@ -1,8 +1,19 @@
import { StatusBar } from 'expo-status-bar' import { StatusBar } from 'expo-status-bar'
import { StyleSheet, View, Text} from 'react-native' import { StyleSheet, View, Text, Alert} from 'react-native'
import React from 'react'; import React from 'react';
import stylesScreen from './style/screens.style' import stylesScreen from './style/screens.style';
import styles from './style/Settings.style';
import { TopBar } from '../components/TopBar'; import { TopBar } from '../components/TopBar';
import { User } from '../core/user';
import tabSkinApp from '../constSkin';
import tabConv from '../constCov';
import { ButtonGreySmall } from '../components/ButtonGreySmall';
import { title } from 'process';
import { info } from 'console';
const UserActu=new User("14", "leBg", "MdpDeOuf", "ouioui", "grand", new Date(2022,12,12), 12222, 123324, 12, tabSkinApp[0], tabSkinApp, tabConv);
function Store(props: { navigation: any; }) { function Store(props: { navigation: any; }) {
@ -13,12 +24,34 @@ function Store(props: { navigation: any; }) {
nav={navigation} nav={navigation}
state='settings' state='settings'
/> />
<View style={stylesScreen.bodyStart}> <View style={stylesScreen.bodyStartCenter}>
<Text>couille</Text> <Text style={styles.title}>Informations du Joueur</Text>
<View style={styles.infoView}>
<View style={{flexDirection: 'row', justifyContent: 'space-between',}}>
<View>
<View>
<Text style={styles.text}>Pseudo: {UserActu.getUsername()}</Text>
<ButtonGreySmall onPress={UserActu.setUsername} title='Changer le pseudo'/>
</View>
<View>
<Text style={styles.text}>Mot de passe: {UserActu.getPassword()}</Text>
<ButtonGreySmall onPress={() => console.log('changer mdp')} title='Changer le mot de passe'/>
</View>
<View>
<Text style={styles.text}>Nationalité: {UserActu.getNationality()}</Text>
<ButtonGreySmall onPress={() => console.log('changer nat')} title='Changer la nationnalité'/>
</View>
<View>
<Text style={styles.text}>Sexe: {UserActu.getSexe()}</Text>
<ButtonGreySmall onPress={() => console.log('changer sexe')} title='Changer le sexe'/>
</View>
</View>
<Text style={styles.textID}>ID: {UserActu.getId()}</Text>
</View>
</View>
</View> </View>
</View> </View>
); );
} }
export default Store export default Store

@ -0,0 +1,31 @@
import { StyleSheet } from "react-native";
export default StyleSheet.create({
textID: {
fontSize: 16,
lineHeight: 21,
letterSpacing: 0.25,
color: 'white',
textAlign: 'right',
},
text: {
fontSize: 16,
lineHeight: 21,
letterSpacing: 0.25,
color: 'white',
},
title: {
fontSize: 20,
lineHeight: 21,
fontWeight: 'bold',
letterSpacing: 0.25,
color: 'white',
marginTop: 15,
},
infoView: {
borderColor: '#2D2C33',
borderWidth: 2,
width: '90%',
margin: 15,
padding: 15,}
});

@ -13,6 +13,11 @@ export default StyleSheet.create({
flexDirection: 'column', flexDirection: 'column',
width: '100%', width: '100%',
}, },
bodyStartCenter: {
flex: 1,
alignItems: 'center',
width: '100%',
},
bodyCenter: { bodyCenter: {
flex: 1, flex: 1,
alignItems: 'center', alignItems: 'center',

Loading…
Cancel
Save