Fix missing i18n and block ssh key creation in web (#12082)

This commit is contained in:
Bernd Schoolmann 2024-11-26 14:00:18 -08:00 committed by GitHub
parent 85c6fe332d
commit a95eaeb6f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -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());
}
}

View File

@ -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) {