diff --git a/jslib b/jslib index bc5a6e02c1..24ffb55ce0 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit bc5a6e02c106dc87413f22b7c7cb0334c1fc6e88 +Subproject commit 24ffb55ce0e781fb06cd04d318e9f70afe80d734 diff --git a/package.json b/package.json index a996df7194..bafaf8a4c2 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "sub:update": "git submodule update --remote", "sub:pull": "git submodule foreach git pull", "postinstall": "npm run sub:init && gulp postinstall", + "simlink:win": "rm -rf ./jslib && cmd /c mklink /J .\\jslib ..\\jslib", "build": "gulp build && webpack", "build:watch": "gulp build && webpack --watch", "build:prod": "gulp build && cross-env NODE_ENV=production webpack", diff --git a/src/popup/app.component.ts b/src/popup/app.component.ts index 9c056119a5..ca0d6a3d02 100644 --- a/src/popup/app.component.ts +++ b/src/popup/app.component.ts @@ -144,7 +144,7 @@ export class AppComponent implements OnInit { this.stateService.remove('CiphersComponent'); } if (url.startsWith('/tabs/')) { - this.stateService.remove('addEditCipher'); + this.stateService.remove('addEditCipherInfo'); } (window as any).previousPopupUrl = url; diff --git a/src/popup/generator/password-generator.component.ts b/src/popup/generator/password-generator.component.ts index 67874aa032..478eac2dc1 100644 --- a/src/popup/generator/password-generator.component.ts +++ b/src/popup/generator/password-generator.component.ts @@ -27,7 +27,10 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent { async ngOnInit() { await super.ngOnInit(); - this.cipherState = await this.stateService.get('addEditCipher'); + const addEditCipherInfo = await this.stateService.get('addEditCipherInfo'); + if (addEditCipherInfo != null) { + this.cipherState = addEditCipherInfo.cipher; + } this.showSelect = this.cipherState != null; } diff --git a/src/popup/vault/add-edit.component.ts b/src/popup/vault/add-edit.component.ts index ff7f755c09..080399e348 100644 --- a/src/popup/vault/add-edit.component.ts +++ b/src/popup/vault/add-edit.component.ts @@ -118,7 +118,11 @@ export class AddEditComponent extends BaseAddEditComponent { async generatePassword(): Promise { 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;