Fix missing i18n and block ssh key creation in web (#12082)
This commit is contained in:
parent
85c6fe332d
commit
a95eaeb6f5
|
@ -130,6 +130,8 @@ export class AddEditComponentV2 implements OnInit {
|
|||
return this.i18nService.t(partOne, this.i18nService.t("typeIdentity").toLowerCase());
|
||||
case CipherType.SecureNote:
|
||||
return this.i18nService.t(partOne, this.i18nService.t("note").toLowerCase());
|
||||
case CipherType.SshKey:
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeSshKey").toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,6 +100,14 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
|
|||
async ngOnInit() {
|
||||
await super.ngOnInit();
|
||||
await this.load();
|
||||
|
||||
// https://bitwarden.atlassian.net/browse/PM-10413
|
||||
// cannot generate ssh keys so block creation
|
||||
if (this.type === CipherType.SshKey && this.cipherId == null) {
|
||||
this.type = CipherType.Login;
|
||||
this.cipher.type = CipherType.Login;
|
||||
}
|
||||
|
||||
this.viewOnly = !this.cipher.edit && this.editMode;
|
||||
// remove when all the title for all clients are updated to New Item
|
||||
if (this.cloneMode || !this.editMode) {
|
||||
|
|
Loading…
Reference in New Issue