mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
add continue() method
This commit is contained in:
@@ -174,7 +174,13 @@
|
|||||||
<!-- Email Address input -->
|
<!-- Email Address input -->
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
<bit-label>{{ "emailAddress" | i18n }}</bit-label>
|
<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>
|
</bit-form-field>
|
||||||
|
|
||||||
<!-- Remember Email input -->
|
<!-- Remember Email input -->
|
||||||
@@ -185,7 +191,7 @@
|
|||||||
|
|
||||||
<div class="tw-grid tw-gap-3">
|
<div class="tw-grid tw-gap-3">
|
||||||
<!-- Continue button -->
|
<!-- Continue button -->
|
||||||
<button type="submit" bitButton buttonType="primary" (click)="validateEmail()">
|
<button type="submit" bitButton buttonType="primary" (click)="continue()">
|
||||||
<span> {{ "continue" | i18n }} </span>
|
<span> {{ "continue" | i18n }} </span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -351,6 +351,21 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
|||||||
await this.loginEmailService.saveEmailSettings();
|
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> {
|
private async getLoginWithDevice(email: string): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const deviceIdentifier = await this.appIdService.getAppId();
|
const deviceIdentifier = await this.appIdService.getAppId();
|
||||||
|
|||||||
Reference in New Issue
Block a user