update
This commit is contained in:
parent
127f086bea
commit
d7b7bc7be0
3 changed files with 41 additions and 9 deletions
0
client/src/app/core/auth/auth.component.html
Normal file
0
client/src/app/core/auth/auth.component.html
Normal file
41
client/src/app/core/auth/auth.component.ts
Normal file
41
client/src/app/core/auth/auth.component.ts
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import { NgIf } from '@angular/common';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Form, FormControl, FormGroup } from '@angular/forms';
|
||||
import { RouterLink } from '@angular/router';
|
||||
|
||||
interface AuthForm {
|
||||
email: FormControl<string>;
|
||||
password: FormControl<string>;
|
||||
username?: FormControl<string>;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-auth-page',
|
||||
templateUrl: './auth.component.html',
|
||||
imports: [RouterLink, NgIf],
|
||||
standalone: true,
|
||||
})
|
||||
export class AuthComponent implements OnInit {
|
||||
authType = '';
|
||||
title = '';
|
||||
isSubmitting = false;
|
||||
authForm: FormGroup<AuthForm>;
|
||||
|
||||
constructor(
|
||||
private readonly route: ActivatedRoute,
|
||||
private readonly router: Router,
|
||||
private readonly userService: UserService
|
||||
) {
|
||||
// use FormBuilder to create a form group
|
||||
this.authForm = new FormGroup<AuthForm>({
|
||||
email: new FormControl('', {
|
||||
validators: [Validators.required],
|
||||
nonNullable: true,
|
||||
}),
|
||||
password: new FormControl('', {
|
||||
validators: [Validators.required],
|
||||
nonNullable: true,
|
||||
}),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -79,15 +79,6 @@
|
|||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p class="mt-10 text-center text-sm text-gray-500">
|
||||
Not a member?
|
||||
<a
|
||||
href="#"
|
||||
class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500"
|
||||
>Start a 14 day free trial</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue