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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user