diff --git a/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.html b/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.html index f691a931db..c3da6c0a95 100644 --- a/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.html +++ b/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.html @@ -8,12 +8,20 @@ {{ "website" | i18n }} - + diff --git a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html index 68c56c125d..10b0a1a07c 100644 --- a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html +++ b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html @@ -23,7 +23,7 @@ [valueLabel]="'username' | i18n" showToast [appA11yTitle]="'copyValue' | i18n" - data-testid="toggle-username" + data-testid="copy-username" > @@ -74,6 +74,17 @@ [showCount]="true" > + + {{ "typePasskey" | i18n }} + + {{ "verificationCodeTotp" | i18n }} diff --git a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts index 880fbffc7b..d8683a4407 100644 --- a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts +++ b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts @@ -1,10 +1,11 @@ -import { CommonModule } from "@angular/common"; -import { Component, Input } from "@angular/core"; +import { CommonModule, DatePipe } from "@angular/common"; +import { Component, inject, Input } from "@angular/core"; import { Router } from "@angular/router"; import { Observable, shareReplay } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { CardComponent, @@ -47,12 +48,23 @@ export class LoginCredentialsViewComponent { showPasswordCount: boolean = false; passwordRevealed: boolean = false; totpCopyCode: string; + private datePipe = inject(DatePipe); constructor( private billingAccountProfileStateService: BillingAccountProfileStateService, private router: Router, + private i18nService: I18nService, ) {} + get fido2CredentialCreationDateValue(): string { + const dateCreated = this.i18nService.t("dateCreated"); + const creationDate = this.datePipe.transform( + this.cipher.login.fido2Credentials[0]?.creationDate, + "short", + ); + return `${dateCreated} ${creationDate}`; + } + async getPremium() { await this.router.navigate(["/premium"]); }