Add compare button on parsed view

main
CAPEL Maxime 2024-01-18 16:10:33 +01:00
parent a72708d76c
commit ed8915b9fe
3 changed files with 18 additions and 7 deletions

View File

@ -209,6 +209,7 @@ fun app() {
onBackClick = { currentPage.value = "choixLangage" },
onProjectClick = { currentPage.value = "projects" },
onCodeToVerifyClick = { currentPage.value = "choixLangage" },
onCompareClick = { currentPage.value = "compareProject" },
)
}
}

View File

@ -20,7 +20,7 @@ fun choixLangagePage(
onJavaClick: () -> Unit,
onJavaScriptClick: () -> Unit,
onProjectClick: () -> Unit,
onCodeToVerifyClick: () -> Unit,
onCodeToVerifyClick: () -> Unit
) {
var isCompareClicked by remember { mutableStateOf(false) }
val noFileSnackbarVisibleState = remember { mutableStateOf(false) }

View File

@ -27,6 +27,7 @@ fun parsedWordsTable(
onBackClick: () -> Unit,
onProjectClick: () -> Unit,
onCodeToVerifyClick: () -> Unit,
onCompareClick: () -> Unit,
) {
var isCompareClicked by remember { mutableStateOf(false) }
val noFileSnackbarVisibleState = remember { mutableStateOf(false) }
@ -95,12 +96,21 @@ fun parsedWordsTable(
Spacer(modifier = Modifier.height(16.dp))
buttonComponent(
text = languageManager.getBackText(),
onClick = { onBackClick() },
icon = Icons.Filled.ArrowBack,
modifier = Modifier.padding(10.dp)
)
Row (
horizontalArrangement = Arrangement.spacedBy(16.dp)
) {
buttonComponent(
text = languageManager.getBackText(),
onClick = { onBackClick() },
icon = Icons.Filled.ArrowBack,
modifier = Modifier.height(40.dp)
)
buttonComponent(
text = languageManager.getCompareText(),
onClick = onCompareClick,
modifier = Modifier.height(40.dp),
)
}
}
dropdownButtonComponent(
languageManager = languageManager,