tuto
parent
afaa22dfe2
commit
f0a7bac096
|
@ -41,7 +41,7 @@ dependencies {
|
||||||
testImplementation("junit:junit:4.13.1")
|
testImplementation("junit:junit:4.13.1")
|
||||||
implementation("org.apache.poi:poi:5.0.0")
|
implementation("org.apache.poi:poi:5.0.0")
|
||||||
implementation("org.apache.poi:poi-ooxml:5.0.0")
|
implementation("org.apache.poi:poi-ooxml:5.0.0")
|
||||||
implementation("pl.droidsonroids.gif:android-gif-drawable:1.2.23")
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,31 +20,103 @@ fun HelpPage(onBackClick: () -> Unit) {
|
||||||
verticalArrangement = Arrangement.Center,
|
verticalArrangement = Arrangement.Center,
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
) {
|
) {
|
||||||
Text("Bienvenue dans l'aide !", style = MaterialTheme.typography.h4)
|
Text("Besoin d'aide ?", style = MaterialTheme.typography.h4)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
// Utilisation de Row pour aligner les trois Box
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(16.dp),
|
||||||
|
horizontalArrangement = Arrangement.SpaceBetween
|
||||||
|
) {
|
||||||
|
// Première Box (image et texte)
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.weight(1f)
|
||||||
|
.padding(16.dp),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
// Image au centre
|
||||||
|
Image(
|
||||||
|
painter = painterResource("glossimg.png"),
|
||||||
|
contentDescription = "Image glossaire",
|
||||||
|
modifier = Modifier
|
||||||
|
.size(150.dp)
|
||||||
|
)
|
||||||
|
|
||||||
// Charger et afficher le premier GIF
|
// Texte en dessous de l'image
|
||||||
Image(
|
Text(
|
||||||
painter = painterResource("1.gif"),
|
" \n \n" + "Permet de créer un projet \n" +
|
||||||
contentDescription = "GIF 1",
|
"avec des glossaires \n" +
|
||||||
modifier = Modifier.size(150.dp)
|
"et d'ajouter des mots au(x) glossaire(s)",
|
||||||
)
|
modifier = Modifier
|
||||||
|
.align(Alignment.BottomCenter)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
// Espacement entre les deux premières Box
|
||||||
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
// Charger et afficher le deuxième GIF
|
// Deuxième Box (deuxième image et texte)
|
||||||
Image(
|
Box(
|
||||||
painter = painterResource("2.gif"),
|
modifier = Modifier
|
||||||
contentDescription = "GIF 2",
|
.weight(1f)
|
||||||
modifier = Modifier.size(150.dp)
|
.padding(16.dp),
|
||||||
)
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
// Deuxième image au centre
|
||||||
|
Image(
|
||||||
|
painter = painterResource("code.png"),
|
||||||
|
contentDescription = "Image code",
|
||||||
|
modifier = Modifier
|
||||||
|
.size(150.dp)
|
||||||
|
)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
// Deuxième texte en dessous de l'image
|
||||||
|
Text(
|
||||||
|
"Permet d'ajouter le code \n" +
|
||||||
|
"source que vous souhaitez vérifier",
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.BottomCenter)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Espacement entre la deuxième et la troisième Box
|
||||||
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
|
// Troisième Box (troisième image et texte)
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.weight(1f)
|
||||||
|
.padding(16.dp),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
// Troisième image au centre
|
||||||
|
Image(
|
||||||
|
painter = painterResource("comparer.png"),
|
||||||
|
contentDescription = "Image comparaison",
|
||||||
|
modifier = Modifier
|
||||||
|
.size(150.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Troisième texte en dessous de l'image
|
||||||
|
Text(
|
||||||
|
"Permet de comparer votre glossaire \n" +
|
||||||
|
"avec votre code source",
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.BottomCenter)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(160.dp))
|
||||||
|
|
||||||
buttonComponent("OK", onBackClick)
|
buttonComponent("OK", onBackClick)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun HelpButton(onHelpClick: () -> Unit) {
|
fun HelpButton(onHelpClick: () -> Unit) {
|
||||||
Box(
|
Box(
|
||||||
|
|
|
@ -34,7 +34,6 @@ fun projectsPage(
|
||||||
onProjectClick: () -> Unit,
|
onProjectClick: () -> Unit,
|
||||||
onCodeToVerifyClick: () -> Unit
|
onCodeToVerifyClick: () -> Unit
|
||||||
) {
|
) {
|
||||||
val appState = AppState
|
|
||||||
val noFileSnackbarVisibleState = remember { mutableStateOf(false) }
|
val noFileSnackbarVisibleState = remember { mutableStateOf(false) }
|
||||||
var projects: List<Project> by remember { mutableStateOf(loadProjects()) }
|
var projects: List<Project> by remember { mutableStateOf(loadProjects()) }
|
||||||
var isCompareClicked by remember { mutableStateOf(false) }
|
var isCompareClicked by remember { mutableStateOf(false) }
|
||||||
|
@ -45,7 +44,6 @@ fun projectsPage(
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
) {
|
) {
|
||||||
|
|
||||||
Text("Sélectionnez un projet", style = MaterialTheme.typography.h5)
|
|
||||||
Text(languageManager.getSelectProjectText(), style = MaterialTheme.typography.h5)
|
Text(languageManager.getSelectProjectText(), style = MaterialTheme.typography.h5)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
@ -75,7 +73,7 @@ fun projectsPage(
|
||||||
) {
|
) {
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
main.appState.selectedProject = project
|
appState.selectedProject = project
|
||||||
currentPage.value = "glossaires"
|
currentPage.value = "glossaires"
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue