mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-13 00:51:45 +01:00
add continue() method
This commit is contained in:
parent
c597b92dee
commit
167b246112
@ -174,7 +174,13 @@
|
||||
<!-- Email Address input -->
|
||||
<bit-form-field>
|
||||
<bit-label>{{ "emailAddress" | i18n }}</bit-label>
|
||||
<input type="email" formControlName="email" bitInput appAutofocus />
|
||||
<input
|
||||
type="email"
|
||||
formControlName="email"
|
||||
bitInput
|
||||
appAutofocus
|
||||
(keyup.enter)="continue()"
|
||||
/>
|
||||
</bit-form-field>
|
||||
|
||||
<!-- Remember Email input -->
|
||||
@ -185,7 +191,7 @@
|
||||
|
||||
<div class="tw-grid tw-gap-3">
|
||||
<!-- Continue button -->
|
||||
<button type="submit" bitButton buttonType="primary" (click)="validateEmail()">
|
||||
<button type="submit" bitButton buttonType="primary" (click)="continue()">
|
||||
<span> {{ "continue" | i18n }} </span>
|
||||
</button>
|
||||
|
||||
|
@ -351,6 +351,21 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
||||
await this.loginEmailService.saveEmailSettings();
|
||||
}
|
||||
|
||||
protected async continue(): Promise<void> {
|
||||
await this.validateEmail();
|
||||
|
||||
if (!this.formGroup.controls.email.valid) {
|
||||
this.toastService.showToast({
|
||||
variant: "error",
|
||||
title: this.i18nService.t("errorOccured"),
|
||||
message: this.i18nService.t("invalidEmail"),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.focusInput();
|
||||
}
|
||||
|
||||
private async getLoginWithDevice(email: string): Promise<void> {
|
||||
try {
|
||||
const deviceIdentifier = await this.appIdService.getAppId();
|
||||
|
Loading…
Reference in New Issue
Block a user