Merge branch 'temp' into Persistance
continuous-integration/drone/push Build is passing Details

Persistance
Alban GUILHOT 2 years ago
commit be124d7576

@ -8,7 +8,6 @@ import React, { useCallback } from 'react';
import { useUserStore } from './userContext'; import { useUserStore } from './userContext';
export const MANAGER_USER = new ManagerUser(new LoaderUserApi, new FakeSaverUser); export const MANAGER_USER = new ManagerUser(new LoaderUserApi, new FakeSaverUser);
@ -53,4 +52,3 @@ export const MANAGER_USER = new ManagerUser(new LoaderUserApi, new FakeSaverUser
} }

@ -6,9 +6,6 @@ import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar'; import { BotBar } from '../components/BotBar';
import { FlatList } from 'react-native-gesture-handler'; import { FlatList } from 'react-native-gesture-handler';
import { ConversationComponent } from '../components/ConversationComponent'; import { ConversationComponent } from '../components/ConversationComponent';
import { useSelector } from 'react-redux';
import { RootState } from '../redux/store';
import { MANAGER_USER } from '../../App';
function Chat(props: { navigation: any; }) { function Chat(props: { navigation: any; }) {
const { navigation } = props const { navigation } = props
@ -20,6 +17,7 @@ function Chat(props: { navigation: any; }) {
nav={navigation} nav={navigation}
/> />
<View style={stylesScreen.bodyStart}> <View style={stylesScreen.bodyStart}>
{/* {/*
<FlatList <FlatList
data={MANAGER_USER.getCurrentUser().getTabConv()} data={MANAGER_USER.getCurrentUser().getTabConv()}

@ -8,8 +8,6 @@ import { BotBar } from '../components/BotBar';
import { SkinComponent } from '../components/Skin'; import { SkinComponent } from '../components/Skin';
import { ButtonGreySmall } from '../components/ButtonGreySmall'; import { ButtonGreySmall } from '../components/ButtonGreySmall';
import { ScreenIndicator } from '../components/ScreenIndicator'; import { ScreenIndicator } from '../components/ScreenIndicator';
import { useSelector } from 'react-redux';
import { RootState } from '../redux/store';
import { MANAGER_USER } from '../../App'; import { MANAGER_USER } from '../../App';
const coin = require('../../assets/Icons/Coin.png') const coin = require('../../assets/Icons/Coin.png')
@ -42,6 +40,7 @@ function Profile(props: { navigation: any; }) {
</View> </View>
<View style={styles.infoView}> <View style={styles.infoView}>
<Text style={styles.infoText}>Total de BobCoin gagnés: {MANAGER_USER.getCurrentUser().getTotalCoins()}</Text> <Text style={styles.infoText}>Total de BobCoin gagnés: {MANAGER_USER.getCurrentUser().getTotalCoins()}</Text>
<Text style={styles.infoText}>Total de BobCoin gagnés: </Text>
</View> </View>
</View> </View>
<BotBar <BotBar

@ -94,7 +94,6 @@ function Settings(props: { navigation: any; }) {
</DialogInput> </DialogInput>
</View> </View>
); );
} }

@ -20,8 +20,6 @@ function SignIn(props: { navigation: any; }) {
const setUser = useUserStore((state) => state.setUser); const setUser = useUserStore((state) => state.setUser);
const errorList = useSelector((state: RootState) => state.credentialErrors.loginErrorList); const errorList = useSelector((state: RootState) => state.credentialErrors.loginErrorList);
const [pseudo, setPseudo] = useState(''); const [pseudo, setPseudo] = useState('');
const [password, setPassword] = useState(''); const [password, setPassword] = useState('');
const dispatch=useDispatch(); const dispatch=useDispatch();
@ -32,7 +30,6 @@ function SignIn(props: { navigation: any; }) {
} }
const handleUserConnect = useCallback(async (pseudo: string, password: string) => { const handleUserConnect = useCallback(async (pseudo: string, password: string) => {
const us =await MANAGER_USER.getLoaderUser().loadByUsernamePassword(pseudo, password).then((res) => { const us =await MANAGER_USER.getLoaderUser().loadByUsernamePassword(pseudo, password).then((res) => {
@ -52,17 +49,16 @@ function SignIn(props: { navigation: any; }) {
return ( return (
<View style={stylesScreen.container}> <View style={stylesScreen.container}>
<View style={stylesScreen.bodyCenter}> <View style={stylesScreen.bodyCenter}>
<TextInput style={styles.textInput} placeholder='Login' onChangeText={(val) => setPseudo(val)} autoCapitalize='none' /> <TextInput style={styles.textInput} placeholder='Login' onChangeText={(val) => setPseudo(val)} autoCapitalize='none' />
<TextInput style={styles.textInput} placeholder='Password' onChangeText={(val) => setPassword(val)} autoCapitalize='none' secureTextEntry={true}/> <TextInput style={styles.textInput} placeholder='Password' onChangeText={(val) => setPassword(val)} autoCapitalize='none' secureTextEntry={true}/>
<Pressable style={styles.button} onPress={() => handleUserConnect(pseudo, password)}> <Pressable style={styles.button} onPress={() => handleUserConnect(pseudo, password)}>
<Text style={styles.text}>Se connecter</Text> <Text style={styles.text}>Se connecter</Text>
</Pressable> </Pressable>
<Pressable onPress={() => navigation.navigate('SignUp')}> <Pressable onPress={() => navigation.navigate('SignUp')}>
<Text style={styles.textLink}>Pas de compte? Inscrivez vous !</Text> <Text style={styles.textLink}>Pas de compte? Inscrivez vous !</Text>
</Pressable> </Pressable>
</View> </View>
{/*
<Dialog.Container visible={false}> <Dialog.Container visible={false}>
<Dialog.Title>Ce pseudo n'exsite pas</Dialog.Title> <Dialog.Title>Ce pseudo n'exsite pas</Dialog.Title>
<Dialog.Button label="Fermer" onPress={() => dispatch(updateIncorrectCredentials(false))} /> <Dialog.Button label="Fermer" onPress={() => dispatch(updateIncorrectCredentials(false))} />
@ -71,6 +67,7 @@ function SignIn(props: { navigation: any; }) {
<Dialog.Title>Mot de passe incorrect</Dialog.Title> <Dialog.Title>Mot de passe incorrect</Dialog.Title>
<Dialog.Button label="Fermer" onPress={() => dispatch(updateIncorrectCredentials(false))} /> <Dialog.Button label="Fermer" onPress={() => dispatch(updateIncorrectCredentials(false))} />
</Dialog.Container> </Dialog.Container>
*/}
</View> </View>
); );

@ -7,8 +7,6 @@ import { BotBar } from '../components/BotBar';
import { FlatList } from 'react-native-gesture-handler'; import { FlatList } from 'react-native-gesture-handler';
import { SkinComponent } from '../components/Skin'; import { SkinComponent } from '../components/Skin';
import { ScreenIndicator } from '../components/ScreenIndicator'; import { ScreenIndicator } from '../components/ScreenIndicator';
import { useSelector } from 'react-redux';
import { RootState } from '../redux/store';
import { MANAGER_USER } from '../../App'; import { MANAGER_USER } from '../../App';
function Store(props: { navigation: any; }) { function Store(props: { navigation: any; }) {

@ -6844,7 +6844,7 @@ react-native-date-picker@^4.2.5:
react-native-dialog-input@^1.0.8: react-native-dialog-input@^1.0.8:
version "1.0.8" version "1.0.8"
resolved "https://registry.npmjs.org/react-native-dialog-input/-/react-native-dialog-input-1.0.8.tgz" resolved "https://registry.yarnpkg.com/react-native-dialog-input/-/react-native-dialog-input-1.0.8.tgz#6813d3b158bbb85d83a94310f38695d9f2b02682"
integrity sha512-W9YNMt6r+rUUMDEkOR1WMuGfSJw97ujB8H1xp8TjJTOnYVSlsf4aEP6t+J8tVk3XZaDcTawXgDjxH6E1WVWRog== integrity sha512-W9YNMt6r+rUUMDEkOR1WMuGfSJw97ujB8H1xp8TjJTOnYVSlsf4aEP6t+J8tVk3XZaDcTawXgDjxH6E1WVWRog==
react-native-dialog@^9.2.2: react-native-dialog@^9.2.2:

Loading…
Cancel
Save