1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

routing updates

This commit is contained in:
Kyle Spearrin
2018-01-25 11:28:52 -05:00
parent 54c117bdc6
commit 15868ab541
2 changed files with 22 additions and 9 deletions

View File

@@ -46,18 +46,30 @@ export class VaultComponent implements OnInit {
}
viewCipher(id: string) {
if (this.action === 'view' && this.cipherId === id) {
return;
}
this.cipherId = id;
this.action = 'view';
this.go({ action: this.action, cipherId: id });
}
editCipher(id: string) {
if (this.action === 'edit' && this.cipherId === id) {
return;
}
this.cipherId = id;
this.action = 'edit';
this.go({ action: this.action, cipherId: id });
}
addCipher() {
if (this.action === 'add') {
return;
}
this.action = 'add';
this.go({ action: this.action });
}