diff --git a/frontend/package.json b/frontend/package.json index 975aaef..82a5cf5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^0.1002.0", - "@angular/cli": "~10.0.0", + "@angular/cli": "~10.2.0", "@angular/compiler-cli": "~10.0.0", "@angular/language-service": "~10.0.0", "@schematics/angular": "~9.1.0", diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 58ff262..fe2b67b 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -45,20 +45,25 @@ import { EffectsModule } from '@ngrx/effects'; strategies: [ NbPasswordAuthStrategy.setup({ name: 'email', + baseEndpoint: 'http://127.0.0.1:8000', login: { redirect: { - success: '/view/', + success: '/view', failure: null, }, + defaultErrors: ['Coś poszło nie tak, proszę spróbować ponownie.'], }, token: { class: NbAuthJWTToken, }, register: { + endpoint: '/user', + method: 'post', redirect: { - success: '/my-account/', + success: '/register-success', failure: null, }, + defaultErrors: ['Coś poszło nie tak, proszę spróbować ponownie.'], }, }), ], diff --git a/frontend/src/app/auth/auth-routing.module.ts b/frontend/src/app/auth/auth-routing.module.ts index cb91664..12e7c3a 100644 --- a/frontend/src/app/auth/auth-routing.module.ts +++ b/frontend/src/app/auth/auth-routing.module.ts @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { NbAuthComponent } from '@nebular/auth'; import { LoginComponent } from './login/login.component'; +import { RegisterSuccessComponent } from './register-success/register-success.component'; import { RegisterComponent } from './register/register.component'; export const routes: Routes = [ @@ -15,8 +16,12 @@ export const routes: Routes = [ }, { path: 'register', - component: RegisterComponent - } + component: RegisterComponent, + }, + { + path: 'register-success', + component: RegisterSuccessComponent, + }, ], }, ]; diff --git a/frontend/src/app/auth/auth.module.ts b/frontend/src/app/auth/auth.module.ts index a81d1d2..de793d8 100644 --- a/frontend/src/app/auth/auth.module.ts +++ b/frontend/src/app/auth/auth.module.ts @@ -13,6 +13,7 @@ import { } from '@nebular/theme'; import { LoginComponent } from './login/login.component'; import { RegisterComponent } from './register/register.component'; +import { RegisterSuccessComponent } from './register-success/register-success.component'; @NgModule({ imports: [ @@ -26,6 +27,6 @@ import { RegisterComponent } from './register/register.component'; AuthRoutingModule, NbAuthModule, ], - declarations: [LoginComponent, RegisterComponent], + declarations: [LoginComponent, RegisterComponent, RegisterSuccessComponent], }) export class AuthModule {} diff --git a/frontend/src/app/auth/register-success/register-success.component.html b/frontend/src/app/auth/register-success/register-success.component.html new file mode 100644 index 0000000..8500638 --- /dev/null +++ b/frontend/src/app/auth/register-success/register-success.component.html @@ -0,0 +1,9 @@ +
+ Udało się utworzyć konto o podanym adresie e-mail. Naciśnij przycisk, aby + kontynuować +
+ + diff --git a/frontend/src/app/auth/register-success/register-success.component.scss b/frontend/src/app/auth/register-success/register-success.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/app/auth/register-success/register-success.component.ts b/frontend/src/app/auth/register-success/register-success.component.ts new file mode 100644 index 0000000..a98cb64 --- /dev/null +++ b/frontend/src/app/auth/register-success/register-success.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'register-success', + templateUrl: './register-success.component.html', + styleUrls: ['./register-success.component.scss'] +}) +export class RegisterSuccessComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/frontend/src/app/auth/register/register.component.html b/frontend/src/app/auth/register/register.component.html index 066ae37..9751763 100644 --- a/frontend/src/app/auth/register/register.component.html +++ b/frontend/src/app/auth/register/register.component.html @@ -25,44 +25,6 @@