mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +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'"
|
[attr.data-testid]="field.value.name + '-entry'"
|
||||||
cdkDrag
|
cdkDrag
|
||||||
|
[cdkDragDisabled]="!canEdit(field.value.type)"
|
||||||
#customFieldRow
|
#customFieldRow
|
||||||
>
|
>
|
||||||
<!-- Text Field -->
|
<!-- Text Field -->
|
||||||
|
|||||||
@@ -150,7 +150,9 @@ export class CustomFieldsComponent implements OnInit, AfterViewInit {
|
|||||||
canEdit(type: FieldType): boolean {
|
canEdit(type: FieldType): boolean {
|
||||||
return (
|
return (
|
||||||
!this.isPartialEdit &&
|
!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