merge feat/welcome-screen into screen #2

Merged
lele merged 19 commits from feat/welcome-screen into master 2025-06-19 16:28:14 +02:00
Showing only changes of commit 078a1a9efe - Show all commits

View file

@ -71,7 +71,15 @@ fun homeScreen(paddingValues: PaddingValues) {
} }
} }
Button(onClick = {currentScreen = nextScreen}, modifier = Modifier.padding(top = 24.dp)) { 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")
} }
@ -122,7 +130,7 @@ fun serverDialog(serverURL: String, updateServerURL: (newServerURL: String) -> U
}, },
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Uri), keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Uri),
supportingText = { supportingText = {
AnimatedVisibility(!isValidUrl(serverURL)) { AnimatedVisibility(!isValidUrl(serverURL) && serverURL != "") {
Text( Text(
text = "No valid URL", text = "No valid URL",
color = MaterialTheme.colorScheme.error color = MaterialTheme.colorScheme.error