|
|
|
@ -70,7 +70,9 @@ fun LoginPage(navControllerSignUp: () -> Unit, navControllerProfil: (Int) -> Uni
|
|
|
|
|
SpaceHeightComponent(20)
|
|
|
|
|
ConnexionButtonLogin(users,IdentifiantTextField(R.string.IdentifiantLogin, authState.username){
|
|
|
|
|
authUserVM.setUsername(it)
|
|
|
|
|
}, PassWdTextField(R.string.PasswdLogin), R.string.ButtonLogin,18,navControllerProfil)
|
|
|
|
|
}, PassWdTextField(R.string.PasswdLogin, authState.password){
|
|
|
|
|
authUserVM.setPassword(it)
|
|
|
|
|
}, R.string.ButtonLogin,18,navControllerProfil)
|
|
|
|
|
SpaceHeightComponent(16)
|
|
|
|
|
CreateAccountButton(R.string.ButtonCreateLogin,12, MaterialTheme.colorScheme.primary, navControllerSignUp)
|
|
|
|
|
}
|
|
|
|
@ -83,7 +85,6 @@ fun LoginPage(navControllerSignUp: () -> Unit, navControllerProfil: (Int) -> Uni
|
|
|
|
|
@Composable
|
|
|
|
|
fun IdentifiantTextField(textIdentifiantResId : Int, username : String, onValueChange: (String) -> Unit ) : String{
|
|
|
|
|
val textIdentifiant = stringResource(id = textIdentifiantResId)
|
|
|
|
|
//var identifiant by remember { mutableStateOf("") }
|
|
|
|
|
|
|
|
|
|
Column(modifier = Modifier.padding(top = 16.dp)) {
|
|
|
|
|
OutlinedTextField(
|
|
|
|
@ -101,14 +102,14 @@ fun IdentifiantTextField(textIdentifiantResId : Int, username : String, onValueC
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun PassWdTextField(textpasswdResId : Int) : String{
|
|
|
|
|
fun PassWdTextField(textpasswdResId : Int, password : String, onValueChange: (String) -> Unit) : String{
|
|
|
|
|
val textpasswd = stringResource(id = textpasswdResId)
|
|
|
|
|
var passwd by remember { mutableStateOf("") }
|
|
|
|
|
var passwordVisible by remember { mutableStateOf(false) }
|
|
|
|
|
|
|
|
|
|
Column(modifier = Modifier.padding(top = 10.dp, bottom = 30.dp)) {
|
|
|
|
|
OutlinedTextField(
|
|
|
|
|
value = passwd,
|
|
|
|
|
onValueChange = { passwd = it },
|
|
|
|
|
value = password,
|
|
|
|
|
onValueChange = onValueChange,
|
|
|
|
|
label = { Text(textpasswd) },
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.fillMaxWidth()
|
|
|
|
@ -122,7 +123,7 @@ fun PassWdTextField(textpasswdResId : Int) : String{
|
|
|
|
|
shape = RoundedCornerShape(16.dp)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
return passwd;
|
|
|
|
|
return password;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|