+
{{errorMessage|authMessage}}
diff --git a/src/app/modules/user/login/login.component.ts b/src/app/modules/user/login/login.component.ts
index a4dc39b..837f6cb 100644
--- a/src/app/modules/user/login/login.component.ts
+++ b/src/app/modules/user/login/login.component.ts
@@ -1,7 +1,7 @@
import {Component, OnInit} from '@angular/core';
import {FormControl, FormGroup, Validators} from '@angular/forms';
-import {AngularFireAuth} from '@angular/fire/auth';
import {Router} from '@angular/router';
+import {UserService} from '../../../services/user.service';
@Component({
selector: 'app-login',
@@ -12,7 +12,7 @@ export class LoginComponent implements OnInit {
public form: FormGroup;
public errorMessage: string;
- constructor(public afAuth: AngularFireAuth, private router: Router) {
+ constructor(private userService: UserService, private router: Router) {
}
ngOnInit() {
@@ -26,7 +26,7 @@ export class LoginComponent implements OnInit {
this.form.updateValueAndValidity();
if (this.form.valid) {
try {
- await this.afAuth.auth.signInWithEmailAndPassword(this.form.value.user, this.form.value.pass);
+ await this.userService.login(this.form.value.user, this.form.value.pass);
await this.router.navigateByUrl('/');
} catch (ex) {
this.errorMessage = ex.code;
diff --git a/src/app/modules/user/logout/logout.component.ts b/src/app/modules/user/logout/logout.component.ts
index 0acb371..b9d4e11 100644
--- a/src/app/modules/user/logout/logout.component.ts
+++ b/src/app/modules/user/logout/logout.component.ts
@@ -1,6 +1,6 @@
import {AfterViewInit, Component} from '@angular/core';
-import {AngularFireAuth} from '@angular/fire/auth';
import {Router} from '@angular/router';
+import {UserService} from '../../../services/user.service';
@Component({
selector: 'app-logout',
@@ -8,11 +8,11 @@ import {Router} from '@angular/router';
styleUrls: ['./logout.component.less']
})
export class LogoutComponent implements AfterViewInit {
- constructor(public afAuth: AngularFireAuth, private router: Router) {
+ constructor(private userService: UserService, private router: Router) {
}
public async ngAfterViewInit() {
- await this.afAuth.auth.signOut();
+ await this.userService.logout();
await this.router.navigateByUrl('/');
}
}
diff --git a/src/app/modules/user/password-send/password-send.component.html b/src/app/modules/user/password-send/password-send.component.html
new file mode 100644
index 0000000..3a80618
--- /dev/null
+++ b/src/app/modules/user/password-send/password-send.component.html
@@ -0,0 +1,4 @@
+