1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

addEditCipherInfo w/ collections from state

This commit is contained in:
Kyle Spearrin
2019-06-24 21:12:52 -04:00
parent db83b042ff
commit 6c7a0d90df
5 changed files with 12 additions and 4 deletions

View File

@@ -118,7 +118,11 @@ export class AddEditComponent extends BaseAddEditComponent {
async generatePassword(): Promise<boolean> {
const confirmed = await super.generatePassword();
if (confirmed) {
this.stateService.save('addEditCipher', this.cipher);
this.stateService.save('addEditCipherInfo', {
cipher: this.cipher,
collectionIds: this.collections == null ? [] :
this.collections.filter((c) => (c as any).checked).map((c) => c.id),
});
this.router.navigate(['generator']);
}
return confirmed;