|
|
|
@ -23,6 +23,7 @@ import androidx.compose.material3.Button
|
|
|
|
|
import androidx.compose.material3.ButtonDefaults
|
|
|
|
|
import androidx.compose.material3.Icon
|
|
|
|
|
import androidx.compose.material3.IconButton
|
|
|
|
|
import androidx.compose.material3.MaterialTheme
|
|
|
|
|
import androidx.compose.material3.OutlinedTextField
|
|
|
|
|
import androidx.compose.material3.Text
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
@ -75,7 +76,7 @@ fun ProfilPage(index: Int,
|
|
|
|
|
Box(
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.fillMaxSize()
|
|
|
|
|
.background(Color(0xFF100C1B)),
|
|
|
|
|
.background(MaterialTheme.colorScheme.background),
|
|
|
|
|
contentAlignment = Alignment.Center
|
|
|
|
|
) {
|
|
|
|
|
Column(
|
|
|
|
@ -83,13 +84,13 @@ fun ProfilPage(index: Int,
|
|
|
|
|
.fillMaxWidth(0.9f)
|
|
|
|
|
.padding(20.dp)
|
|
|
|
|
.clip(RoundedCornerShape(16.dp))
|
|
|
|
|
.background(gradienBox)
|
|
|
|
|
.background(MaterialTheme.colorScheme.primary)
|
|
|
|
|
.padding(20.dp),
|
|
|
|
|
horizontalAlignment = Alignment.CenterHorizontally
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
// Titre
|
|
|
|
|
TitlePageComponent(R.string.titleProfile, Color.White)
|
|
|
|
|
TitlePageComponent(R.string.titleProfile, MaterialTheme.colorScheme.onPrimary)
|
|
|
|
|
SpaceHeightComponent(16)
|
|
|
|
|
|
|
|
|
|
// Image de profil
|
|
|
|
@ -108,9 +109,9 @@ fun ProfilPage(index: Int,
|
|
|
|
|
// Bouton
|
|
|
|
|
//ButtonProfile(R.string.ButtonAddQuoteprofile, 18, Color.Black, Color.White,navUnLog) // Pas encore de navigation definie
|
|
|
|
|
//SpaceHeightComponent(16)
|
|
|
|
|
ButtonLanguage(R.string.ButtonLanguageprofile, 18, Color.Black, Color.White,services, user)
|
|
|
|
|
ButtonLanguage(R.string.ButtonLanguageprofile, 18, MaterialTheme.colorScheme.onPrimary, MaterialTheme.colorScheme.background,services, user)
|
|
|
|
|
SpaceHeightComponent(16)
|
|
|
|
|
ButtonUnLog(R.string.ButtonUnlogprofile, 18, Color.Black, Color.White,navUnLog)
|
|
|
|
|
ButtonUnLog(R.string.ButtonUnlogprofile, 18, MaterialTheme.colorScheme.onPrimary, MaterialTheme.colorScheme.background,navUnLog)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -173,7 +174,7 @@ fun EmailEditingField(
|
|
|
|
|
value = email,
|
|
|
|
|
onValueChange = onEmailChange,
|
|
|
|
|
modifier = Modifier.fillMaxWidth(),
|
|
|
|
|
textStyle = TextStyle(color = Color.White, fontSize = 18.sp),
|
|
|
|
|
textStyle = TextStyle(color = MaterialTheme.colorScheme.primary, fontSize = 18.sp),
|
|
|
|
|
singleLine = true,
|
|
|
|
|
keyboardOptions = KeyboardOptions.Default.copy(
|
|
|
|
|
keyboardType = KeyboardType.Email,
|
|
|
|
@ -206,12 +207,12 @@ fun DisplayEmail(email: String, onEdit: () -> Unit) {
|
|
|
|
|
text = email,
|
|
|
|
|
fontSize = 18.sp,
|
|
|
|
|
fontWeight = FontWeight.Bold,
|
|
|
|
|
color = Color.White
|
|
|
|
|
color = MaterialTheme.colorScheme.onPrimary
|
|
|
|
|
)
|
|
|
|
|
Icon(
|
|
|
|
|
imageVector = Icons.Default.Edit,
|
|
|
|
|
contentDescription = "Modifier",
|
|
|
|
|
tint = Color.White,
|
|
|
|
|
tint = MaterialTheme.colorScheme.onPrimary,
|
|
|
|
|
modifier = Modifier.size(16.dp).padding(start = 8.dp)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -249,7 +250,7 @@ fun UsernameEditingField(
|
|
|
|
|
value = username,
|
|
|
|
|
onValueChange = onUsernameChange,
|
|
|
|
|
modifier = Modifier.fillMaxWidth(),
|
|
|
|
|
textStyle = TextStyle(color = Color.White, fontSize = 18.sp),
|
|
|
|
|
textStyle = TextStyle(color = MaterialTheme.colorScheme.onPrimary, fontSize = 18.sp),
|
|
|
|
|
singleLine = true,
|
|
|
|
|
keyboardOptions = KeyboardOptions.Default.copy(
|
|
|
|
|
imeAction = ImeAction.Done
|
|
|
|
@ -275,12 +276,12 @@ fun DisplayUsername(username: String, onEdit: () -> Unit) {
|
|
|
|
|
text = username,
|
|
|
|
|
fontSize = 18.sp,
|
|
|
|
|
fontWeight = FontWeight.Bold,
|
|
|
|
|
color = Color.White
|
|
|
|
|
color = MaterialTheme.colorScheme.onPrimary
|
|
|
|
|
)
|
|
|
|
|
Icon(
|
|
|
|
|
imageVector = Icons.Default.Edit,
|
|
|
|
|
contentDescription = "Modifier",
|
|
|
|
|
tint = Color.White,
|
|
|
|
|
tint = MaterialTheme.colorScheme.onPrimary,
|
|
|
|
|
modifier = Modifier.size(16.dp).padding(start = 8.dp)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -386,7 +387,7 @@ fun PasswordTextField(
|
|
|
|
|
onValueChange = onValueChange,
|
|
|
|
|
label = { Text(label) },
|
|
|
|
|
modifier = Modifier.fillMaxWidth(),
|
|
|
|
|
textStyle = TextStyle(color = Color.White, fontSize = 18.sp),
|
|
|
|
|
textStyle = TextStyle(color = MaterialTheme.colorScheme.onPrimary, fontSize = 18.sp),
|
|
|
|
|
singleLine = true,
|
|
|
|
|
keyboardOptions = KeyboardOptions.Default.copy(
|
|
|
|
|
keyboardType = KeyboardType.Password,
|
|
|
|
@ -409,13 +410,13 @@ fun PasswordTextField(
|
|
|
|
|
fun SaveButton(onClick: () -> Unit) {
|
|
|
|
|
Button(
|
|
|
|
|
onClick = onClick,
|
|
|
|
|
colors = ButtonDefaults.buttonColors(containerColor = Color.White),
|
|
|
|
|
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.onPrimary),
|
|
|
|
|
modifier = Modifier.fillMaxWidth()
|
|
|
|
|
) {
|
|
|
|
|
val text = stringResource(id = R.string.ButtonSaveprofile)
|
|
|
|
|
Text(text,
|
|
|
|
|
fontSize = 18.sp,
|
|
|
|
|
color = Color.Black)
|
|
|
|
|
color = MaterialTheme.colorScheme.primary)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -429,12 +430,12 @@ fun DisplayPassword(onEdit: () -> Unit) {
|
|
|
|
|
text = "*****",
|
|
|
|
|
fontSize = 18.sp,
|
|
|
|
|
fontWeight = FontWeight.Bold,
|
|
|
|
|
color = Color.White
|
|
|
|
|
color = MaterialTheme.colorScheme.onPrimary
|
|
|
|
|
)
|
|
|
|
|
Icon(
|
|
|
|
|
imageVector = Icons.Default.Edit,
|
|
|
|
|
contentDescription = "Modifier",
|
|
|
|
|
tint = Color.White,
|
|
|
|
|
tint = MaterialTheme.colorScheme.onPrimary,
|
|
|
|
|
modifier = Modifier.size(16.dp).padding(start = 8.dp)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -450,10 +451,10 @@ fun ButtonUnLog(textResId : Int, size :Int, colorTexte : Color, colorButton : Co
|
|
|
|
|
navController()
|
|
|
|
|
logsUser.unlogInformationUserConnect("UserUnLog")
|
|
|
|
|
},
|
|
|
|
|
colors = ButtonDefaults.buttonColors(containerColor = colorButton),
|
|
|
|
|
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.background),
|
|
|
|
|
modifier = Modifier.fillMaxWidth(),
|
|
|
|
|
) {
|
|
|
|
|
Text(text, fontSize = size.sp, color = colorTexte)
|
|
|
|
|
Text(text, fontSize = size.sp, color = MaterialTheme.colorScheme.primary)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -469,6 +470,6 @@ fun ButtonLanguage(textResId : Int, size :Int, colorTexte : Color, colorButton :
|
|
|
|
|
colors = ButtonDefaults.buttonColors(containerColor = colorButton),
|
|
|
|
|
modifier = Modifier.fillMaxWidth(),
|
|
|
|
|
) {
|
|
|
|
|
Text("${text} (${currentLangage.value})", fontSize = size.sp, color = colorTexte)
|
|
|
|
|
Text("${text} (${currentLangage.value})", fontSize = size.sp, color = MaterialTheme.colorScheme.primary)
|
|
|
|
|
}
|
|
|
|
|
}
|