Page End + UI adjustments + cleaning

This commit is contained in:
Sebastien Riviere
2026-02-21 21:45:27 +01:00
parent 28e81894ce
commit 405b2934c8
18 changed files with 395 additions and 272 deletions

View File

@@ -1,75 +1,60 @@
// React
import { View, Text, StyleSheet, Image } from 'react-native';
import { ScrollView, View, Text, StyleSheet, Image } from 'react-native';
import { useTranslation } from 'react-i18next';
// Components
import { Header } from '@/components/game/Header';
// Constants
import { COLORS } from '@/constants';
const Section = ({ source, text }) => {
return (
<View style={styles.section}>
<Image style={styles.image} source={source} />
<Text style={styles.description}>{text}</Text>
</View>
);
};
const Wait = () => {
const { t } = useTranslation();
return (
<View style={styles.globalContainer}>
<Header/>
<View style={styles.rulesContainer}>
<Text style={styles.title}>{t("wait.title")}</Text>
<View style={styles.section}>
<Image style={styles.image} source={require("@/assets/images/flag.png")} />
<Text style={styles.description}>{t("wait.placement_rule")}</Text>
</View>
<View style={styles.section}>
<Text style={styles.description}>{t("wait.capture_rule")}</Text>
<Image style={styles.image} source={require("@/assets/images/target/black.png")} />
</View>
<View style={styles.section}>
<Image style={styles.image} source={require("@/assets/images/running.png")} />
<Text style={styles.description}>{t("wait.zone_rule")}</Text>
</View>
<View style={styles.section}>
<Text style={styles.description}>{t("wait.team_rule")}</Text>
<Image style={styles.image} source={require("@/assets/images/team.png")} />
</View>
</View>
</View>
<ScrollView style={styles.outerScrollview} contentContainerStyle={styles.innerScrollview} showsVerticalScrollIndicator={false}>
<Text style={styles.title}>{t("wait.title")}</Text>
<Section source={require("@/assets/images/flag.png")} text={t("wait.placement_rule")} />
<Section source={require("@/assets/images/target/black.png")} text={t("wait.capture_rule")} />
<Section source={require("@/assets/images/running.png")} text={t("wait.zone_rule")} />
<Section source={require("@/assets/images/team.png")} text={t("wait.team_rule")} />
</ScrollView>
);
};
export default Wait;
const styles = StyleSheet.create({
globalContainer: {
backgroundColor: COLORS.background,
flex: 1,
padding: 20,
outerScrollview: {
flex: 1
},
rulesContainer: {
flex: 1,
innerScrollview: {
flexGrow: 1,
justifyContent: "space-between",
alignItems: 'center',
padding: 30,
gap: 30
},
title: {
backgroundColor: "white",
textAlign: 'center',
fontSize: 30,
fontWeight: "bold",
borderWidth: 2,
borderRadius: 10,
padding: 10,
fontSize: 18,
fontWeight: "bold"
},
section: {
width: '100%',
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
gap: 20,
gap: 30,
},
image: {
width: 100,
height: 100,
width: 70,
height: 70,
},
description: {
flex: 1,
fontSize: 15,
}
});