improvement: A slightly better visual of the Passkey with empty RP name
This commit is contained in:
parent
d2df9687c9
commit
d7d4dd8f80
@ -9,7 +9,6 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
|||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.ColumnScope
|
|
||||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||||
import androidx.compose.foundation.layout.FlowRow
|
import androidx.compose.foundation.layout.FlowRow
|
||||||
import androidx.compose.foundation.layout.PaddingValues
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
@ -73,6 +72,7 @@ import androidx.compose.ui.text.input.ImeAction
|
|||||||
import androidx.compose.ui.text.input.KeyboardType
|
import androidx.compose.ui.text.input.KeyboardType
|
||||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||||
import androidx.compose.ui.text.input.VisualTransformation
|
import androidx.compose.ui.text.input.VisualTransformation
|
||||||
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.artemchep.keyguard.common.model.UsernameVariationIcon
|
import com.artemchep.keyguard.common.model.UsernameVariationIcon
|
||||||
import com.artemchep.keyguard.common.model.titleH
|
import com.artemchep.keyguard.common.model.titleH
|
||||||
@ -757,13 +757,24 @@ private fun PasskeyField(
|
|||||||
if (passkey != null) {
|
if (passkey != null) {
|
||||||
FlatItemTextContent(
|
FlatItemTextContent(
|
||||||
title = {
|
title = {
|
||||||
Text(
|
val userName = passkey.userDisplayName
|
||||||
text = passkey.userDisplayName.orEmpty(),
|
if (userName != null) {
|
||||||
)
|
Text(
|
||||||
|
text = userName,
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
text = {
|
text = {
|
||||||
|
val rpName = passkey.rpName
|
||||||
Text(
|
Text(
|
||||||
text = passkey.rpName ?: "",
|
text = rpName
|
||||||
|
?: stringResource(Res.string.empty_value),
|
||||||
|
color = if (rpName != null) {
|
||||||
|
LocalContentColor.current
|
||||||
|
} else {
|
||||||
|
LocalContentColor.current
|
||||||
|
.combineAlpha(DisabledEmphasisAlpha)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -212,7 +212,14 @@ private fun ColumnScope.ContentOk(
|
|||||||
val rpId = state.model.rpId
|
val rpId = state.model.rpId
|
||||||
Column {
|
Column {
|
||||||
Text(
|
Text(
|
||||||
text = rpName ?: "",
|
text = rpName
|
||||||
|
?: stringResource(Res.string.empty_value),
|
||||||
|
color = if (rpName != null) {
|
||||||
|
LocalContentColor.current
|
||||||
|
} else {
|
||||||
|
LocalContentColor.current
|
||||||
|
.combineAlpha(DisabledEmphasisAlpha)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = rpId,
|
text = rpId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user