1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

Implement personal item cloning capability (#1129)

* Initial pass of clone item

* Updated npm sub:pull script to include target branches

* Made requested changes

* Formatting changes

* Fixed lint warnings
This commit is contained in:
Vincent Salucci
2020-02-04 15:08:13 -06:00
committed by GitHub
parent a00fa10214
commit c57340c4f3
8 changed files with 61 additions and 11 deletions

View File

@@ -58,6 +58,10 @@ export class AddEditComponent extends BaseAddEditComponent {
this.type = type;
}
this.editMode = !params.cipherId;
if (params.cloneMode != null) {
this.cloneMode = params.cloneMode === true;
}
await this.load();
if (!this.editMode) {
@@ -86,7 +90,11 @@ export class AddEditComponent extends BaseAddEditComponent {
async submit(): Promise<boolean> {
if (await super.submit()) {
this.location.back();
if (this.cloneMode) {
this.router.navigate(['/tabs/vault']);
} else {
this.location.back();
}
return true;
}