1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-25 21:51:30 +01:00

[PM-2014] feat: add passkey naming ui

This commit is contained in:
Andreas Coroiu 2023-05-08 16:26:17 +02:00
parent 4e052346bf
commit 92e97d722b
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A
3 changed files with 37 additions and 1 deletions

View File

@ -32,7 +32,20 @@
<p bitTypography="body1">{{ "errorCreatingPasskeyInfo" | i18n }}</p> <p bitTypography="body1">{{ "errorCreatingPasskeyInfo" | i18n }}</p>
</div> </div>
<div *ngIf="currentStep === 'credentialNaming'">Name your credential plz</div> <div *ngIf="currentStep === 'credentialNaming'">
<h3 bitTypography="h3">{{ "passkeySuccessfullyCreated" | i18n }}</h3>
<p bitTypography="body1">
{{ "customPasskeyNameInfo" | i18n }}
</p>
<bit-form-field disableMargin formGroupName="credentialNaming">
<bit-label>{{ "customName" | i18n }}</bit-label>
<input type="text" bitInput formControlName="name" />
<bit-hint>{{
"charactersCurrentAndMaximum"
| i18n : formGroup.value.credentialNaming.name.length : NameMaxCharacters
}}</bit-hint>
</bit-form-field>
</div>
</ng-container> </ng-container>
<ng-container bitDialogFooter> <ng-container bitDialogFooter>
<button type="submit" bitButton bitFormButton buttonType="primary"> <button type="submit" bitButton bitFormButton buttonType="primary">

View File

@ -26,6 +26,7 @@ type Step =
templateUrl: "create-credential-dialog.component.html", templateUrl: "create-credential-dialog.component.html",
}) })
export class CreateCredentialDialogComponent { export class CreateCredentialDialogComponent {
protected readonly NameMaxCharacters = 50;
protected readonly CreateCredentialDialogResult = CreateCredentialDialogResult; protected readonly CreateCredentialDialogResult = CreateCredentialDialogResult;
protected readonly Icons = { CreatePasskeyIcon, CreatePasskeyFailedIcon }; protected readonly Icons = { CreatePasskeyIcon, CreatePasskeyFailedIcon };

View File

@ -655,6 +655,15 @@
"errorCreatingPasskeyInfo": { "errorCreatingPasskeyInfo": {
"message": "There was a problem creating your passkey." "message": "There was a problem creating your passkey."
}, },
"passkeySuccessfullyCreated": {
"message": "Passkey successfully created!"
},
"customName": {
"message": "Custom name"
},
"customPasskeyNameInfo": {
"message": "Name your passkey to help you identify it."
},
"tryAgain": { "tryAgain": {
"message": "Try again" "message": "Try again"
}, },
@ -5389,6 +5398,19 @@
"required": { "required": {
"message": "required" "message": "required"
}, },
"charactersCurrentAndMaximum": {
"message": "$CURRENT$/$MAX$ character maximum",
"placeholders": {
"current": {
"content": "$1",
"example": "0"
},
"max": {
"content": "$2",
"example": "100"
}
}
},
"characterMaximum": { "characterMaximum": {
"message": "$MAX$ character maximum", "message": "$MAX$ character maximum",
"placeholders": { "placeholders": {