diff --git a/src/app/_modules/auth/auth-modal/auth-modal.component.html b/src/app/_modules/auth/auth-modal/auth-modal.component.html
new file mode 100644
index 0000000..1507c29
--- /dev/null
+++ b/src/app/_modules/auth/auth-modal/auth-modal.component.html
@@ -0,0 +1,21 @@
+
+
+
Вход в систему
+ Регистрация
+ Восстановление пароля
+ Сброс пароля
+
+
+
+
diff --git a/src/app/_modules/widget/modal/modal.component.scss b/src/app/_modules/auth/auth-modal/auth-modal.component.scss
similarity index 100%
rename from src/app/_modules/widget/modal/modal.component.scss
rename to src/app/_modules/auth/auth-modal/auth-modal.component.scss
diff --git a/src/app/_modules/auth/auth-modal/auth-modal.component.ts b/src/app/_modules/auth/auth-modal/auth-modal.component.ts
new file mode 100644
index 0000000..da9c4e1
--- /dev/null
+++ b/src/app/_modules/auth/auth-modal/auth-modal.component.ts
@@ -0,0 +1,24 @@
+import { Component } from '@angular/core';
+import {Router} from "@angular/router";
+
+@Component({
+ selector: 'auth-modal',
+ templateUrl: './auth-modal.component.html',
+ styleUrls: ['./auth-modal.component.scss']
+})
+export class AuthModalComponent {
+ constructor(private router: Router) {
+ }
+
+ get url() {
+ let str = this.router.url
+ return str.substring(
+ str.indexOf(':') + 1,
+ str.lastIndexOf(')')
+ );
+ }
+
+ close() {
+ this.router.navigate([{outlets: {auth: null}}]).then();
+ }
+}
diff --git a/src/app/_modules/auth/auth.module.ts b/src/app/_modules/auth/auth.module.ts
index ed5eab6..fa7bf50 100644
--- a/src/app/_modules/auth/auth.module.ts
+++ b/src/app/_modules/auth/auth.module.ts
@@ -9,12 +9,18 @@ import {AuthFormPasswordResetComponent} from "@app/_modules/auth/forms/reset/aut
import {AuthFormSignupComponent} from "@app/_modules/auth/forms/signup/auth-form-signup.component";
import {AuthPageComponent} from "@app/_modules/auth/page/auth-page.component";
import {NotAuthGuard} from "@app/_helpers/not-auth.guard";
+import { AuthModalComponent } from './auth-modal/auth-modal.component';
+import { WidjetModule } from '../widjet/widjet.module';
const routes = [
{path: 'login', component: AuthPageComponent, canActivate: [NotAuthGuard]},
+ {path: 'login', component: AuthModalComponent, canActivate: [NotAuthGuard], outlet: 'auth'},
{path: 'signup', component: AuthPageComponent, canActivate: [NotAuthGuard]},
+ {path: 'signup', component: AuthModalComponent, canActivate: [NotAuthGuard], outlet: 'auth'},
{path: 'password/forget', component: AuthPageComponent, canActivate: [NotAuthGuard]},
- {path: 'password/reset/:token/:email', component: AuthPageComponent, canActivate: [NotAuthGuard]}
+ {path: 'password/forget', component: AuthModalComponent, canActivate: [NotAuthGuard], outlet: 'auth'},
+ {path: 'password/reset/:token/:email', component: AuthPageComponent, canActivate: [NotAuthGuard]},
+ {path: 'password/reset/:token/:email', component: AuthPageComponent, canActivate: [NotAuthGuard], outlet: 'auth'}
];
@NgModule({
@@ -23,17 +29,20 @@ const routes = [
FormsModule,
ReactiveFormsModule,
CommonModule,
+ WidjetModule,
RouterModule.forRoot(routes)
],
exports: [
],
declarations: [
+ AuthModalComponent,
AuthPageComponent,
AuthFormLoginComponent,
AuthFormSignupComponent,
AuthFormPasswordForgetComponent,
- AuthFormPasswordResetComponent
+ AuthFormPasswordResetComponent,
+ AuthModalComponent
],
})
export class AuthModule {}
diff --git a/src/app/_modules/auth/forms/forget/auth-form-password-forget.component.html b/src/app/_modules/auth/forms/forget/auth-form-password-forget.component.html
index cac3db7..94a514d 100644
--- a/src/app/_modules/auth/forms/forget/auth-form-password-forget.component.html
+++ b/src/app/_modules/auth/forms/forget/auth-form-password-forget.component.html
@@ -1,4 +1,3 @@
-Восстановление пароля