tomivt 1 month ago
commit ac22e95b00

@ -4,13 +4,25 @@ import android.util.Log
import com.example.what_the_fantasy.data.model.User import com.example.what_the_fantasy.data.model.User
class LogsUsers{ class LogsUsers{
fun logDebugDisplayUsers(users : List<User>, titleLog : String){ fun logDebugAllUsers(users : List<User>, titleLog : String){
for(user in users){ for(user in users){
Log.e(titleLog, "User created: ${user.username} => ${user.email} => ${user.imgUrl} => ${user.language}") Log.e(titleLog, "User created: ${user.username} => ${user.email} => ${user.imgUrl} => ${user.langage}")
} }
} }
fun logDebugDisplayUser(user : User, titleLog : String){ fun logDebugUserEmail(user : User?, titleLog : String){
Log.e(titleLog, "User created: ${user.username} => ${user.email}") Log.e(titleLog, "User created: ${user?.username} => ${user?.email}")
}
fun logDebugUserLangage(user : User?, titleLog : String){
Log.e(titleLog, "User Change: ${user?.username} => ${user?.langage}")
}
fun logInformationUserConnect(user : User?, titleLog : String){
Log.e(titleLog, "${user?.username} logged in")
}
fun unlogInformationUserConnect(titleLog : String){
Log.e(titleLog, "Logged out")
} }
} }

@ -125,7 +125,7 @@ object QuoteStub {
source = "Spider-Man", source = "Spider-Man",
imgUrl = CharacterStub.aragorn.imgUrl, imgUrl = CharacterStub.aragorn.imgUrl,
date = 2000, date = 2000,
type = SrcType.Movie, type = SrcType.Series,
) )
val quote12 = Quote( val quote12 = Quote(
id = 12, id = 12,
@ -208,7 +208,7 @@ object QuoteStub {
id = 19, id = 19,
content = "Le bonheur n'est pas quelque chose de tout fait. Il vient de vos propres actions.", content = "Le bonheur n'est pas quelque chose de tout fait. Il vient de vos propres actions.",
likes = 500, likes = 500,
language = SrcLanguage.fr, language = SrcLanguage.vo,
character = CharacterStub.saruman.name, character = CharacterStub.saruman.name,
source = "Dalaï Lama", source = "Dalaï Lama",
imgUrl = CharacterStub.saruman.imgUrl, imgUrl = CharacterStub.saruman.imgUrl,

@ -16,8 +16,6 @@ object UserStub {
User(8, "Eowyn777", "eowyn@example.com", "2022-04-11", "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.vo),//1234 User(8, "Eowyn777", "eowyn@example.com", "2022-04-11", "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.vo),//1234
User(9, "Saruman888", "saruman@example.com", "2021-08-15", "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.vo),//1234 User(9, "Saruman888", "saruman@example.com", "2021-08-15", "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.vo),//1234
User(10, "Faramir222", "faramir@example.com", "2023-02-08", "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.vo),//1234 User(10, "Faramir222", "faramir@example.com", "2023-02-08", "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.vo),//1234
User(11, "dev", "testeur@example.com", "2023-02-08", "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.fr)//1234 User(11, "dev", "testeur@example.com", "2023-02-08", "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg", "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", SrcLanguage.vo)//1234
) )
} }

@ -7,5 +7,5 @@ class User(
var date:String, var date:String,
val imgUrl: String, val imgUrl: String,
var password: String, var password: String,
val language : SrcLanguage var langage : SrcLanguage
) )

