mirror of
https://github.com/bitwarden/android.git
synced 2026-03-12 05:04:17 -05:00
[PM-24226] Reorder SSH key fields (#5754)
This commit is contained in:
@@ -27,20 +27,6 @@ fun LazyListScope.vaultAddEditSshKeyItems(
|
||||
) {
|
||||
item {
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
BitwardenTextField(
|
||||
label = stringResource(id = BitwardenString.public_key),
|
||||
value = sshKeyState.publicKey,
|
||||
readOnly = true,
|
||||
onValueChange = { },
|
||||
textFieldTestTag = "PublicKeyEntry",
|
||||
cardStyle = CardStyle.Top(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
)
|
||||
}
|
||||
|
||||
item {
|
||||
BitwardenPasswordField(
|
||||
label = stringResource(id = BitwardenString.private_key),
|
||||
value = sshKeyState.privateKey,
|
||||
@@ -50,6 +36,20 @@ fun LazyListScope.vaultAddEditSshKeyItems(
|
||||
showPasswordChange = { sshKeyTypeHandlers.onPrivateKeyVisibilityChange(it) },
|
||||
showPasswordTestTag = "ViewPrivateKeyButton",
|
||||
passwordFieldTestTag = "PrivateKeyEntry",
|
||||
cardStyle = CardStyle.Top(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
)
|
||||
}
|
||||
|
||||
item {
|
||||
BitwardenTextField(
|
||||
label = stringResource(id = BitwardenString.public_key),
|
||||
value = sshKeyState.publicKey,
|
||||
readOnly = true,
|
||||
onValueChange = { },
|
||||
textFieldTestTag = "PublicKeyEntry",
|
||||
cardStyle = CardStyle.Middle(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
|
||||
@@ -63,32 +63,9 @@ fun VaultItemSshKeyContent(
|
||||
onExpandClick = { isExpanded = !isExpanded },
|
||||
applyIconBackground = commonState.iconData is IconData.Local,
|
||||
)
|
||||
item(key = "publicKey") {
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
BitwardenTextField(
|
||||
label = stringResource(id = BitwardenString.public_key),
|
||||
value = sshKeyItemState.publicKey,
|
||||
onValueChange = { },
|
||||
singleLine = false,
|
||||
readOnly = true,
|
||||
actions = {
|
||||
BitwardenStandardIconButton(
|
||||
vectorIconRes = BitwardenDrawable.ic_copy,
|
||||
contentDescription = stringResource(id = BitwardenString.copy_public_key),
|
||||
onClick = vaultSshKeyItemTypeHandlers.onCopyPublicKeyClick,
|
||||
modifier = Modifier.testTag(tag = "SshKeyCopyPublicKeyButton"),
|
||||
)
|
||||
},
|
||||
cardStyle = CardStyle.Top(),
|
||||
modifier = Modifier
|
||||
.testTag("SshKeyItemPublicKeyEntry")
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin()
|
||||
.animateItem(),
|
||||
)
|
||||
}
|
||||
|
||||
item(key = "privateKey") {
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
BitwardenPasswordField(
|
||||
label = stringResource(id = BitwardenString.private_key),
|
||||
value = sshKeyItemState.privateKey,
|
||||
@@ -106,7 +83,7 @@ fun VaultItemSshKeyContent(
|
||||
showPassword = sshKeyItemState.showPrivateKey,
|
||||
showPasswordTestTag = "ViewPrivateKeyButton",
|
||||
showPasswordChange = vaultSshKeyItemTypeHandlers.onShowPrivateKeyClick,
|
||||
cardStyle = CardStyle.Middle(),
|
||||
cardStyle = CardStyle.Top(),
|
||||
modifier = Modifier
|
||||
.testTag("SshKeyItemPrivateKeyEntry")
|
||||
.fillMaxWidth()
|
||||
@@ -115,6 +92,30 @@ fun VaultItemSshKeyContent(
|
||||
)
|
||||
}
|
||||
|
||||
item(key = "publicKey") {
|
||||
BitwardenTextField(
|
||||
label = stringResource(id = BitwardenString.public_key),
|
||||
value = sshKeyItemState.publicKey,
|
||||
onValueChange = { },
|
||||
singleLine = false,
|
||||
readOnly = true,
|
||||
actions = {
|
||||
BitwardenStandardIconButton(
|
||||
vectorIconRes = BitwardenDrawable.ic_copy,
|
||||
contentDescription = stringResource(id = BitwardenString.copy_public_key),
|
||||
onClick = vaultSshKeyItemTypeHandlers.onCopyPublicKeyClick,
|
||||
modifier = Modifier.testTag(tag = "SshKeyCopyPublicKeyButton"),
|
||||
)
|
||||
},
|
||||
cardStyle = CardStyle.Middle(),
|
||||
modifier = Modifier
|
||||
.testTag("SshKeyItemPublicKeyEntry")
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin()
|
||||
.animateItem(),
|
||||
)
|
||||
}
|
||||
|
||||
item(key = "fingerprint") {
|
||||
BitwardenTextField(
|
||||
label = stringResource(id = BitwardenString.fingerprint),
|
||||
|
||||
Reference in New Issue
Block a user