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.foundation.text.KeyboardOptions
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.OutlinedButton
|
||||||
import androidx.compose.material3.OutlinedTextField
|
import androidx.compose.material3.OutlinedTextField
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
|
@ -72,17 +73,29 @@ fun HomeScreen(paddingValues: PaddingValues) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button(
|
Row {
|
||||||
onClick = {currentScreen = nextScreen},
|
AnimatedVisibility(currentScreen == 1) {
|
||||||
modifier = Modifier.padding(top = 24.dp),
|
OutlinedButton (
|
||||||
enabled = when(currentScreen) {
|
onClick = {currentScreen = nextScreen},
|
||||||
0 -> isValidUrl(serverURL)
|
modifier = Modifier.padding(top = 24.dp)
|
||||||
1 -> username.isNotEmpty() && password.isNotEmpty()
|
) {
|
||||||
else -> false
|
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() {
|
Row() {
|
||||||
Text(text = "Next")
|
Text(text = "Next")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue