|
|
|
@ -31,6 +31,7 @@ import androidx.compose.ui.draw.clip
|
|
|
|
|
import androidx.compose.ui.geometry.Offset
|
|
|
|
|
import androidx.compose.ui.graphics.Brush
|
|
|
|
|
import androidx.compose.ui.graphics.Color
|
|
|
|
|
import androidx.compose.ui.res.stringResource
|
|
|
|
|
import androidx.compose.ui.text.font.FontWeight
|
|
|
|
|
import androidx.compose.ui.text.input.KeyboardType
|
|
|
|
|
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
|
|
|
@ -38,6 +39,7 @@ import androidx.compose.ui.text.input.VisualTransformation
|
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
|
|
import androidx.compose.ui.unit.sp
|
|
|
|
|
import androidx.navigation.NavController
|
|
|
|
|
import com.example.what_the_fantasy.R
|
|
|
|
|
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
@ -64,15 +66,15 @@ fun SignUpPage(navController: NavController) {
|
|
|
|
|
horizontalAlignment = Alignment.CenterHorizontally
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
TitleSign("Inscription", 20,Color.White)
|
|
|
|
|
IdentifiantTextFieldSign("Identifiant*")
|
|
|
|
|
TitlePage(R.string.titleSignUp, 20,Color.White)
|
|
|
|
|
IdentifiantTextFieldSign(R.string.IdentifiantLogin)
|
|
|
|
|
EmailTextFieldSign("Email*")
|
|
|
|
|
PassWdTextFieldSign("Mot de passe*")
|
|
|
|
|
PassWdConfirmTextFieldSign("Confirmer mot de passe*")
|
|
|
|
|
PassWdTextFieldSign(R.string.PasswdLogin)
|
|
|
|
|
PassWdConfirmTextFieldSign(R.string.ConfirmPassWdSignUp)
|
|
|
|
|
SpaceSign(16)
|
|
|
|
|
ConnexionButtonSign("S'incrire",18, Color.White, Color.Black)
|
|
|
|
|
ConnexionButtonSign(R.string.ButtonSignUp,18, Color.White, Color.Black)
|
|
|
|
|
SpaceSign(16)
|
|
|
|
|
CreateAccountButtonSign("Se connecter",12, Color.White, navController = navController)
|
|
|
|
|
CreateAccountButtonSign(R.string.ButtonLogin,12, Color.White, navController = navController)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -87,8 +89,10 @@ fun SpaceSign(height : Int){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun IdentifiantTextFieldSign(textIdentifiant : String){
|
|
|
|
|
fun IdentifiantTextFieldSign(textIdentifiantResId : Int){
|
|
|
|
|
val textIdentifiant = stringResource(id = textIdentifiantResId)
|
|
|
|
|
var identifiant by remember { mutableStateOf("") } // Stocke la valeur du champ
|
|
|
|
|
|
|
|
|
|
Column(modifier = Modifier.padding(top = 16.dp)) {
|
|
|
|
|
OutlinedTextField(
|
|
|
|
|
value = identifiant,
|
|
|
|
@ -121,7 +125,8 @@ fun EmailTextFieldSign(textIdentifiant : String){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun PassWdTextFieldSign(textpasswd : String){
|
|
|
|
|
fun PassWdTextFieldSign(textpasswdResId : Int){
|
|
|
|
|
val textpasswd = stringResource(id = textpasswdResId)
|
|
|
|
|
var passwd by remember { mutableStateOf("") } // Stocke la valeur du champ
|
|
|
|
|
var passwordVisible by remember { mutableStateOf(false) } // État pour afficher/masquer
|
|
|
|
|
Column(modifier = Modifier.padding(top = 10.dp)) {
|
|
|
|
@ -144,7 +149,8 @@ fun PassWdTextFieldSign(textpasswd : String){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun PassWdConfirmTextFieldSign(textpasswd : String){
|
|
|
|
|
fun PassWdConfirmTextFieldSign(textpasswdResId : Int){
|
|
|
|
|
val textpasswd = stringResource(id = textpasswdResId)
|
|
|
|
|
var passwd by remember { mutableStateOf("") } // Stocke la valeur du champ
|
|
|
|
|
var passwordVisible by remember { mutableStateOf(false) } // État pour afficher/masquer
|
|
|
|
|
Column(modifier = Modifier.padding(top = 10.dp)) {
|
|
|
|
@ -166,18 +172,19 @@ fun PassWdConfirmTextFieldSign(textpasswd : String){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun TitleSign(title : String, size : Int, color : Color){
|
|
|
|
|
Text(
|
|
|
|
|
text = title,
|
|
|
|
|
fontSize = size.sp,
|
|
|
|
|
fontWeight = FontWeight.Bold,
|
|
|
|
|
color = color
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
//@Composable
|
|
|
|
|
//fun TitleSign(title : String, size : Int, color : Color){
|
|
|
|
|
// Text(
|
|
|
|
|
// text = title,
|
|
|
|
|
// fontSize = size.sp,
|
|
|
|
|
// fontWeight = FontWeight.Bold,
|
|
|
|
|
// color = color
|
|
|
|
|
// )
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun ConnexionButtonSign(title : String, size : Int, colorButton : Color, colorText : Color){
|
|
|
|
|
fun ConnexionButtonSign(titleResId : Int, size : Int, colorButton : Color, colorText : Color){
|
|
|
|
|
val title = stringResource(id = titleResId)
|
|
|
|
|
Button(
|
|
|
|
|
onClick = { /* Action */ },
|
|
|
|
|
colors = ButtonDefaults.buttonColors(containerColor = colorButton),
|
|
|
|
@ -189,7 +196,8 @@ fun ConnexionButtonSign(title : String, size : Int, colorButton : Color, colorTe
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun CreateAccountButtonSign(title: String, size: Int, color: Color, navController: NavController) {
|
|
|
|
|
fun CreateAccountButtonSign(titleResId: Int, size: Int, color: Color, navController: NavController) {
|
|
|
|
|
val title = stringResource(id = titleResId)
|
|
|
|
|
Text(
|
|
|
|
|
text = title,
|
|
|
|
|
fontSize = size.sp,
|
|
|
|
|