@ -4,10 +4,11 @@ import com.example.what_the_fantasy.data.model.Quote
import com.example.what_the_fantasy.data.model.User import com.example.what_the_fantasy.data.model.User
interface IServices { interface IServices {
fun EditUsername(username : String, index : Int) fun EditUsername(username : String, index : Int) : Boolean
fun EditEmail(email : String, index : Int) fun EditEmail(email : String, index : Int) : Boolean
fun EditPasswd(passwd : String, index : Int) fun EditPasswd(passwd : String, index : Int)
fun EditImage(imageURL : String, index : Int) fun EditImage(imageURL : String, index : Int)
fun ChangeLangage(user: User)
fun CreateUser(username : String, email : String, passwd : String, services : IServices) : Boolean fun CreateUser(username : String, email : String, passwd : String, services : IServices) : Boolean
fun getFavorite(username: String) fun getFavorite(username: String)

@ -4,11 +4,11 @@ import com.example.what_the_fantasy.data.model.Quote
import com.example.what_the_fantasy.data.model.User import com.example.what_the_fantasy.data.model.User
class ServicesAPI : IServices { class ServicesAPI : IServices {
override fun EditUsername(username: String, index : Int) { override fun EditUsername(username: String, index : Int) : Boolean {
TODO("Not yet implemented") TODO("Not yet implemented")
} }
override fun EditEmail(email: String, index : Int) { override fun EditEmail(email: String, index : Int) : Boolean {
TODO("Not yet implemented") TODO("Not yet implemented")
} }
@ -20,6 +20,10 @@ class ServicesAPI : IServices {
TODO("Not yet implemented") TODO("Not yet implemented")
} }
override fun ChangeLangage(user: User) {
TODO("Not yet implemented")
}
override fun CreateUser(username: String, email: String, passwd: String, services: IServices) : Boolean { override fun CreateUser(username: String, email: String, passwd: String, services: IServices) : Boolean {
TODO("Not yet implemented") TODO("Not yet implemented")
} }

@ -1,7 +1,6 @@
package com.example.what_the_fantasy.data.services package com.example.what_the_fantasy.data.services
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.util.Log
import com.example.what_the_fantasy.data.local.UserStub.users import com.example.what_the_fantasy.data.local.UserStub.users
import com.example.what_the_fantasy.data.model.User import com.example.what_the_fantasy.data.model.User
import com.example.what_the_fantasy.Logs.LogsUsers import com.example.what_the_fantasy.Logs.LogsUsers
@ -14,20 +13,29 @@ import java.time.LocalDate
class ServicesStub : IServices { class ServicesStub : IServices {
val logsUser = LogsUsers() //gestion des logs pour les utilisateurs val logsUser = LogsUsers() //gestion des logs pour les utilisateurs
override fun EditUsername(username: String, index : Int) { override fun EditUsername(username: String, index : Int) : Boolean{
val user = getUserById(index) val user = getUserById(index)
user?.username = username
if(!isUsernameExist(username)){
user?.username = username
return true
}
//Afficher tous les users //Afficher tous les users
logsUser.logDebugDisplayUsers(getAllUsers(), "UsernameUpdate") logsUser.logDebugUserEmail(user, "UsernameUpdate")
return false
} }
override fun EditEmail(email: String,index : Int) { override fun EditEmail(email: String,index : Int) : Boolean {
val user = getUserById(index) val user = getUserById(index)
user?.email = email
if(!isEmailExist(email)){
user?.email = email
return true
}
//Afficher tous les users //Afficher tous les users
logsUser.logDebugDisplayUsers(getAllUsers(), "EmailUpdate") logsUser.logDebugAllUsers(getAllUsers(), "EmailUpdate")
return false
} }
override fun EditPasswd(passwd: String,index : Int) { override fun EditPasswd(passwd: String,index : Int) {
@ -36,30 +44,39 @@ class ServicesStub : IServices {
user?.password = passwordhash user?.password = passwordhash
//Afficher tous les users en log //Afficher tous les users en log
logsUser.logDebugDisplayUsers(getAllUsers(), "PasswordUpdate") logsUser.logDebugAllUsers(getAllUsers(), "PasswordUpdate")
} }
override fun EditImage(imageURL: String,index : Int) { override fun EditImage(imageURL: String,index : Int) {
TODO("Not yet implemented") TODO("Not yet implemented")
} }
override fun ChangeLangage(user: User) {
if(user.langage == SrcLanguage.vo){
user.langage = SrcLanguage.fr
}
else{
user.langage = SrcLanguage.vo
}
logsUser.logDebugUserLangage(user, "ChangeLangue")
}
override fun CreateUser(username: String, email: String, passwd: String, services : IServices) : Boolean { override fun CreateUser(username: String, email: String, passwd: String, services : IServices) : Boolean {
val date =dateDuJour() val date =dateDuJour()
val passwordhash = hashPassword(passwd) val passwordhash = hashPassword(passwd)
val userStub = services.getAllUsers() val userStub = services.getAllUsers()
val nbUser = userStub.size val nbUser = userStub.size
for (user in userStub) {
if (user.username == username) {
return false
}
}
val user = User(nbUser+1,username, email, date,randomImage(userStub), passwordhash, SrcLanguage.vo)
users.add(user)//ajout au stub
//Afficher tous les users if(!isUsernameExist(username) && !isEmailExist(email)){
logsUser.logDebugDisplayUsers(users, "CreateUser") val user = User(nbUser+1,username, email, date,randomImage(userStub), passwordhash, SrcLanguage.vo)
return true users.add(user)//ajout au stub
//Afficher tous les users
logsUser.logDebugAllUsers(users, "CreateUser")
return true
}
return false
} }
override fun getAllUsers(): List<User> = users override fun getAllUsers(): List<User> = users
@ -95,4 +112,24 @@ class ServicesStub : IServices {
fun randomImage(usersImage : List<User>) : String{ fun randomImage(usersImage : List<User>) : String{
return "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg" return "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg"
} }
fun isUsernameExist(username : String) : Boolean{
val userStub = getAllUsers()
for (user in userStub) {
if (user.username == username) {
return true
}
}
return false
}
fun isEmailExist(email : String) : Boolean{
val userStub = getAllUsers()
for (user in userStub) {
if (user.email == email) {
return true
}
}
return false
}
} }

@ -16,17 +16,20 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import coil.compose.rememberAsyncImagePainter import coil.compose.rememberAsyncImagePainter
import coil.compose.rememberImagePainter import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.model.Quote import com.example.what_the_fantasy.data.model.Quote
import com.example.what_the_fantasy.ui.theme.colorBackground import com.example.what_the_fantasy.ui.theme.colorBackground
import com.example.what_the_fantasy.ui.theme.gradienBox import com.example.what_the_fantasy.ui.theme.gradienBox
@Composable @Composable
fun QuoteLittle(quote: Quote, modifier: Modifier = Modifier) { fun QuoteLittle(quote: Quote, modifier: Modifier = Modifier) {
val Character = stringResource(R.string.CharacterQuote)
Row( Row(
modifier = modifier modifier = modifier
.fillMaxWidth() .fillMaxWidth()
@ -73,14 +76,14 @@ fun QuoteLittle(quote: Quote, modifier: Modifier = Modifier) {
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = "Film : ${quote.source}", text = "${quote.type} : ${quote.source}",
color = Color.White, color = Color.White,
fontSize = 12.sp, fontSize = 12.sp,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis overflow = TextOverflow.Ellipsis
) )
Text( Text(
text = "Personnage : ${quote.character}", text = "${Character}: ${quote.character}",
color = Color.White, color = Color.White,
fontSize = 12.sp, fontSize = 12.sp,
maxLines = 1, maxLines = 1,

@ -36,6 +36,9 @@ data class Quiz(val userIndex: Int, val idQuiz: Int)
@Serializable @Serializable
data class QuizEnd(val userIndex: Int, val idQuiz: Int, val pts: Int) data class QuizEnd(val userIndex: Int, val idQuiz: Int, val pts: Int)
@Serializable
data class OneQuote(val quoteId: Int, val userIndex: Int)
@Serializable @Serializable
data class Quote(val quoteId: Int, val userIndex: Int) data class Quote(val quoteId: Int, val userIndex: Int)
@ -76,7 +79,9 @@ fun AppNavigator() {
index = accueil.userIndex, index = accueil.userIndex,
navFavorite = { navController.navigate(Favorite(accueil.userIndex)) }, navFavorite = { navController.navigate(Favorite(accueil.userIndex)) },
navQuiz = { navController.navigate(QuizMenu(accueil.userIndex)) }, navQuiz = { navController.navigate(QuizMenu(accueil.userIndex)) },
navProfil = { navController.navigate(Profil(accueil.userIndex)) } navProfil = { navController.navigate(Profil(accueil.userIndex)) },
navQuote = { quoteId -> navController.navigate(OneQuote(quoteId,accueil.userIndex)) },
services = services
) )
} }
composable<Favorite> { composable<Favorite> {
@ -86,6 +91,7 @@ fun AppNavigator() {
navAccueil = { navController.navigate(Accueil(favorite.userIndex)) }, navAccueil = { navController.navigate(Accueil(favorite.userIndex)) },
navQuiz = { navController.navigate(QuizMenu(favorite.userIndex)) }, navQuiz = { navController.navigate(QuizMenu(favorite.userIndex)) },
navProfil = { navController.navigate(Profil(favorite.userIndex)) }, navProfil = { navController.navigate(Profil(favorite.userIndex)) },
navQuote = { quoteId -> navController.navigate(OneQuote(quoteId,favorite.userIndex)) },
services = services services = services
) )
} }
@ -104,8 +110,8 @@ fun AppNavigator() {
services = services services = services
) )
} }
composable<Quote> { composable<OneQuote> {
val quote: Quote = it.toRoute() val quote: OneQuote = it.toRoute()
QuotePage( QuotePage(
quoteId = quote.quoteId, quoteId = quote.quoteId,
index = quote.userIndex, index = quote.userIndex,

@ -1,21 +1,24 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
import androidx.compose.material3.Button
import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.* import androidx.compose.runtime.*
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.DailyQuoteStub import com.example.what_the_fantasy.data.local.DailyQuoteStub
import com.example.what_the_fantasy.data.local.QuoteStub import com.example.what_the_fantasy.data.local.QuoteStub
import com.example.what_the_fantasy.data.services.IServices
import com.example.what_the_fantasy.ui.components.NavBar import com.example.what_the_fantasy.ui.components.NavBar
import com.example.what_the_fantasy.ui.components.QuoteLittle import com.example.what_the_fantasy.ui.components.QuoteLittle
import com.example.what_the_fantasy.ui.theme.colorBackground import com.example.what_the_fantasy.ui.theme.colorBackground
@ -25,12 +28,18 @@ fun AccueilPage(
index: Int, index: Int,
navFavorite: (Int) -> Unit, navFavorite: (Int) -> Unit,
navQuiz: (Int) -> Unit, navQuiz: (Int) -> Unit,
navProfil: (Int) -> Unit navProfil: (Int) -> Unit,
navQuote: (Int) -> Unit,
services: IServices
) { ) {
var itemCount by remember { mutableStateOf(15) } var itemCount by remember { mutableStateOf(15) }
val dailyQuote = DailyQuoteStub.dailyQuote val dailyQuote = DailyQuoteStub.dailyQuote
val quotes = QuoteStub.allQuotes.take(itemCount) val quotes = QuoteStub.allQuotes.take(itemCount)
val user = services.getUserById(index) ?: return
val titleDalyQuote = stringResource(R.string.TitleHomeDailyQuote)
val titleSuggestion = stringResource(R.string.TitleHomeSuggestion)
NavBar( NavBar(
onAccueil = true, onAccueil = true,
index = index, index = index,
@ -48,7 +57,7 @@ fun AccueilPage(
item{ item{
Column { Column {
Text( Text(
text = "▶ Citation du jour ◀", text = titleDalyQuote,
color = Color.White, color = Color.White,
fontSize = 24.sp, fontSize = 24.sp,
modifier = Modifier modifier = Modifier
@ -60,7 +69,7 @@ fun AccueilPage(
QuoteLittle(dailyQuote) QuoteLittle(dailyQuote)
} }
Text( Text(
text = "▶ Suggestions ◀", text = titleSuggestion,
color = Color.White, color = Color.White,
fontSize = 24.sp, fontSize = 24.sp,
modifier = Modifier modifier = Modifier
@ -70,7 +79,14 @@ fun AccueilPage(
) )
} }
items(quotes) { quote -> items(quotes) { quote ->
QuoteLittle(quote)
Column(Modifier.clickable {navQuote(quote.id)}
) {
if(quote.language == user.langage){
QuoteLittle(quote)
Spacer(modifier = Modifier.height(16.dp))
}
}
} }
if (itemCount < QuoteStub.allQuotes.size) { if (itemCount < QuoteStub.allQuotes.size) {
item { item {

@ -1,6 +1,7 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
@ -9,9 +10,11 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.FavoriteStub import com.example.what_the_fantasy.data.local.FavoriteStub
import com.example.what_the_fantasy.data.services.IServices import com.example.what_the_fantasy.data.services.IServices
import com.example.what_the_fantasy.ui.components.NavBar import com.example.what_the_fantasy.ui.components.NavBar
@ -24,11 +27,12 @@ fun FavoritePage(
navAccueil: (Int) -> Unit, navAccueil: (Int) -> Unit,
navQuiz: (Int) -> Unit, navQuiz: (Int) -> Unit,
navProfil: (Int) -> Unit, navProfil: (Int) -> Unit,
navQuote: (Int) -> Unit,
services: IServices services: IServices
) { ) {
val user = services.getUserById(index) ?: return val user = services.getUserById(index) ?: return
val quotes = FavoriteStub.getFavoritesByUser(user.id) val quotes = FavoriteStub.getFavoritesByUser(user.id)
val TitlePage = stringResource(R.string.TitleFavorite)
NavBar(onFavorite = true, NavBar(onFavorite = true,
index = index, index = index,
navControllerFavorite = { }, navControllerFavorite = { },
@ -45,7 +49,7 @@ fun FavoritePage(
LazyColumn { LazyColumn {
item{ item{
Text( Text(
text = "▶ Favoris ◀", text = TitlePage,
color = Color.White, color = Color.White,
fontSize = 24.sp, fontSize = 24.sp,
modifier = Modifier modifier = Modifier
@ -55,7 +59,11 @@ fun FavoritePage(
) )
} }
items(quotes) { quote -> items(quotes) { quote ->
QuoteLittle(quote) Column (Modifier.clickable { navQuote( quote.id )} ){
QuoteLittle(quote)
Spacer(modifier = Modifier.height(16.dp))
}
} }
} }
} }

@ -1,22 +1,17 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import android.util.Log
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material3.Button import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.IconButton import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -27,8 +22,6 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip 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.graphics.Color
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.KeyboardType
@ -36,22 +29,16 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.navigation.NavController import com.example.what_the_fantasy.Logs.LogsUsers
import androidx.navigation.compose.rememberNavController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.example.what_the_fantasy.R import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.UserStub
import com.example.what_the_fantasy.data.model.User import com.example.what_the_fantasy.data.model.User
import com.example.what_the_fantasy.data.services.IServices import com.example.what_the_fantasy.data.services.IServices
import com.example.what_the_fantasy.data.services.ServicesStub
import com.example.what_the_fantasy.ui.components.ErrorMessageProfileComponent import com.example.what_the_fantasy.ui.components.ErrorMessageProfileComponent
import com.example.what_the_fantasy.ui.components.SpaceHeightComponent import com.example.what_the_fantasy.ui.components.SpaceHeightComponent
import com.example.what_the_fantasy.ui.components.TitlePageComponent import com.example.what_the_fantasy.ui.components.TitlePageComponent
import com.example.what_the_fantasy.ui.components.hashPassword import com.example.what_the_fantasy.ui.components.hashPassword
import com.example.what_the_fantasy.ui.theme.colorBackground import com.example.what_the_fantasy.ui.theme.colorBackground
import com.example.what_the_fantasy.ui.theme.gradienBox import com.example.what_the_fantasy.ui.theme.gradienBox
import java.security.MessageDigest
@Composable @Composable
fun LoginPage(navControllerSignUp: () -> Unit, navControllerProfil: (Int) -> Unit, services : IServices) { fun LoginPage(navControllerSignUp: () -> Unit, navControllerProfil: (Int) -> Unit, services : IServices) {
@ -151,12 +138,13 @@ fun ConnexionButtonLogin(userStub : List<User>, id : String, passwd : String, ti
fun validLogin(identifiant : String, passwd : String, users : List<User>, navController: (Int) -> Unit): Boolean { fun validLogin(identifiant : String, passwd : String, users : List<User>, navController: (Int) -> Unit): Boolean {
val logsUser = LogsUsers() //gestion des logs pour les utilisateurs
users.forEachIndexed { index, user -> users.forEachIndexed { index, user ->
val hashPassWd = hashPassword(passwd) val hashPassWd = hashPassword(passwd)
if (user.username == identifiant && user.password == hashPassWd) { if (user.username == identifiant && user.password == hashPassWd) {
navController(index) // Passer l'index à la fonction navController navController(index) // Passer l'index à la fonction navController
logsUser.logInformationUserConnect(user, "UserConnect")
return true return true
} }
} }

@ -1,15 +1,7 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import android.content.Context
import android.os.Bundle
import android.util.Patterns import android.util.Patterns
import android.widget.ImageView
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.Image
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
@ -25,16 +17,13 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Check
import androidx.compose.material.icons.filled.CheckCircle import androidx.compose.material.icons.filled.CheckCircle
import androidx.compose.material.icons.filled.Edit import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.rounded.Face
import androidx.compose.material3.Button import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton import androidx.compose.material3.IconButton
import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
@ -44,10 +33,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip 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.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
@ -55,22 +41,17 @@ import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import coil.compose.AsyncImage import coil.compose.AsyncImage
import com.example.what_the_fantasy.Logs.LogsUsers
import com.example.what_the_fantasy.R import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.QuestionStub import com.example.what_the_fantasy.data.model.User
import com.example.what_the_fantasy.data.local.UserStub
import com.example.what_the_fantasy.data.services.IServices import com.example.what_the_fantasy.data.services.IServices
//import com.example.what_the_fantasy.data.local.UserStub.users
import com.example.what_the_fantasy.data.services.ServicesStub
import com.example.what_the_fantasy.ui.components.ErrorMessageProfileComponent import com.example.what_the_fantasy.ui.components.ErrorMessageProfileComponent
import com.example.what_the_fantasy.ui.components.NavBar import com.example.what_the_fantasy.ui.components.NavBar
import com.example.what_the_fantasy.ui.components.SpaceHeightComponent import com.example.what_the_fantasy.ui.components.SpaceHeightComponent
import com.example.what_the_fantasy.ui.components.TitlePageComponent import com.example.what_the_fantasy.ui.components.TitlePageComponent
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
import com.example.what_the_fantasy.ui.theme.gradienBox import com.example.what_the_fantasy.ui.theme.gradienBox
@Composable @Composable
@ -127,9 +108,11 @@ fun ProfilPage(index: Int,
// Bouton // Bouton
//ButtonProfile(R.string.ButtonAddQuoteprofile, 18, Color.Black, Color.White,navUnLog) // Pas encore de navigation definie //ButtonProfile(R.string.ButtonAddQuoteprofile, 18, Color.Black, Color.White,navUnLog) // Pas encore de navigation definie
//SpaceHeightComponent(16) //SpaceHeightComponent(16)
ButtonProfile(R.string.ButtonLanguageprofile, 18, Color.Black, Color.White,navUnLog) // Pas encore de navigation definie ButtonLanguage(R.string.ButtonLanguageprofile, 18, Color.Black, Color.White,services, user)
SpaceHeightComponent(16) SpaceHeightComponent(16)
ButtonProfile(R.string.ButtonUnlogprofile, 18, Color.Black, Color.White, navUnLog) ButtonUnLog(R.string.ButtonUnlogprofile, 18, Color.Black, Color.White,navUnLog)
} }
} }
@ -156,8 +139,8 @@ fun EditEmail(userEmail: String, index: Int, service: IServices) {
var emailError by remember { mutableStateOf(false) } var emailError by remember { mutableStateOf(false) }
fun onDoneEditing() { fun onDoneEditing() {
service.EditEmail(email, index) isEditingEmail =!service.EditEmail(email, index)
isEditingEmail = false
} }
if (isEditingEmail) { if (isEditingEmail) {
@ -242,8 +225,7 @@ fun EditUsername(userName: String, index: Int, service : IServices) {
var isEditingUsername by remember { mutableStateOf(false) } var isEditingUsername by remember { mutableStateOf(false) }
fun onDoneEditing() { fun onDoneEditing() {
service.EditUsername(username, index) isEditingUsername= !service.EditUsername(username, index)
isEditingUsername = false
} }
if (isEditingUsername) { if (isEditingUsername) {
@ -459,13 +441,34 @@ fun DisplayPassword(onEdit: () -> Unit) {
} }
@Composable @Composable
fun ButtonProfile(textResId : Int, size :Int, colorTexte : Color, colorButton : Color,navController: () -> Unit){ fun ButtonUnLog(textResId : Int, size :Int, colorTexte : Color, colorButton : Color,navController: () -> Unit){
val text = stringResource(id = textResId) val text = stringResource(id = textResId)
val logsUser = LogsUsers() //gestion des logs pour les utilisateurs
Button( Button(
onClick = { navController() }, onClick = {
navController()
logsUser.unlogInformationUserConnect("UserUnLog")
},
colors = ButtonDefaults.buttonColors(containerColor = colorButton), colors = ButtonDefaults.buttonColors(containerColor = colorButton),
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
) { ) {
Text(text, fontSize = size.sp, color = colorTexte) Text(text, fontSize = size.sp, color = colorTexte)
} }
}
@Composable
fun ButtonLanguage(textResId : Int, size :Int, colorTexte : Color, colorButton : Color, service: IServices, user : User){
val text = stringResource(id = textResId)
val currentLangage = remember { mutableStateOf(user.langage) }
Button(
onClick = {
service.ChangeLangage(user)
currentLangage.value = user.langage
},
colors = ButtonDefaults.buttonColors(containerColor = colorButton),
modifier = Modifier.fillMaxWidth(),
) {
Text("${text} (${currentLangage.value})", fontSize = size.sp, color = colorTexte)
}
} }

@ -1,15 +1,8 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import androidx.compose.foundation.Image
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
@ -17,14 +10,11 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.QuestionStub
import com.example.what_the_fantasy.data.local.QuizStub import com.example.what_the_fantasy.data.local.QuizStub
import com.example.what_the_fantasy.ui.components.NavBar import com.example.what_the_fantasy.ui.components.NavBar
@ -44,8 +34,7 @@ fun QuizEndPage(
navProfil:(Int) -> Unit, navProfil:(Int) -> Unit,
navQuiz: (Int) -> Unit, navQuiz: (Int) -> Unit,
) { ) {
NavBar(onQuiz = true, NavBar(index = index,
index = index,
navControllerFavorite = navFavorite, navControllerFavorite = navFavorite,
navControllerAccueil = navAccueil, navControllerAccueil = navAccueil,
navControllerProfil = navProfil, navControllerProfil = navProfil,

@ -2,16 +2,11 @@ package com.example.what_the_fantasy.ui.screens
import androidx.compose.foundation.Image import androidx.compose.foundation.Image
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.scrollable
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
@ -34,9 +29,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.QuizStub import com.example.what_the_fantasy.data.local.QuizStub
import com.example.what_the_fantasy.data.services.IServices
import com.example.what_the_fantasy.ui.components.NavBar import com.example.what_the_fantasy.ui.components.NavBar

@ -1,10 +1,8 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import androidx.compose.foundation.Image
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.* import androidx.compose.runtime.*
@ -13,16 +11,12 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.QuestionStub
import com.example.what_the_fantasy.data.local.QuizStub import com.example.what_the_fantasy.data.local.QuizStub
import com.example.what_the_fantasy.ui.components.BackBar
import com.example.what_the_fantasy.ui.components.NavBar import com.example.what_the_fantasy.ui.components.NavBar
@Composable @Composable
@ -61,8 +55,7 @@ fun QuizPage(
if (idCurrentQuestion < questions.size - 1) idCurrentQuestion++ if (idCurrentQuestion < questions.size - 1) idCurrentQuestion++
else navControllerQuizEnd(idQuiz, pts) // Retour menu else navControllerQuizEnd(idQuiz, pts) // Retour menu
} }
NavBar(onQuiz = true, NavBar(index = index,
index = index,
navControllerFavorite = navFavorite, navControllerFavorite = navFavorite,
navControllerAccueil = navAccueil, navControllerAccueil = navAccueil,
navControllerProfil = navProfil, navControllerProfil = navProfil,

@ -1,17 +1,11 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.text.KeyboardOptions
@ -31,27 +25,20 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip 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.graphics.Color
import androidx.compose.ui.res.stringResource 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.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import com.example.what_the_fantasy.R import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.services.IServices import com.example.what_the_fantasy.data.services.IServices
import com.example.what_the_fantasy.ui.components.SpaceHeightComponent import com.example.what_the_fantasy.ui.components.SpaceHeightComponent
import com.example.what_the_fantasy.ui.components.TitlePageComponent import com.example.what_the_fantasy.ui.components.TitlePageComponent
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
import com.example.what_the_fantasy.ui.theme.colorBackground import com.example.what_the_fantasy.ui.theme.colorBackground
import com.example.what_the_fantasy.ui.theme.gradienBox import com.example.what_the_fantasy.ui.theme.gradienBox
import com.example.what_the_fantasy.data.services.ServicesStub
import com.example.what_the_fantasy.ui.components.ErrorMessageProfileComponent import com.example.what_the_fantasy.ui.components.ErrorMessageProfileComponent
import com.example.what_the_fantasy.ui.components.hashPassword
@Composable @Composable
fun SignUpPage(navControllerLogin: () -> Unit, services : IServices) { fun SignUpPage(navControllerLogin: () -> Unit, services : IServices) {

@ -1,9 +1,14 @@
package com.example.what_the_fantasy.ui.theme package com.example.what_the_fantasy.ui.theme
import android.content.Context
import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import com.example.what_the_fantasy.R import androidx.core.content.ContextCompat
fun Context.getColorFromRes(resId: Int): Color {
return Color(ContextCompat.getColor(this, resId))
}
val Purple80 = Color(0xFFD0BCFF) val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC) val PurpleGrey80 = Color(0xFFCCC2DC)
@ -22,6 +27,7 @@ val gradienBox = Brush.linearGradient(
) )
val colorBackground = Color(0xFF100C1B) val colorBackground = Color(0xFF100C1B)
val colorNavBar = Color.Black val colorNavBar = Color.Black
val colorButtonNavSelected= Color(0xFFC8C8C8) val colorButtonNavSelected= Color(0xFFC8C8C8)

@ -30,7 +30,7 @@
<string name="ErrorEmailSignUp">Email invalide</string> <string name="ErrorEmailSignUp">Email invalide</string>
<string name="ErrorPasswordSignUp">Les mots de passe ne correspondent pas</string> <string name="ErrorPasswordSignUp">Les mots de passe ne correspondent pas</string>
<string name="ErrorUserEmptySignUp">Le nom d\'utilisateur ne peut pas être vide</string> <string name="ErrorUserEmptySignUp">Le nom d\'utilisateur ne peut pas être vide</string>
<string name="ErrorUserExistSignUp">Le nom d\'utilisateur n\'est pas disponible</string> <string name="ErrorUserExistSignUp">Le nom d\'utilisateur ou l\'email ne sont pas disponibles</string>
<string name="ErrorPasswordEmpty">Vous devez mettre un mot de passe</string> <string name="ErrorPasswordEmpty">Vous devez mettre un mot de passe</string>
//Page Profil //Page Profil
@ -51,5 +51,9 @@
//Page Favori //Page Favori
<string name="TitleFavorite">Favoris</string> <string name="TitleFavorite">▶ Favoris ◀</string>
//Page Accueil
<string name="TitleHomeDailyQuote">▶ Citation du jour ◀</string>
<string name="TitleHomeSuggestion">▶ Suggestions ◀</string>
</resources> </resources>

@ -29,7 +29,7 @@
<string name="ErrorEmailSignUp">Invalid email</string> <string name="ErrorEmailSignUp">Invalid email</string>
<string name="ErrorPasswordSignUp">Passwords do not match</string> <string name="ErrorPasswordSignUp">Passwords do not match</string>
<string name="ErrorUserEmptySignUp">Username cannot be empty</string> <string name="ErrorUserEmptySignUp">Username cannot be empty</string>
<string name="ErrorUserExistSignUp">Username is not available</string> <string name="ErrorUserExistSignUp">Username or email are not available</string>
<string name="ErrorPasswordEmpty">You must put a password</string> <string name="ErrorPasswordEmpty">You must put a password</string>
//Page Profil //Page Profil
@ -48,6 +48,10 @@
<string name="CharacterQuote">Character</string> <string name="CharacterQuote">Character</string>
//Page Favori //Page Favori
<string name="TitleFavorite">Favorites</string> <string name="TitleFavorite">▶ Favorites ◀</string>
//Page Accueil
<string name="TitleHomeDailyQuote">▶ Quote of the day ◀</string>
<string name="TitleHomeSuggestion">▶ Suggestions ◀</string>
</resources> </resources>
Loading…
Cancel
Save