diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 2e82469b47..59ca20cffa 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -19,6 +19,18 @@ "createAccount": { "message": "Create account" }, + "newToBitwarden": { + "message": "New to Bitwarden?" + }, + "logInWithPasskey": { + "message": "Log in with passkey" + }, + "useSingleSignOn": { + "message": "Use single sign-on" + }, + "welcomeBack": { + "message": "Welcome back" + }, "setAStrongPassword": { "message": "Set a strong password" }, diff --git a/apps/browser/src/popup/app-routing.module.ts b/apps/browser/src/popup/app-routing.module.ts index 5660fc33a9..f76c94a076 100644 --- a/apps/browser/src/popup/app-routing.module.ts +++ b/apps/browser/src/popup/app-routing.module.ts @@ -17,6 +17,7 @@ import { AnonLayoutWrapperComponent, AnonLayoutWrapperData, LoginComponentV2, + LoginSecondaryContentComponent, RegistrationFinishComponent, RegistrationStartComponent, RegistrationStartSecondaryComponent, @@ -403,6 +404,7 @@ const routes: Routes = [ }, // TODO-rr-bw: add `satisfies DataProperties & ExtensionAnonLayoutWrapperData children: [ { path: "", component: LoginComponentV2 }, + { path: "", component: LoginSecondaryContentComponent, outlet: "secondary" }, { path: "", component: EnvironmentSelectorComponent, outlet: "environment-selector" }, ], }, diff --git a/libs/auth/src/angular/login/login-secondary-content.component.ts b/libs/auth/src/angular/login/login-secondary-content.component.ts index e3badc7df0..0e1f209507 100644 --- a/libs/auth/src/angular/login/login-secondary-content.component.ts +++ b/libs/auth/src/angular/login/login-secondary-content.component.ts @@ -11,6 +11,9 @@ import { RegisterRouteService } from "@bitwarden/auth/common"; template: `
{{ "newToBitwarden" | i18n }} + {{ "createAccount" | i18n }} diff --git a/libs/auth/src/angular/login/login.component.html b/libs/auth/src/angular/login/login.component.html index 6c6d083c7c..b44ba64658 100644 --- a/libs/auth/src/angular/login/login.component.html +++ b/libs/auth/src/angular/login/login.component.html @@ -122,7 +122,53 @@
-
+ + + + {{ "emailAddress" | i18n }} + + + + + + + {{ "rememberEmail" | i18n }} + + +
+ + + + + + + + + + + {{ "useSingleSignOn" | i18n }} + +
+
diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index a379e3101a..b1f59af15d 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -224,6 +224,8 @@ export class LoginComponentV2 implements OnInit, OnDestroy { * @returns A simple `return` statement for each conditional check. * If you update this method, do not forget to add a `return` * to each if-condition block where necessary to stop code execution. + * + * TODO-rr-bw: is using returns a good approach, or should we stick with is/else if/else? */ private async handleAuthResult(authResult: AuthResult): Promise { if (this.handleCaptchaRequired(authResult)) { @@ -512,7 +514,6 @@ export class LoginComponentV2 implements OnInit, OnDestroy { private async webOnInit(): Promise { this.activatedRoute.queryParams.pipe(first(), takeUntil(this.destroy$)).subscribe((qParams) => { - // If there is a parameter called 'org', set previousUrl to `/create-organization?org=` if (qParams.org != null) { const route = this.router.createUrlTree(["create-organization"], { queryParams: { plan: qParams.org }, @@ -520,10 +521,9 @@ export class LoginComponentV2 implements OnInit, OnDestroy { this.loginService.setPreviousUrl(route); } - /** - * If there is a parameter called 'sponsorshipToken', they are coming from an email for sponsoring a families organization. - * Therefore set the prevousUrl to `/setup/families-for-enterprise?token=` - */ + /* If there is a parameter called 'sponsorshipToken', they are coming + from an email for sponsoring a families organization. Therefore set + the prevousUrl to /setup/families-for-enterprise?token= */ if (qParams.sponsorshipToken != null) { const route = this.router.createUrlTree(["setup/families-for-enterprise"], { queryParams: { token: qParams.sponsorshipToken },