1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-02 08:40:08 +01:00

Added missed clone mode conditionals and fixed add/edit state bug (#385)

This commit is contained in:
Vincent Salucci 2020-02-19 13:59:38 -06:00 committed by GitHub
parent 11f39fe781
commit 5254c5ae59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View File

@ -237,12 +237,13 @@
<input id="favorite" type="checkbox" name="Favorite" [(ngModel)]="cipher.favorite">
</div>
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
(click)="attachments()" *ngIf="editMode" role="button">
(click)="attachments()" *ngIf="editMode && !cloneMode" role="button">
<div class="row-main">{{'attachments' | i18n}}</div>
<i class="fa fa-chevron-right row-sub-icon" aria-hidden="true"></i>
</a>
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
(click)="editCollections()" *ngIf="editMode && !cloneMode && cipher.organizationId" role="button">
(click)="editCollections()" *ngIf="editMode && !cloneMode && cipher.organizationId"
role="button">
<div class="row-main">{{'collections' | i18n}}</div>
<i class="fa fa-chevron-right row-sub-icon" aria-hidden="true"></i>
</a>
@ -361,4 +362,4 @@
</button>
</div>
</div>
</form>
</form>

View File

@ -36,6 +36,11 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges
async ngOnChanges() {
await super.init();
await super.load();
await this.load();
}
async load() {
this.cipher = null;
super.load();
}
}

View File

@ -611,7 +611,7 @@ export class VaultComponent implements OnInit, OnDestroy {
}
private dirtyInput(): boolean {
return (this.action === 'add' || this.action === 'edit') &&
return (this.action === 'add' || this.action === 'edit' || this.action === 'clone') &&
document.querySelectorAll('app-vault-add-edit .ng-dirty').length > 0;
}