mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
addEditCipherInfo w/ collections from state
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: bc5a6e02c1...24ffb55ce0
@@ -6,6 +6,7 @@
|
|||||||
"sub:update": "git submodule update --remote",
|
"sub:update": "git submodule update --remote",
|
||||||
"sub:pull": "git submodule foreach git pull",
|
"sub:pull": "git submodule foreach git pull",
|
||||||
"postinstall": "npm run sub:init && gulp postinstall",
|
"postinstall": "npm run sub:init && gulp postinstall",
|
||||||
|
"simlink:win": "rm -rf ./jslib && cmd /c mklink /J .\\jslib ..\\jslib",
|
||||||
"build": "gulp build && webpack",
|
"build": "gulp build && webpack",
|
||||||
"build:watch": "gulp build && webpack --watch",
|
"build:watch": "gulp build && webpack --watch",
|
||||||
"build:prod": "gulp build && cross-env NODE_ENV=production webpack",
|
"build:prod": "gulp build && cross-env NODE_ENV=production webpack",
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export class AppComponent implements OnInit {
|
|||||||
this.stateService.remove('CiphersComponent');
|
this.stateService.remove('CiphersComponent');
|
||||||
}
|
}
|
||||||
if (url.startsWith('/tabs/')) {
|
if (url.startsWith('/tabs/')) {
|
||||||
this.stateService.remove('addEditCipher');
|
this.stateService.remove('addEditCipherInfo');
|
||||||
}
|
}
|
||||||
(window as any).previousPopupUrl = url;
|
(window as any).previousPopupUrl = url;
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
|
|||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
this.cipherState = await this.stateService.get<CipherView>('addEditCipher');
|
const addEditCipherInfo = await this.stateService.get<any>('addEditCipherInfo');
|
||||||
|
if (addEditCipherInfo != null) {
|
||||||
|
this.cipherState = addEditCipherInfo.cipher;
|
||||||
|
}
|
||||||
this.showSelect = this.cipherState != null;
|
this.showSelect = this.cipherState != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,11 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
async generatePassword(): Promise<boolean> {
|
async generatePassword(): Promise<boolean> {
|
||||||
const confirmed = await super.generatePassword();
|
const confirmed = await super.generatePassword();
|
||||||
if (confirmed) {
|
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']);
|
this.router.navigate(['generator']);
|
||||||
}
|
}
|
||||||
return confirmed;
|
return confirmed;
|
||||||
|
|||||||
Reference in New Issue
Block a user