This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve auth flow by parsing more error responses, redo form with reactive forms * Add error service, move validators to formbuilder instead of in template * Add loading page
- Loading branch information
Showing
32 changed files
with
413 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
14 changes: 14 additions & 0 deletions
14
src/app/core/auth/login-page/login/email-input/email-input.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<ng-container [formGroup]="parentForm"> | ||
<mdl-textfield | ||
type="text" | ||
id="emailInput" | ||
name="email" | ||
label="Email" | ||
autocomplete="email" | ||
error-msg="Please enter a valid email" | ||
floating-label | ||
autofocus | ||
[class.is-invalid]="f['email'].errors && (f['email'].dirty || f['email'].touched)" | ||
[formControlName]="'email'"> | ||
</mdl-textfield> | ||
</ng-container> |
22 changes: 22 additions & 0 deletions
22
src/app/core/auth/login-page/login/email-input/email-input.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Component, Input, OnInit} from '@angular/core'; | ||
import {FormGroup} from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'ix-email-input', | ||
templateUrl: './email-input.component.html', | ||
styleUrls: ['./email-input.component.css'] | ||
}) | ||
export class EmailInputComponent implements OnInit { | ||
|
||
@Input() parentForm: FormGroup; | ||
|
||
get f() { | ||
return this.parentForm.controls; | ||
} | ||
|
||
constructor() { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
27 changes: 27 additions & 0 deletions
27
src/app/core/auth/login-page/login/otp/otp-dialog/otp-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<mdl-dialog | ||
#otpDialog | ||
[mdl-dialog-config]="{ | ||
styles:{'width': '25rem'}, | ||
isModal:true, | ||
animate: false, | ||
enterTransitionDuration: 400, | ||
leaveTransitionDuration: 400}"> | ||
<form (ngSubmit)="submitForm()" [formGroup]="formGroup"> | ||
<h3 class="mdl-dialog__title">One-time password</h3> | ||
<div class="mdl-dialog__content"> | ||
<ix-otp-input | ||
[parentForm]="formGroup"> | ||
</ix-otp-input> | ||
</div> | ||
<div class="mdl-dialog__actions"> | ||
<button | ||
type="submit" | ||
mdl-button | ||
mdl-colored | ||
mdl-ripple | ||
[disabled]="!formGroup.valid"> | ||
Submit | ||
</button> | ||
</div> | ||
</form> | ||
</mdl-dialog> |
Oops, something went wrong.