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" }, onBackClick = { currentPage.value = "choixLangage" },
onProjectClick = { currentPage.value = "projects" }, onProjectClick = { currentPage.value = "projects" },
onCodeToVerifyClick = { currentPage.value = "choixLangage" }, onCodeToVerifyClick = { currentPage.value = "choixLangage" },
onCompareClick = { currentPage.value = "compareProject" },
) )
} }
} }

View File

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

View File

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