Fix GlossaryDetails issues
parent
a5d3811b45
commit
6631008fcc
|
@ -28,6 +28,7 @@ fun glossaryDetailedPage(
|
||||||
onExportClick: () -> Unit,
|
onExportClick: () -> Unit,
|
||||||
onImportClick: () -> Unit
|
onImportClick: () -> Unit
|
||||||
) {
|
) {
|
||||||
|
println(glossary)
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
verticalArrangement = Arrangement.Top, // Align content at the top
|
verticalArrangement = Arrangement.Top, // Align content at the top
|
||||||
|
|
|
@ -34,7 +34,7 @@ fun app() {
|
||||||
val languageManager = remember { LanguageManager() }
|
val languageManager = remember { LanguageManager() }
|
||||||
MaterialTheme {
|
MaterialTheme {
|
||||||
|
|
||||||
val glossaryDetail: List<Word> by remember { mutableStateOf(emptyList()) }
|
|
||||||
var isJavaScriptFileSelected by remember { mutableStateOf(false) }
|
var isJavaScriptFileSelected by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,8 +81,9 @@ fun app() {
|
||||||
}
|
}
|
||||||
|
|
||||||
"glossaireDetail" -> {
|
"glossaireDetail" -> {
|
||||||
|
appState.selectedGlossary?.let { loadDatasFromFile(it.jsonFilePath) }?.let {
|
||||||
glossaryDetailedPage(
|
glossaryDetailedPage(
|
||||||
glossary = glossaryDetail,
|
glossary = it,
|
||||||
glossaryName = appState.selectedGlossary?.name ?: "",
|
glossaryName = appState.selectedGlossary?.name ?: "",
|
||||||
onBackClick = { currentPage.value = "glossaires" },
|
onBackClick = { currentPage.value = "glossaires" },
|
||||||
onAddWordClick = { currentPage.value = "formulaire" },
|
onAddWordClick = { currentPage.value = "formulaire" },
|
||||||
|
@ -108,6 +109,7 @@ fun app() {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
"formulaire" -> {
|
"formulaire" -> {
|
||||||
appState.selectedGlossary?.let { formPage(it, onCancelClick = { currentPage.value = "glossaireDetail" }) }
|
appState.selectedGlossary?.let { formPage(it, onCancelClick = { currentPage.value = "glossaireDetail" }) }
|
||||||
|
|
Loading…
Reference in New Issue