Refactor functions with uppercase
parent
be34fb6254
commit
59448f4e4f
|
@ -16,7 +16,6 @@ import java.awt.FileDialog
|
|||
import java.awt.Frame
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.window.*
|
||||
|
@ -28,9 +27,8 @@ import kotlinx.serialization.encodeToString
|
|||
|
||||
val customRedColor = Color(0xFFB70D1B)
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
@Composable
|
||||
fun HomePage(
|
||||
fun homePage(
|
||||
onGlossaireClick: () -> Unit,
|
||||
onCodeAVerifierClick: () -> Unit
|
||||
) {
|
||||
|
@ -80,13 +78,13 @@ fun HomePage(
|
|||
|
||||
@Composable
|
||||
@Preview
|
||||
fun App() {
|
||||
fun app() {
|
||||
MaterialTheme {
|
||||
val currentPage = remember { mutableStateOf("accueil") }
|
||||
|
||||
when (currentPage.value) {
|
||||
"accueil" -> {
|
||||
HomePage(
|
||||
homePage(
|
||||
onGlossaireClick = { currentPage.value = "glossaire" },
|
||||
onCodeAVerifierClick = { currentPage.value = "choixLangage" }
|
||||
)
|
||||
|
@ -133,10 +131,10 @@ fun App() {
|
|||
)
|
||||
}
|
||||
"formulaire" -> {
|
||||
FormulairePage(onAnnulerClick = { currentPage.value = "glossaire" })
|
||||
formulairePage(onAnnulerClick = { currentPage.value = "glossaire" })
|
||||
}
|
||||
"choixLangage" -> {
|
||||
ChoixLangagePage(
|
||||
choixLangagePage(
|
||||
onRetourClick = { currentPage.value = "accueil" },
|
||||
onPythonClick = {
|
||||
val fileDialog = FileDialog(Frame(), "Select a file", FileDialog.LOAD)
|
||||
|
@ -284,7 +282,7 @@ fun verifierChampsRequis(mot: Map<String, String>): Boolean {
|
|||
}
|
||||
|
||||
@Composable
|
||||
fun ChoixLangagePage(
|
||||
fun choixLangagePage(
|
||||
onRetourClick: () -> Unit,
|
||||
onPythonClick: () -> Unit,
|
||||
onJavaClick: () -> Unit,
|
||||
|
@ -429,7 +427,7 @@ fun glossairePage(
|
|||
|
||||
|
||||
@Composable
|
||||
fun FormulairePage(onAnnulerClick: () -> Unit) {
|
||||
fun formulairePage(onAnnulerClick: () -> Unit) {
|
||||
|
||||
MaterialTheme {
|
||||
Column(
|
||||
|
@ -609,6 +607,6 @@ fun main() = application {
|
|||
icon = painterResource("assets/logo/logo.png"),
|
||||
onCloseRequest = ::exitApplication
|
||||
) {
|
||||
App()
|
||||
app()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue