mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
Add newField property to FieldView, used for allowing edits for new fields
This commit is contained in:
@@ -296,6 +296,7 @@ export class AddEditComponent implements OnInit {
|
|||||||
|
|
||||||
const f = new FieldView();
|
const f = new FieldView();
|
||||||
f.type = this.addFieldType;
|
f.type = this.addFieldType;
|
||||||
|
f.newField = true;
|
||||||
this.cipher.fields.push(f);
|
this.cipher.fields.push(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export class FieldView implements View {
|
|||||||
name: string = null;
|
name: string = null;
|
||||||
value: string = null;
|
value: string = null;
|
||||||
type: FieldType = null;
|
type: FieldType = null;
|
||||||
|
newField: boolean = false; // Marks if the filed is new and haven't been saved
|
||||||
|
|
||||||
constructor(f?: Field) {
|
constructor(f?: Field) {
|
||||||
if (!f) {
|
if (!f) {
|
||||||
|
|||||||
Reference in New Issue
Block a user