Modify folder structure
@@ -18,9 +18,9 @@
|
|||||||
"slug": "la-traque",
|
"slug": "la-traque",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"icon": "./assets/images/logo/logo_traque.png",
|
"icon": "./src/assets/images/logo/logo_traque.png",
|
||||||
"splash": {
|
"splash": {
|
||||||
"image": "./assets/images/logo/logo_traque.png",
|
"image": "./src/assets/images/logo/logo_traque.png",
|
||||||
"resizeMode": "contain",
|
"resizeMode": "contain",
|
||||||
"backgroundColor": "#ffffff"
|
"backgroundColor": "#ffffff"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Expo
|
// Expo
|
||||||
import { Slot } from 'expo-router';
|
import { Slot } from 'expo-router';
|
||||||
// Contexts
|
// Contexts
|
||||||
import { TeamConnexionProvider } from "../context/teamConnexionContext";
|
import { TeamConnexionProvider } from "../src/context/teamConnexionContext";
|
||||||
import { TeamProvider } from "../context/teamContext";
|
import { TeamProvider } from "../src/context/teamContext";
|
||||||
|
|
||||||
const Layout = () => {
|
const Layout = () => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -4,18 +4,18 @@ import { ScrollView, View, Text, StyleSheet, Image, Alert } from 'react-native';
|
|||||||
// Expo
|
// Expo
|
||||||
import { useRouter } from 'expo-router';
|
import { useRouter } from 'expo-router';
|
||||||
// Components
|
// Components
|
||||||
import { CustomButton } from '../components/button';
|
import { CustomButton } from '../src/components/button';
|
||||||
import { CustomImage } from '../components/image';
|
import { CustomImage } from '../src/components/image';
|
||||||
import { CustomTextInput } from '../components/input';
|
import { CustomTextInput } from '../src/components/input';
|
||||||
// Contexts
|
// Contexts
|
||||||
import { useTeamConnexion } from "../context/teamConnexionContext";
|
import { useTeamConnexion } from "../src/context/teamConnexionContext";
|
||||||
// Hooks
|
// Hooks
|
||||||
import { usePickImage } from '../hook/usePickImage';
|
import { usePickImage } from '../src/hook/usePickImage';
|
||||||
// Services
|
// Services
|
||||||
import { uploadTeamImage } from '../services/imageService';
|
import { uploadTeamImage } from '../src/services/imageService';
|
||||||
import { getLocationAuthorization, stopLocationTracking } from '../services/backgroundLocationTask';
|
import { getLocationAuthorization, stopLocationTracking } from '../src/services/backgroundLocationTask';
|
||||||
// Constants
|
// Constants
|
||||||
import { COLORS } from '../constants';
|
import { COLORS } from '../src/constants';
|
||||||
|
|
||||||
const Index = () => {
|
const Index = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -68,7 +68,7 @@ const Index = () => {
|
|||||||
<ScrollView contentContainerStyle={styles.container}>
|
<ScrollView contentContainerStyle={styles.container}>
|
||||||
<View style={styles.transitionContainer}>
|
<View style={styles.transitionContainer}>
|
||||||
<View style={styles.subContainer}>
|
<View style={styles.subContainer}>
|
||||||
<Image style={styles.logoImage} source={require('../assets/images/logo/logo_traque.png')}/>
|
<Image style={styles.logoImage} source={require('../src/assets/images/logo/logo_traque.png')}/>
|
||||||
<Text style={styles.logoText}>LA TRAQUE</Text>
|
<Text style={styles.logoText}>LA TRAQUE</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.subContainer}>
|
<View style={styles.subContainer}>
|
||||||
@@ -77,7 +77,7 @@ const Index = () => {
|
|||||||
<View style={styles.subContainer}>
|
<View style={styles.subContainer}>
|
||||||
<Text style={{fontSize: 15}}>Appuyer pour changer la photo d'équipe</Text>
|
<Text style={{fontSize: 15}}>Appuyer pour changer la photo d'équipe</Text>
|
||||||
<Text style={{fontSize: 13, marginBottom: 3}}>(Le haut du corps doit être visible)</Text>
|
<Text style={{fontSize: 13, marginBottom: 3}}>(Le haut du corps doit être visible)</Text>
|
||||||
<CustomImage source={image ? {uri: image.uri} : require('../assets/images/missing_image.jpg')} onPress={pickImage}/>
|
<CustomImage source={image ? {uri: image.uri} : require('../src/assets/images/missing_image.jpg')} onPress={pickImage}/>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.subContainer}>
|
<View style={styles.subContainer}>
|
||||||
<CustomButton label={isSubmitting ? "..." : "Valider"} onPress={handleSubmit}/>
|
<CustomButton label={isSubmitting ? "..." : "Valider"} onPress={handleSubmit}/>
|
||||||
|
|||||||
@@ -4,21 +4,21 @@ import { View, Text, Image, Alert, StyleSheet, TouchableOpacity } from 'react-na
|
|||||||
// Expo
|
// Expo
|
||||||
import { useRouter } from 'expo-router';
|
import { useRouter } from 'expo-router';
|
||||||
// Components
|
// Components
|
||||||
import { CustomMap } from '../components/map';
|
import { CustomMap } from '../src/components/map';
|
||||||
import { Drawer } from '../components/drawer';
|
import { Drawer } from '../src/components/drawer';
|
||||||
import { TimerMMSS } from '../components/timer';
|
import { TimerMMSS } from '../src/components/timer';
|
||||||
// Contexts
|
// Contexts
|
||||||
import { useTeamConnexion } from '../context/teamConnexionContext';
|
import { useTeamConnexion } from '../src/context/teamConnexionContext';
|
||||||
import { useTeamContext } from '../context/teamContext';
|
import { useTeamContext } from '../src/context/teamContext';
|
||||||
// Hooks
|
// Hooks
|
||||||
import { useGame } from '../hook/useGame';
|
import { useGame } from '../src/hook/useGame';
|
||||||
import { useTimeDifference } from '../hook/useTimeDifference';
|
import { useTimeDifference } from '../src/hook/useTimeDifference';
|
||||||
// Services
|
// Services
|
||||||
import { startLocationTracking } from '../services/backgroundLocationTask';
|
import { startLocationTracking } from '../src/services/backgroundLocationTask';
|
||||||
// Util
|
// Util
|
||||||
import { secondsToMMSS } from '../util/functions';
|
import { secondsToMMSS } from '../src/util/functions';
|
||||||
// Constants
|
// Constants
|
||||||
import { GAME_STATE, COLORS } from '../constants';
|
import { GAME_STATE, COLORS } from '../src/constants';
|
||||||
|
|
||||||
const Interface = () => {
|
const Interface = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -66,10 +66,10 @@ const Interface = () => {
|
|||||||
<View style={styles.topContainer}>
|
<View style={styles.topContainer}>
|
||||||
<View style={styles.topheadContainer}>
|
<View style={styles.topheadContainer}>
|
||||||
<TouchableOpacity style={{width: 40, height: 40}} onPress={logout}>
|
<TouchableOpacity style={{width: 40, height: 40}} onPress={logout}>
|
||||||
<Image source={require('../assets/images/logout.png')} style={{width: 40, height: 40}} resizeMode="contain"></Image>
|
<Image source={require('../src/assets/images/logout.png')} style={{width: 40, height: 40}} resizeMode="contain"></Image>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<TouchableOpacity style={{width: 40, height: 40}} onPress={() => Alert.alert("Settings")}>
|
<TouchableOpacity style={{width: 40, height: 40}} onPress={() => Alert.alert("Settings")}>
|
||||||
<Image source={require('../assets/images/cogwheel.png')} style={{width: 40, height: 40}} resizeMode="contain"></Image>
|
<Image source={require('../src/assets/images/cogwheel.png')} style={{width: 40, height: 40}} resizeMode="contain"></Image>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.teamNameContainer}>
|
<View style={styles.teamNameContainer}>
|
||||||
@@ -99,7 +99,7 @@ const Interface = () => {
|
|||||||
<CustomMap/>
|
<CustomMap/>
|
||||||
{ gameState == GAME_STATE.PLAYING && !captured && !hasHandicap &&
|
{ gameState == GAME_STATE.PLAYING && !captured && !hasHandicap &&
|
||||||
<TouchableOpacity style={styles.updatePosition} onPress={sendCurrentPosition}>
|
<TouchableOpacity style={styles.updatePosition} onPress={sendCurrentPosition}>
|
||||||
<Image source={require("../assets/images/update_position.png")} style={{width: 40, height: 40}} resizeMode="contain"></Image>
|
<Image source={require("../src/assets/images/update_position.png")} style={{width: 40, height: 40}} resizeMode="contain"></Image>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
}
|
}
|
||||||
{ gameState == GAME_STATE.PLAYING && !captured &&
|
{ gameState == GAME_STATE.PLAYING && !captured &&
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |