From 234191e809fb5aaa9115be48ab1846ce6237e312 Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:48:18 -0700 Subject: [PATCH] fill out desktop template and submit() --- .../src/angular/login/login.component.html | 45 ++++++++++++++++++- .../auth/src/angular/login/login.component.ts | 15 ++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/libs/auth/src/angular/login/login.component.html b/libs/auth/src/angular/login/login.component.html index e78f08b904..b934129dea 100644 --- a/libs/auth/src/angular/login/login.component.html +++ b/libs/auth/src/angular/login/login.component.html @@ -100,7 +100,7 @@ +
@@ -218,4 +219,46 @@ + + +
+
+ + + {{ "masterPassword" | i18n }} + + + + + + + {{ "getMasterPasswordHint" | i18n }} + +
+ + + + + +
{{ "or" | i18n }}
+ + +
+
+ diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index 4c4f962460..f037d55956 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -97,7 +97,7 @@ export class LoginComponentV2 implements OnInit, OnDestroy { // Desktop properties deferFocus: boolean = null; // TODO-rr-bw: why initialize to null instead of false - showPassword = false; // TODO-rr-bw: is this still needed? + showPassword = false; // TODO-rr-bw: is this still needed? It seems we no longer need this now that we have bitPasswordInputToggle constructor( private activatedRoute: ActivatedRoute, @@ -153,6 +153,12 @@ export class LoginComponentV2 implements OnInit, OnDestroy { } submit = async (): Promise => { + if (this.clientType === ClientType.Desktop) { + if (!this.validatedEmail) { + return; + } + } + const { email, masterPassword } = this.formGroup.value; await this.setupCaptcha(); @@ -188,6 +194,13 @@ export class LoginComponentV2 implements OnInit, OnDestroy { await this.saveEmailSettings(); await this.handleAuthResult(authResult); + + if (this.clientType === ClientType.Desktop) { + if (this.captchaSiteKey) { + const content = document.getElementById("content") as HTMLDivElement; + content.setAttribute("style", "width:335px"); + } + } }; /**