added api login button
This commit is contained in:
parent
0d44832747
commit
7668743a1f
1 changed files with 23 additions and 10 deletions
|
|
@ -21,6 +21,7 @@ import androidx.compose.foundation.layout.padding
|
|||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.OutlinedButton
|
||||
import androidx.compose.material3.OutlinedTextField
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
|
|
@ -72,17 +73,29 @@ fun HomeScreen(paddingValues: PaddingValues) {
|
|||
}
|
||||
}
|
||||
|
||||
Button(
|
||||
onClick = {currentScreen = nextScreen},
|
||||
modifier = Modifier.padding(top = 24.dp),
|
||||
enabled = when(currentScreen) {
|
||||
0 -> isValidUrl(serverURL)
|
||||
1 -> username.isNotEmpty() && password.isNotEmpty()
|
||||
else -> false
|
||||
},
|
||||
Row {
|
||||
AnimatedVisibility(currentScreen == 1) {
|
||||
OutlinedButton (
|
||||
onClick = {currentScreen = nextScreen},
|
||||
modifier = Modifier.padding(top = 24.dp)
|
||||
) {
|
||||
Row() {
|
||||
Text(text = "Use API Key")
|
||||
}
|
||||
}
|
||||
}
|
||||
Button(
|
||||
onClick = {currentScreen = nextScreen},
|
||||
modifier = Modifier.padding(top = 24.dp),
|
||||
enabled = when(currentScreen) {
|
||||
0 -> isValidUrl(serverURL)
|
||||
1 -> username.isNotEmpty() && password.isNotEmpty()
|
||||
else -> false
|
||||
},
|
||||
) {
|
||||
Row() {
|
||||
Text(text = "Next")
|
||||
Row() {
|
||||
Text(text = "Next")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue