From b1bb3a13194a6b50ff83aa10266a0faa680e468f Mon Sep 17 00:00:00 2001 From: cemal Date: Tue, 19 Dec 2023 16:17:41 +0100 Subject: [PATCH] Added glossary title + "ou" --- src/main/kotlin/main/Glossary.kt | 5 +++-- src/main/kotlin/main/Home.kt | 2 -- src/main/kotlin/main/Main.kt | 7 ++++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/main/Glossary.kt b/src/main/kotlin/main/Glossary.kt index 666ecda..8826f4d 100644 --- a/src/main/kotlin/main/Glossary.kt +++ b/src/main/kotlin/main/Glossary.kt @@ -28,7 +28,8 @@ fun glossaryPage( onImportClick: () -> Unit, onExportClick: () -> Unit, onSeeGlossaryClick: () -> Unit, - onBackClick: () -> Unit + glossary: Glossary, + onBackClick: () -> Unit, ) { @@ -37,7 +38,7 @@ fun glossaryPage( verticalArrangement = Arrangement.Top, // Align content at the top horizontalAlignment = Alignment.CenterHorizontally ) { - Text(text = languageManager.getGlossaryTitle(), style = MaterialTheme.typography.h3) + Text(text = languageManager.getGlossaryTitle() + ": " + glossary.name, style = MaterialTheme.typography.h3) } Column( diff --git a/src/main/kotlin/main/Home.kt b/src/main/kotlin/main/Home.kt index 7a30a8b..a7f88e4 100644 --- a/src/main/kotlin/main/Home.kt +++ b/src/main/kotlin/main/Home.kt @@ -178,5 +178,3 @@ fun GlossaryList(glossaries: List, onGlossarySelected: (Glossary) -> U } } - - diff --git a/src/main/kotlin/main/Main.kt b/src/main/kotlin/main/Main.kt index 2ff56d9..a6196f7 100644 --- a/src/main/kotlin/main/Main.kt +++ b/src/main/kotlin/main/Main.kt @@ -105,6 +105,10 @@ fun app() { } Spacer(modifier = Modifier.height(16.dp)) + // mettre un texte "ou" + Text("ou", style = MaterialTheme.typography.h5) + Spacer(modifier = Modifier.height(16.dp)) + Button( onClick = { @@ -246,7 +250,8 @@ fun app() { onSeeGlossaryClick = { glossaryDetail = selectedGlossary?.let { loadDatasFromFile(it.jsonFilePath) }!! currentPage.value = "glossaireDetail" - } + }, + glossary = selectedGlossary!!, ) { currentPage.value = "glossaires" } } "glossaireDetail" -> {