1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

PM-10982 add passkey field in login view. add testid for qa (#10634)

This commit is contained in:
Jason Ng
2024-08-22 16:38:41 -04:00
committed by GitHub
parent 404d514e53
commit 887d1924a3
3 changed files with 36 additions and 4 deletions

View File

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