From b8670e5336708fef4098ef0d4b3fa15a497630af Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 18 Oct 2018 17:13:27 +0200 Subject: adding minimum signup age conforming to ceiling GPDR age It is not yet configurable and should be made so as GDPR (or other regulations for that matter) can specify other minimum age requirements. --- client/src/app/signup/signup.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/src/app/signup') diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html index aad4b5be3..531a97814 100644 --- a/client/src/app/signup/signup.component.html +++ b/client/src/app/signup/signup.component.html @@ -51,7 +51,7 @@
-- cgit v1.2.3 From d8c9996ce2b4de3ef1f2d36f63e461006bab58ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Nov 2018 17:02:21 +0100 Subject: Improve message visibility on signup --- client/src/app/signup/signup.component.html | 3 ++- client/src/app/signup/signup.component.ts | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'client/src/app/signup') diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html index 531a97814..0207a166e 100644 --- a/client/src/app/signup/signup.component.html +++ b/client/src/app/signup/signup.component.html @@ -4,6 +4,7 @@ Create an account
+
{{ info }}
{{ error }}
@@ -59,7 +60,7 @@
- +
diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts index cf2657b85..607d64893 100644 --- a/client/src/app/signup/signup.component.ts +++ b/client/src/app/signup/signup.component.ts @@ -12,7 +12,9 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val styleUrls: [ './signup.component.scss' ] }) export class SignupComponent extends FormReactive implements OnInit { + info: string = null error: string = null + signupDone = false constructor ( protected formValidatorService: FormValidatorService, @@ -50,17 +52,17 @@ export class SignupComponent extends FormReactive implements OnInit { this.userService.signup(userCreate).subscribe( () => { + this.signupDone = true + if (this.requiresEmailVerification) { - this.notificationsService.alert( - this.i18n('Welcome'), - this.i18n('Please check your email to verify your account and complete signup.') - ) - } else { - this.notificationsService.success( - this.i18n('Success'), - this.i18n('Registration for {{username}} complete.', { username: userCreate.username }) - ) + this.info = this.i18n('Welcome! Now please check your emails to verify your account and complete signup.') + return } + + this.notificationsService.success( + this.i18n('Success'), + this.i18n('Registration for {{username}} complete.', { username: userCreate.username }) + ) this.redirectService.redirectToHomepage() }, -- cgit v1.2.3 From 43e9d2af7d3525bc709e4c6d15fe85f65795f5fa Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Nov 2018 17:06:19 +0100 Subject: Auto login user on signup --- client/src/app/signup/signup.component.ts | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'client/src/app/signup') diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts index 607d64893..3341d4e09 100644 --- a/client/src/app/signup/signup.component.ts +++ b/client/src/app/signup/signup.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core' import { NotificationsService } from 'angular2-notifications' import { UserCreate } from '../../../../shared' import { FormReactive, UserService, UserValidatorsService } from '../shared' -import { RedirectService, ServerService } from '@app/core' +import { AuthService, RedirectService, ServerService } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' @@ -18,6 +18,7 @@ export class SignupComponent extends FormReactive implements OnInit { constructor ( protected formValidatorService: FormValidatorService, + private authService: AuthService, private userValidatorsService: UserValidatorsService, private notificationsService: NotificationsService, private userService: UserService, @@ -59,11 +60,20 @@ export class SignupComponent extends FormReactive implements OnInit { return } - this.notificationsService.success( - this.i18n('Success'), - this.i18n('Registration for {{username}} complete.', { username: userCreate.username }) - ) - this.redirectService.redirectToHomepage() + // Auto login + this.authService.login(userCreate.username, userCreate.password) + .subscribe( + () => { + this.notificationsService.success( + this.i18n('Success'), + this.i18n('You are now logged in as {{username}}!', { username: userCreate.username }) + ) + + this.redirectService.redirectToHomepage() + }, + + err => this.error = err.message + ) }, err => this.error = err.message -- cgit v1.2.3 From 56af5222c1ab3d6aaa76b1237bfa381ecc4878b1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Dec 2018 14:53:13 +0100 Subject: Put features table in about page --- client/src/app/signup/signup.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/src/app/signup') diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html index 0207a166e..07d24b381 100644 --- a/client/src/app/signup/signup.component.html +++ b/client/src/app/signup/signup.component.html @@ -64,7 +64,7 @@
- +
-- cgit v1.2.3 From f8b2c1b4f509c037b9650cca2c5befd21f056df3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Dec 2018 16:04:34 +0100 Subject: Refractor notification service Shorter name and use primeng component --- client/src/app/signup/signup.component.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'client/src/app/signup') diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts index 3341d4e09..13941ec79 100644 --- a/client/src/app/signup/signup.component.ts +++ b/client/src/app/signup/signup.component.ts @@ -1,8 +1,7 @@ import { Component, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { AuthService, Notifier, RedirectService, ServerService } from '@app/core' import { UserCreate } from '../../../../shared' import { FormReactive, UserService, UserValidatorsService } from '../shared' -import { AuthService, RedirectService, ServerService } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' @@ -20,7 +19,7 @@ export class SignupComponent extends FormReactive implements OnInit { protected formValidatorService: FormValidatorService, private authService: AuthService, private userValidatorsService: UserValidatorsService, - private notificationsService: NotificationsService, + private notifier: Notifier, private userService: UserService, private serverService: ServerService, private redirectService: RedirectService, @@ -64,10 +63,7 @@ export class SignupComponent extends FormReactive implements OnInit { this.authService.login(userCreate.username, userCreate.password) .subscribe( () => { - this.notificationsService.success( - this.i18n('Success'), - this.i18n('You are now logged in as {{username}}!', { username: userCreate.username }) - ) + this.notifier.success(this.i18n('You are now logged in as {{username}}!', { username: userCreate.username })) this.redirectService.redirectToHomepage() }, -- cgit v1.2.3