mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-30 12:54:31 +01:00
refactor
This commit is contained in:
parent
7227b0c089
commit
f6fb4fee29
@ -198,27 +198,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
await this.viewCipher(cipherView);
|
await this.viewCipher(cipherView);
|
||||||
}
|
}
|
||||||
} else if (params.action === 'add') {
|
} else if (params.action === 'add') {
|
||||||
switch (params.addType) {
|
this.addType = Number(params.addType);
|
||||||
case 'Login':
|
|
||||||
case '1':
|
|
||||||
this.addType = CipherType.Login;
|
|
||||||
break;
|
|
||||||
case 'SecureNote':
|
|
||||||
case '2':
|
|
||||||
this.addType = CipherType.SecureNote;
|
|
||||||
break;
|
|
||||||
case 'Card':
|
|
||||||
case '3':
|
|
||||||
this.addType = CipherType.Card;
|
|
||||||
break;
|
|
||||||
case 'Identity':
|
|
||||||
case '4':
|
|
||||||
this.addType = CipherType.Identity;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.addType = CipherType.Login;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this.addCipher(this.addType);
|
this.addCipher(this.addType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user