diff --git a/mobile/traque-app/app/(auth)/_layout.jsx b/mobile/traque-app/app/(auth)/_layout.jsx
index 96ccf70..9204836 100644
--- a/mobile/traque-app/app/(auth)/_layout.jsx
+++ b/mobile/traque-app/app/(auth)/_layout.jsx
@@ -1,8 +1,42 @@
+// React
+import { View, StyleSheet } from 'react-native';
+import { useTranslation } from 'react-i18next';
// Expo
import { Slot } from 'expo-router';
+// Components
+import { IconButton } from '@/components/common/IconButton';
const AuthLayout = () => {
- return ;
+ const { i18n } = useTranslation();
+
+ const toggleLanguage = () => {
+ i18n.changeLanguage(i18n.language === 'fr' ? 'en' : 'fr');
+ };
+
+ return (
+
+
+
+
+ );
};
export default AuthLayout;
+
+const styles = StyleSheet.create({
+ globalContainer: {
+ flex: 1
+ },
+ languageButton: {
+ position: 'absolute',
+ top: 0,
+ right: 0,
+ width: 60,
+ height: 60,
+ backgroundColor: "rgb(126, 182, 199)",
+ borderBottomLeftRadius: 20,
+ padding: 5,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }
+});
diff --git a/mobile/traque-app/app/(auth)/login.jsx b/mobile/traque-app/app/(auth)/login.jsx
index 2ef8ce6..b402040 100644
--- a/mobile/traque-app/app/(auth)/login.jsx
+++ b/mobile/traque-app/app/(auth)/login.jsx
@@ -11,8 +11,6 @@ import { useAuth } from "@/contexts/authContext";
import { usePickImage } from '@/hooks/usePickImage';
// Services
import { uploadTeamImage } from '@/services/api/image';
-// Constants
-import { COLORS } from '@/constants';
const Login = () => {
const { t } = useTranslation();
@@ -53,28 +51,20 @@ const Login = () => {
};
return (
-
-
-
-
- {t("login.header.title")}
-
-
-
-
-
- {t("login.form.image_label")}
- {t("login.form.image_sublabel")}
-
-
-
-
-
- {isSubmitting ? "..." : t("login.form.validate_button")}
-
-
-
+
+
+
+ {t("login.header.title")}
+
+
+ {t("login.form.image_label")}
+ {t("login.form.image_sublabel")}
+
+
+
+ {isSubmitting ? "..." : t("login.form.validate_button")}
+
);
};
@@ -82,55 +72,53 @@ const Login = () => {
export default Login;
const styles = StyleSheet.create({
- container: {
- flexGrow: 1,
- alignItems: 'center',
- paddingVertical: 20,
- backgroundColor: COLORS.background
+ outerScrollContainer: {
+ flex: 1,
},
- transitionContainer: {
+ innerScrollContainer: {
flexGrow: 1,
- width: '80%',
- maxWidth: 600,
+ justifyContent: 'space-between',
alignItems: 'center',
+ paddingVertical: 40,
+ paddingHorizontal: 20,
+ gap: 20,
},
- subContainer: {
- flexGrow: 1,
- width: "100%",
+ logoContainer: {
+ justifyContent: "center",
alignItems: 'center',
- justifyContent: 'center',
- margin: 10,
+ gap: 10,
},
logoImage: {
width: 130,
height: 130,
- margin: 10,
},
logoText: {
fontSize: 50,
fontWeight: 'bold',
},
- buttonContainer: {
- width: "100%",
- maxWidth: 240,
- height: 80,
+ input: {
+ width: "80%",
+ },
+ imageContainer: {
+ justifyContent: "center",
alignItems: 'center',
- justifyContent: 'center',
- padding: 3,
- borderWidth: 4,
- borderColor: '#888',
- borderRadius: 18
+ },
+ imageLabel: {
+ fontSize: 15
+ },
+ imageSubLabel:{
+ fontSize: 13
},
button: {
borderRadius: 10,
- width: '100%',
- height: '100%',
+ width: 200,
+ height: 70,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#555'
},
buttonLabel: {
color: '#fff',
- fontSize: 16,
+ fontSize: 20,
},
});
diff --git a/mobile/traque-app/app/(game)/_layout.jsx b/mobile/traque-app/app/(game)/_layout.jsx
index 6314d03..45a7d1e 100644
--- a/mobile/traque-app/app/(game)/_layout.jsx
+++ b/mobile/traque-app/app/(game)/_layout.jsx
@@ -1,8 +1,76 @@
+// React
+import { View, Text, StyleSheet } from 'react-native';
+import { useTranslation } from 'react-i18next';
// Expo
import { Slot } from 'expo-router';
+// Contexts
+import { useAuth } from '@/contexts/authContext';
+import { useTeam } from '@/contexts/teamContext';
+// Components
+import { IconButton } from '@/components/common/IconButton';
+// Constants
+import { COLORS } from '@/constants';
const GameLayout = () => {
- return ;
+ const { t, i18n } = useTranslation();
+ const { logout } = useAuth();
+ const { teamInfos } = useTeam();
+ const { name } = teamInfos;
+
+ const toggleLanguage = () => {
+ i18n.changeLanguage(i18n.language === 'fr' ? 'en' : 'fr');
+ };
+
+ const formatText = (text, limit) => {
+ if (text == null) return t("common.no_value");
+
+ if (text.length > limit) {
+ return text.substring(0, limit) + "...";
+ } else {
+ return text;
+ }
+ };
+
+ formatText("les minions du bds qui gagne");
+
+ return (
+
+
+
+ {formatText(name, 22)}
+
+
+
+
+ );
};
export default GameLayout;
+
+const styles = StyleSheet.create({
+ globalContainer: {
+ flex: 1
+ },
+ headerContainer: {
+ backgroundColor: COLORS.background,
+ flexDirection: "row",
+ alignItems: "center",
+ padding: 10,
+ gap: 10,
+ elevation: 10,
+ },
+ name: {
+ fontSize: 30,
+ fontWeight: "bold",
+ textAlign: "center",
+ flex: 1
+ },
+ logoutIcon: {
+ width: 50,
+ height: 50
+ },
+ traductionIcon: {
+ width: 60,
+ height: 60
+ }
+});
diff --git a/mobile/traque-app/app/(game)/end.jsx b/mobile/traque-app/app/(game)/end.jsx
index a48d891..1e892ad 100644
--- a/mobile/traque-app/app/(game)/end.jsx
+++ b/mobile/traque-app/app/(game)/end.jsx
@@ -1,31 +1,117 @@
// React
-import { View, Text, StyleSheet } from 'react-native';
+import { Text, StyleSheet, ScrollView } from 'react-native';
+import { useTranslation } from 'react-i18next';
// Components
-import { Header } from '@/components/game/Header';
+import { TeamStats } from '@/components/game/TeamStats';
+import { Show } from '@/components/common/Show';
+// Hook
+import { useUserState } from '@/hooks/useUserState';
// Constants
-import { COLORS } from '@/constants';
+import { USER_STATE } from '@/constants';
+
+/*
+const Leaderboard = ({ teams }) => {
+ return (
+
+ {teams.map((item, index) => {
+ const isSelected = index+1 == 5;
+ return (
+
+ {index + 1}
+
+ {item}
+
+
+ );
+ })}
+
+ );
+};
+
+
+ Classement
+
+
+
+ Parcours
+
+
+
+
+
+
+
+ mapView: {
+ height: 300,
+ borderRadius: 20,
+ overflow: "hidden"
+ },
+ map: {
+ flex: 1
+ },
+
+ // Classement
+ leaderboardContainer: {
+ gap: 8,
+ },
+ item: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ paddingVertical: 10,
+ paddingHorizontal: 20,
+ backgroundColor: '#f9f9f9',
+ borderRadius: 8,
+ borderWidth: 2,
+ gap: 20
+ },
+ selectedTeam: {
+ backgroundColor: 'rgb(126, 182, 199)',
+ },
+ rank: {
+ fontSize: 18,
+ fontWeight: 'bold',
+ color: '#000000',
+ },
+ teamName: {
+ fontSize: 16,
+ color: '#000000',
+ },
+*/
const End = () => {
+ const { t } = useTranslation();
+ const userState = useUserState();
+
return (
-
-
-
- Fin de la partie !
-
-
+
+
+ {t("end.title_captured")}
+
+
+ {t("end.title_win")}
+
+ {t("end.paragraph")}
+
+
);
};
export default End;
const styles = StyleSheet.create({
- globalContainer: {
- backgroundColor: COLORS.background,
- flex: 1,
+ outerScrollview: {
+ flex: 1
},
- topContainer: {
- width: '100%',
- alignItems: 'center',
- padding: 15,
+ innerScrollview: {
+ padding: 20,
+ gap: 20,
+ },
+ title: {
+ fontSize: 24,
+ fontWeight: "bold",
+ textAlign: "center"
+ },
+ subtitle: {
+ fontSize: 15,
}
});
diff --git a/mobile/traque-app/app/(game)/play.jsx b/mobile/traque-app/app/(game)/play.jsx
index 086d6ae..d66e79e 100644
--- a/mobile/traque-app/app/(game)/play.jsx
+++ b/mobile/traque-app/app/(game)/play.jsx
@@ -1,6 +1,6 @@
// React
import { useState } from 'react';
-import { View, Alert, StyleSheet } from 'react-native';
+import { Text, View, Alert, StyleSheet } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { useTranslation } from 'react-i18next';
// Components
@@ -9,7 +9,6 @@ import { TimerMMSS } from '@/components/common/Timer';
import { Show } from '@/components/common/Show';
import { PositionMarker } from '@/components/common/Layers';
import { IconButton } from '@/components/common/IconButton';
-import { Header } from '@/components/game/Header';
import { TargetInfoDrawer } from '@/components/game/TargetInfoDrawer';
import { Toasts } from '@/components/game/Toasts';
import { GameZone, StartZone } from '@/components/game/MapLayers';
@@ -20,7 +19,7 @@ import { useUserState } from '@/hooks/useUserState';
// Services
import { emitSendPosition } from '@/services/socket/emitters';
// Constants
-import { COLORS, USER_STATE } from '@/constants';
+import { USER_STATE } from '@/constants';
const Play = () => {
const { t } = useTranslation();
@@ -31,16 +30,16 @@ const Play = () => {
return (
-
-
-
-
-
-
-
-
-
- setBottomContainerHeight(event.nativeEvent.layout.height)}>
+
+ {t("play.info.placement_title")}
+
+
+
+
+
+
+
+ setBottomContainerHeight(event.nativeEvent.layout.height)}>