mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
addEditCipherInfo w/ collections from state
This commit is contained in:
parent
db83b042ff
commit
6c7a0d90df
2
jslib
2
jslib
@ -1 +1 @@
|
|||||||
Subproject commit bc5a6e02c106dc87413f22b7c7cb0334c1fc6e88
|
Subproject commit 24ffb55ce0e781fb06cd04d318e9f70afe80d734
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user