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:
@@ -22,6 +22,7 @@
|
||||
}"
|
||||
[attr.data-testid]="field.value.name + '-entry'"
|
||||
cdkDrag
|
||||
[cdkDragDisabled]="!canEdit(field.value.type)"
|
||||
#customFieldRow
|
||||
>
|
||||
<!-- Text Field -->
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user