Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Dec 25, 2024
1 parent 0941b61 commit 225c87f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fun AuthLinksBox(
text = stringResource(MoviesStrings.auth_terms_of_use),
modifier = Modifier
.padding(vertical = 16.dp)
.clickableWithoutRipple { navigateToTermsOfUseUrl() },
.clickableWithoutRipple(navigateToTermsOfUseUrl),
style = MaterialTheme.typography.bodyMedium.copy(MaterialTheme.colorScheme.onPrimaryContainer)
)

Expand All @@ -66,7 +66,7 @@ fun AuthLinksBox(
text = stringResource(MoviesStrings.auth_privacy_policy),
modifier = Modifier
.padding(vertical = 16.dp)
.clickableWithoutRipple { navigateToPrivacyPolicyUrl() },
.clickableWithoutRipple(navigateToPrivacyPolicyUrl),
style = MaterialTheme.typography.bodyMedium.copy(MaterialTheme.colorScheme.onPrimaryContainer)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,17 @@ internal fun AuthScreenContent(

OutlinedTextField(
value = username.value,
onValueChange = { value -> username = Username(value) },
onValueChange = { value ->
username = Username(value.filterNot(Char::isWhitespace))
},
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp, top = 8.dp, end = 16.dp),
label = { Text(text = stringResource(MoviesStrings.auth_label_username)) },
label = {
Text(
text = stringResource(MoviesStrings.auth_label_username)
)
},
isError = error != null,
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Text,
Expand All @@ -135,11 +141,15 @@ internal fun AuthScreenContent(

OutlinedTextField(
value = password.value,
onValueChange = { value -> password = Password(value) },
onValueChange = { value -> password = Password(value.filterNot(Char::isWhitespace)) },
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp, top = 8.dp, end = 16.dp),
label = { Text(text = stringResource(MoviesStrings.auth_label_password)) },
label = {
Text(
text = stringResource(MoviesStrings.auth_label_password)
)
},
trailingIcon = {
AnimatedVisibility(
visible = password.isNotEmpty,
Expand All @@ -154,7 +164,10 @@ internal fun AuthScreenContent(
},
supportingText = {
if (error != null) {
Text(text = error.text, color = MaterialTheme.colorScheme.error)
Text(
text = error.text,
color = MaterialTheme.colorScheme.error
)
}
},
isError = error != null,
Expand All @@ -177,7 +190,7 @@ internal fun AuthScreenContent(
verticalAlignment = Alignment.CenterVertically
) {
TextButton(
onClick = { navigateToTmdbRegisterUrl() }
onClick = navigateToTmdbRegisterUrl
) {
Text(
text = stringResource(MoviesStrings.auth_sign_up)
Expand All @@ -190,7 +203,7 @@ internal fun AuthScreenContent(
exit = fadeOut()
) {
TextButton(
onClick = { navigateToTmdbResetPasswordUrl() }
onClick = navigateToTmdbResetPasswordUrl
) {
Text(
text = stringResource(MoviesStrings.auth_reset_password)
Expand Down

0 comments on commit 225c87f

Please sign in to comment.