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