merge feat/welcome-screen into screen #2
1 changed files with 33 additions and 20 deletions
|
|
@ -88,7 +88,8 @@ fun LoginScreen(paddingValues: PaddingValues) {
|
|||
|
||||
AnimatedVisibility(currentScreen == "passwordDialog" || currentScreen == "apiDialog") {
|
||||
Row(
|
||||
modifier = Modifier.padding(bottom = 12.dp)
|
||||
modifier = Modifier
|
||||
.padding(bottom = 12.dp)
|
||||
.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
|
|
@ -124,25 +125,37 @@ fun LoginScreen(paddingValues: PaddingValues) {
|
|||
}
|
||||
}
|
||||
}
|
||||
Button(
|
||||
onClick = {when(currentScreen) {
|
||||
"serverDialog" -> currentScreen = "passwordDialog"
|
||||
"passwordDialog" -> currentScreen = "loadingDialog"
|
||||
"apiDialog" -> currentScreen = "loadingDialog"
|
||||
"loadingDialog" -> currentScreen = "loadingDialog"
|
||||
}},
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(96.dp),
|
||||
enabled = when(currentScreen) {
|
||||
"serverDialog" -> isValidUrl(serverURL)
|
||||
"passwordDialog" -> username.isNotEmpty() && password.isNotEmpty()
|
||||
"apiDialog" -> apiKey.isNotEmpty()
|
||||
else -> false
|
||||
},
|
||||
) {
|
||||
Row() {
|
||||
Text(text = "Next")
|
||||
AnimatedVisibility(currentScreen != "loadingDialog") {
|
||||
Button(
|
||||
onClick = {
|
||||
when (currentScreen) {
|
||||
"serverDialog" -> currentScreen = "passwordDialog"
|
||||
"passwordDialog" -> currentScreen = "loadingDialog"
|
||||
"apiDialog" -> currentScreen = "loadingDialog"
|
||||
"loadingDialog" -> currentScreen = "loadingDialog"
|
||||
}
|
||||
},
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(96.dp),
|
||||
enabled = when (currentScreen) {
|
||||
"serverDialog" -> isValidUrl(serverURL)
|
||||
"passwordDialog" -> username.isNotEmpty() && password.isNotEmpty()
|
||||
"apiDialog" -> apiKey.isNotEmpty()
|
||||
else -> false
|
||||
},
|
||||
) {
|
||||
Row() {
|
||||
Text(
|
||||
text = when (currentScreen) {
|
||||
"serverDialog" -> "Next"
|
||||
"passwordDialog" -> "Login"
|
||||
"apiDialog" -> "Login"
|
||||
else -> ""
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue