From c15c463793143e2c2200249ef0eeca8fb5d3d7b6 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Wed, 12 Oct 2022 14:10:55 +0200 Subject: [PATCH 001/140] FIX: changement du type de la source des skin pour pouvoir l'afficher --- bob_party/src/components/skinAvatar.tsx | 7 +++---- bob_party/src/core/skin.ts | 8 +++++--- bob_party/src/screens/Home.tsx | 12 ++++++------ bob_party/src/screens/Store.tsx | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/bob_party/src/components/skinAvatar.tsx b/bob_party/src/components/skinAvatar.tsx index b708e2f..f0afef3 100644 --- a/bob_party/src/components/skinAvatar.tsx +++ b/bob_party/src/components/skinAvatar.tsx @@ -3,13 +3,12 @@ import { Button, Image, ImageStyle, Text, View } from "react-native" import { Skin } from "../core/Skin" import React from "react" -export const SkinComponent : FC<{skin: Skin, children: ImageStyle, childrenTest: ReactNode}> = ({skin, children, childrenTest}) => { - +export const SkinComponent : FC<{skin: Skin, children: ImageStyle}> = ({skin, children}) => { + console.log(skin.getSkinSource()); return ( - - {childrenTest} + ) } \ No newline at end of file diff --git a/bob_party/src/core/skin.ts b/bob_party/src/core/skin.ts index a8c61d1..c41f2d9 100644 --- a/bob_party/src/core/skin.ts +++ b/bob_party/src/core/skin.ts @@ -1,8 +1,10 @@ +import { ImageURISource } from "react-native"; + export class Skin{ private Name: string; - Source: string; + private Source: any; - constructor(name: string, source:string){ + constructor(name: string, source:any){ this.Name=name; this.Source=source; } @@ -11,7 +13,7 @@ export class Skin{ this.Name=name; } - setSkinSource(source: string){ + setSkinSource(source: any){ this.Source=source; } diff --git a/bob_party/src/screens/Home.tsx b/bob_party/src/screens/Home.tsx index b5cff9f..557e71c 100644 --- a/bob_party/src/screens/Home.tsx +++ b/bob_party/src/screens/Home.tsx @@ -1,15 +1,15 @@ import { StatusBar } from 'expo-status-bar' import { StyleSheet, View, Text, Alert, Pressable, Image} from 'react-native' import React from 'react'; -import { SkinComponent } from '../../components/skinAvatar'; -import { User } from '../../core/user'; -import { Skin } from '../../core/skin'; +import { SkinComponent } from '../components/skinAvatar'; +import { User } from '../core/user'; +import { Skin } from '../core/skin'; const avatar = require('../../assets/Icons/BobClassic.png'); -const skinTest= new Skin("Bob", '../../assets/Icons/BobClassic.png'); +const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const engrenage = require('../../assets/Icons/UnSelected/Cogs.png'); -const gamepad = require('../../assets/Icons/Selected/Gamepad.png'); +const gamepad = require('../../assets/Icons/Selected/SGamepad.png'); const message = require('../../assets/Icons/UnSelected/Chat.png'); const store = require('../../assets/Icons/UnSelected/Store.png'); @@ -19,7 +19,7 @@ function Home(props: { navigation: any; }) { navigation.navigate('Profile')}> - Bite} /> + BOB PARTY navigation.navigate('Settings')}> diff --git a/bob_party/src/screens/Store.tsx b/bob_party/src/screens/Store.tsx index aa9f7b3..0437fc2 100644 --- a/bob_party/src/screens/Store.tsx +++ b/bob_party/src/screens/Store.tsx @@ -6,7 +6,7 @@ const avatar = require('../../assets/Icons/BobClassic.png'); const engrenage = require('../../assets/Icons/UnSelected/Cogs.png'); const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png'); const message = require('../../assets/Icons/UnSelected/Chat.png'); -const store = require('../../assets/Icons/Selected/Store.png'); +const store = require('../../assets/Icons/Selected/SStore.png'); function Store(props: { navigation: any; }) { const { navigation } = props From d4d8802a5dad97d453af5f3522d69687792af294 Mon Sep 17 00:00:00 2001 From: alguilhot Date: Wed, 12 Oct 2022 14:25:27 +0200 Subject: [PATCH 002/140] =?UTF-8?q?FIX:=20r=C3=A9paration=20warn=20screen?= =?UTF-8?q?=20same=20name=20nested?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bob_party/src/navigation/AppNavigator.tsx | 8 ++++---- bob_party/src/screens/Chat.tsx | 6 +++--- bob_party/src/screens/Home.tsx | 8 ++++---- bob_party/src/screens/Profile.tsx | 6 +++--- bob_party/src/screens/Store.tsx | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bob_party/src/navigation/AppNavigator.tsx b/bob_party/src/navigation/AppNavigator.tsx index 1470d38..d5836c5 100644 --- a/bob_party/src/navigation/AppNavigator.tsx +++ b/bob_party/src/navigation/AppNavigator.tsx @@ -67,10 +67,10 @@ function MainTabNavigator() { backBehavior='none' screenOptions={{headerShown: false, tabBarStyle: { display: 'none' },}} > - - - - + + + + diff --git a/bob_party/src/screens/Chat.tsx b/bob_party/src/screens/Chat.tsx index c0cec66..407c844 100644 --- a/bob_party/src/screens/Chat.tsx +++ b/bob_party/src/screens/Chat.tsx @@ -13,7 +13,7 @@ function Store(props: { navigation: any; }) { return ( - navigation.navigate('Profile')}> + navigation.navigate('ProfileTab')}> - navigation.navigate('Home')}> + navigation.navigate('HomeTab')}> - navigation.navigate('Store')}> + navigation.navigate('StoreTab')}> - navigation.navigate('Profile')}> - + navigation.navigate('ProfileTab')}> + BOB PARTY navigation.navigate('Settings')}> @@ -40,7 +40,7 @@ function Home(props: { navigation: any; }) { /> - navigation.navigate('Chat')}> + navigation.navigate('ChatTab')}> - navigation.navigate('Store')}> + navigation.navigate('StoreTab')}> couille - navigation.navigate('Chat')}> + navigation.navigate('ChatTab')}> - navigation.navigate('Home')}> + navigation.navigate('HomeTab')}> - navigation.navigate('Store')}> + navigation.navigate('StoreTab')}> - navigation.navigate('Profile')}> + navigation.navigate('ProfileTab')}> couille - navigation.navigate('Chat')}> + navigation.navigate('ChatTab')}> - navigation.navigate('Home')}> + navigation.navigate('HomeTab')}> Date: Wed, 12 Oct 2022 14:27:24 +0200 Subject: [PATCH 003/140] DEL: remove console.log inutile --- bob_party/src/components/skinAvatar.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/bob_party/src/components/skinAvatar.tsx b/bob_party/src/components/skinAvatar.tsx index f0afef3..fb6ce0d 100644 --- a/bob_party/src/components/skinAvatar.tsx +++ b/bob_party/src/components/skinAvatar.tsx @@ -5,7 +5,6 @@ import React from "react" export const SkinComponent : FC<{skin: Skin, children: ImageStyle}> = ({skin, children}) => { - console.log(skin.getSkinSource()); return ( From d0c2e2dfe6b983b1f580af8a6c1ad7351915e7bb Mon Sep 17 00:00:00 2001 From: alguilhot Date: Wed, 12 Oct 2022 15:04:36 +0200 Subject: [PATCH 004/140] =?UTF-8?q?ADD:=20Ajout=20de=20la=20TopBar=20?= =?UTF-8?q?=C3=A0=20la=20branche=20typescript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bob_party/src/components/TopBar.tsx | 23 +++++++++++++++++++++++ bob_party/src/screens/Home.tsx | 24 +++++++++++------------- 2 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 bob_party/src/components/TopBar.tsx diff --git a/bob_party/src/components/TopBar.tsx b/bob_party/src/components/TopBar.tsx new file mode 100644 index 0000000..869443f --- /dev/null +++ b/bob_party/src/components/TopBar.tsx @@ -0,0 +1,23 @@ +import { FC, ReactNode } from "react" +import { Pressable, Image, ImageStyle, Text, View, Alert, ImageSourcePropType, TextStyle } from "react-native" +import { Skin } from "../core/Skin" +import React from "react" +import { SkinComponent } from "./skinAvatar" +import MainTabNavigator from "../navigation/AppNavigator" +import { BottomTabNavigationProp } from "@react-navigation/bottom-tabs" + + +export const TopBar : FC<{skin: Skin, styleAvatar: ImageStyle, title: String, rightIcon: ImageSourcePropType, styleIcon: ImageStyle,nav: any, styleTitle: TextStyle, styleHeader : any}> = ({skin, styleAvatar, title, rightIcon,styleIcon, nav, styleTitle, styleHeader}) => +{ + return ( + + nav.navigate('ProfileTab')}> + + + {title} + nav.navigate('Settings')}> + + + + ) +} \ No newline at end of file diff --git a/bob_party/src/screens/Home.tsx b/bob_party/src/screens/Home.tsx index 2d38c1e..421e742 100644 --- a/bob_party/src/screens/Home.tsx +++ b/bob_party/src/screens/Home.tsx @@ -1,9 +1,11 @@ import { StatusBar } from 'expo-status-bar' import { StyleSheet, View, Text, Alert, Pressable, Image} from 'react-native' -import React from 'react'; +import React, { Children } from 'react'; import { SkinComponent } from '../components/skinAvatar'; import { User } from '../core/user'; import { Skin } from '../core/skin'; +import { TopBar } from '../components/TopBar'; + const avatar = require('../../assets/Icons/BobClassic.png'); @@ -17,18 +19,14 @@ function Home(props: { navigation: any; }) { const { navigation } = props return ( - - navigation.navigate('ProfileTab')}> - - - BOB PARTY - navigation.navigate('Settings')}> - - - +