1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-24797] Hidden custom fields for new ciphers (#16198)

* allow for hidden fields to be moved/edited when adding a cipher

* disable drag when the field cannot be edited
This commit is contained in:
Nick Krantz
2025-09-03 21:16:56 -05:00
committed by GitHub
parent 281918a7b9
commit 54eb54483f
2 changed files with 4 additions and 1 deletions

View File

@@ -22,6 +22,7 @@
}"
[attr.data-testid]="field.value.name + '-entry'"
cdkDrag
[cdkDragDisabled]="!canEdit(field.value.type)"
#customFieldRow
>
<!-- Text Field -->

View File

@@ -150,7 +150,9 @@ export class CustomFieldsComponent implements OnInit, AfterViewInit {
canEdit(type: FieldType): boolean {
return (
!this.isPartialEdit &&
(type !== FieldType.Hidden || this.cipherFormContainer.originalCipherView?.viewPassword)
(type !== FieldType.Hidden ||
this.cipherFormContainer.originalCipherView === null ||
this.cipherFormContainer.originalCipherView.viewPassword)
);
}