From 302876b2f744673c265f24493f438b3355238d5d Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Fri, 5 May 2023 09:05:50 +0200 Subject: [PATCH] [PM-2014] feat: add icons and other content --- .../create-credential-dialog.component.html | 28 +++++++++++++++++-- .../create-credential-dialog.component.ts | 6 ++++ .../create-passkey-failed.icon.ts | 28 +++++++++++++++++++ .../create-passkey.icon.ts | 26 +++++++++++++++++ apps/web/src/locales/en/messages.json | 12 ++++++++ 5 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey-failed.icon.ts create mode 100644 apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey.icon.ts diff --git a/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.html b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.html index d4c57c7183..9b3691ee2e 100644 --- a/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.html +++ b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.html @@ -4,7 +4,7 @@ >{{ "loginWithPasskey" | i18n }} {{ "newPasskey" | i18n }} - +

{{ "passkeyEnterMasterPassword" | i18n }} @@ -16,7 +16,22 @@ {{ "confirmIdentity" | i18n }} - + +

+ +

{{ "readingPasskeyLoading" | i18n }}

+

{{ "readingPasskeyLoadingInfo" | i18n }}

+
+ +
+ +

{{ "errorReadingPasskey" | i18n }}

+

{{ "errorReadingPasskeyInfo" | i18n }}

+
+
- diff --git a/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.ts b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.ts index 3740b9f52b..d959de1ebb 100644 --- a/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.ts +++ b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-credential-dialog.component.ts @@ -4,6 +4,9 @@ import { FormBuilder, Validators } from "@angular/forms"; import { DialogService } from "@bitwarden/components"; +import { CreatePasskeyFailedIcon } from "./create-passkey-failed.icon"; +import { CreatePasskeyIcon } from "./create-passkey.icon"; + export enum CreateCredentialDialogResult { Success, Canceled, @@ -19,6 +22,9 @@ type Step = templateUrl: "create-credential-dialog.component.html", }) export class CreateCredentialDialogComponent { + protected readonly CreateCredentialDialogResult = CreateCredentialDialogResult; + protected readonly Icons = { CreatePasskeyIcon, CreatePasskeyFailedIcon }; + protected currentStep: Step = "userVerification"; protected formGroup = this.formBuilder.group({ userVerification: this.formBuilder.group({ diff --git a/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey-failed.icon.ts b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey-failed.icon.ts new file mode 100644 index 0000000000..39a2389c5a --- /dev/null +++ b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey-failed.icon.ts @@ -0,0 +1,28 @@ +import { svgIcon } from "@bitwarden/components"; + +export const CreatePasskeyFailedIcon = svgIcon` + + + + + + + + + + + +`; diff --git a/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey.icon.ts b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey.icon.ts new file mode 100644 index 0000000000..c0e984bbee --- /dev/null +++ b/apps/web/src/app/settings/fido2-login-settings/create-credential-dialog/create-passkey.icon.ts @@ -0,0 +1,26 @@ +import { svgIcon } from "@bitwarden/components"; + +export const CreatePasskeyIcon = svgIcon` + + + + + + + + + + +`; diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index b4926ac744..4b11fc9a01 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -643,6 +643,18 @@ "passkeyEnterMasterPassword": { "message": "Enter your master password to modify log in with passkey settings." }, + "readingPasskeyLoading": { + "message": "Reading passkey..." + }, + "readingPasskeyLoadingInfo": { + "message": "Keep this window open and follow prompts from your browser." + }, + "errorReadingPasskey": { + "message": "Error reading passkey" + }, + "errorReadingPasskeyInfo": { + "message": "There was a problem reading your passkey." + }, "tryAgain": { "message": "Try again" },