merge feat/welcome-screen into screen #2
2 changed files with 16 additions and 7 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package de.lelehier.keeper.screens
|
||||
|
||||
import KeeperLargeFontFamily
|
||||
|
||||
import android.util.Patterns
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
import androidx.compose.animation.AnimatedContentTransitionScope
|
||||
|
|
@ -48,9 +49,11 @@ import androidx.compose.ui.text.input.KeyboardType
|
|||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.autofill.ContentType
|
||||
import androidx.compose.ui.semantics.contentType
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
|
||||
@Composable
|
||||
fun LoginScreen(paddingValues: PaddingValues) {
|
||||
|
|
@ -194,6 +197,7 @@ fun Greeting(serverURL: String, currentScreen: String) {
|
|||
fun ServerDialog(serverURL: String, updateServerURL: (newServerURL: String) -> Unit) {
|
||||
var dialogServerURL by remember { mutableStateOf("") }
|
||||
OutlinedTextField(
|
||||
singleLine = true,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
label = { Text(text = "Server URL") },
|
||||
textStyle = MaterialTheme.typography.bodySmall,
|
||||
|
|
@ -230,23 +234,26 @@ fun PasswordDialog(username: String, password: String, updateUsername: (newUsern
|
|||
var dialogPassword by remember { mutableStateOf("") }
|
||||
Column {
|
||||
OutlinedTextField(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
singleLine = true,
|
||||
modifier = Modifier.fillMaxWidth().semantics {contentType = ContentType.Username + ContentType.EmailAddress},
|
||||
label = { Text(text = "Username") },
|
||||
textStyle = MaterialTheme.typography.bodySmall,
|
||||
value = username,
|
||||
onValueChange = { text ->
|
||||
dialogUsername = text
|
||||
updateUsername(dialogUsername)
|
||||
});
|
||||
})
|
||||
OutlinedTextField(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
singleLine = true,
|
||||
modifier = Modifier.fillMaxWidth().semantics {contentType = ContentType.Password},
|
||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
|
||||
label = { Text(text = "Password") },
|
||||
textStyle = MaterialTheme.typography.bodySmall,
|
||||
value = password,
|
||||
visualTransformation = PasswordVisualTransformation(),
|
||||
onValueChange = { text ->
|
||||
dialogPassword = text
|
||||
updatePassword(dialogPassword)
|
||||
}
|
||||
updatePassword(dialogPassword)}
|
||||
)
|
||||
|
||||
}
|
||||
|
|
@ -257,6 +264,7 @@ fun ApiDialog(apiKey: String, updateApiKey: (newApiKey: String) -> Unit) {
|
|||
var dialogApiKey by remember { mutableStateOf(apiKey) }
|
||||
Column {
|
||||
OutlinedTextField(
|
||||
singleLine = true,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
label = { Text(text = "API Key") },
|
||||
textStyle = MaterialTheme.typography.bodySmall,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ composeBom = "2024.09.00"
|
|||
|
||||
[libraries]
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue