aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-17 11:47:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-17 15:12:55 +0200
commit7ed1edbbe4ffbef28093e4f5630751cb652814e4 (patch)
tree831862165dbfce593447a517c2294a7a4c28d840 /client/src/app/+my-account/my-account-settings
parent1a95f0b9627f8016767a5a386620cbc3335d5f93 (diff)
downloadPeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.gz
PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.zst
PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.zip
We don't need services anymore for validators
Diffstat (limited to 'client/src/app/+my-account/my-account-settings')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts10
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts10
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts10
3 files changed, 15 insertions, 15 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
index 396936ef3..b2b7849c2 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
@@ -2,7 +2,8 @@ import { forkJoin } from 'rxjs'
2import { tap } from 'rxjs/operators' 2import { tap } from 'rxjs/operators'
3import { Component, OnInit } from '@angular/core' 3import { Component, OnInit } from '@angular/core'
4import { AuthService, ServerService, UserService } from '@app/core' 4import { AuthService, ServerService, UserService } from '@app/core'
5import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' 5import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
6import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
6import { User } from '@shared/models' 7import { User } from '@shared/models'
7 8
8@Component({ 9@Component({
@@ -17,18 +18,17 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni
17 18
18 constructor ( 19 constructor (
19 protected formValidatorService: FormValidatorService, 20 protected formValidatorService: FormValidatorService,
20 private userValidatorsService: UserValidatorsService,
21 private authService: AuthService, 21 private authService: AuthService,
22 private userService: UserService, 22 private userService: UserService,
23 private serverService: ServerService 23 private serverService: ServerService
24 ) { 24 ) {
25 super() 25 super()
26 } 26 }
27 27
28 ngOnInit () { 28 ngOnInit () {
29 this.buildForm({ 29 this.buildForm({
30 'new-email': this.userValidatorsService.USER_EMAIL, 30 'new-email': USER_EMAIL_VALIDATOR,
31 'password': this.userValidatorsService.USER_PASSWORD 31 'password': USER_PASSWORD_VALIDATOR
32 }) 32 })
33 33
34 this.user = this.authService.getUser() 34 this.user = this.authService.getUser()
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
index 91fe4ec72..ba68bab32 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
@@ -1,7 +1,8 @@
1import { filter } from 'rxjs/operators' 1import { filter } from 'rxjs/operators'
2import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
3import { AuthService, Notifier, UserService } from '@app/core' 3import { AuthService, Notifier, UserService } from '@app/core'
4import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' 4import { USER_CONFIRM_PASSWORD_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
5import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5import { User } from '@shared/models' 6import { User } from '@shared/models'
6 7
7@Component({ 8@Component({
@@ -15,7 +16,6 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On
15 16
16 constructor ( 17 constructor (
17 protected formValidatorService: FormValidatorService, 18 protected formValidatorService: FormValidatorService,
18 private userValidatorsService: UserValidatorsService,
19 private notifier: Notifier, 19 private notifier: Notifier,
20 private authService: AuthService, 20 private authService: AuthService,
21 private userService: UserService 21 private userService: UserService
@@ -25,9 +25,9 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On
25 25
26 ngOnInit () { 26 ngOnInit () {
27 this.buildForm({ 27 this.buildForm({
28 'current-password': this.userValidatorsService.USER_PASSWORD, 28 'current-password': USER_PASSWORD_VALIDATOR,
29 'new-password': this.userValidatorsService.USER_PASSWORD, 29 'new-password': USER_PASSWORD_VALIDATOR,
30 'new-confirmed-password': this.userValidatorsService.USER_CONFIRM_PASSWORD 30 'new-confirmed-password': USER_CONFIRM_PASSWORD_VALIDATOR
31 }) 31 })
32 32
33 this.user = this.authService.getUser() 33 this.user = this.authService.getUser()
diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
index ed0984bf7..000a2c0ac 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
@@ -1,7 +1,8 @@
1import { Subject } from 'rxjs' 1import { Subject } from 'rxjs'
2import { Component, Input, OnInit } from '@angular/core' 2import { Component, Input, OnInit } from '@angular/core'
3import { Notifier, User, UserService } from '@app/core' 3import { Notifier, User, UserService } from '@app/core'
4import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' 4import { USER_DESCRIPTION_VALIDATOR, USER_DISPLAY_NAME_REQUIRED_VALIDATOR } from '@app/shared/form-validators/user-validators'
5import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5 6
6@Component({ 7@Component({
7 selector: 'my-account-profile', 8 selector: 'my-account-profile',
@@ -16,17 +17,16 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit {
16 17
17 constructor ( 18 constructor (
18 protected formValidatorService: FormValidatorService, 19 protected formValidatorService: FormValidatorService,
19 private userValidatorsService: UserValidatorsService,
20 private notifier: Notifier, 20 private notifier: Notifier,
21 private userService: UserService 21 private userService: UserService
22 ) { 22 ) {
23 super() 23 super()
24 } 24 }
25 25
26 ngOnInit () { 26 ngOnInit () {
27 this.buildForm({ 27 this.buildForm({
28 'display-name': this.userValidatorsService.USER_DISPLAY_NAME_REQUIRED, 28 'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
29 description: this.userValidatorsService.USER_DESCRIPTION 29 description: USER_DESCRIPTION_VALIDATOR
30 }) 30 })
31 31
32 this.userInformationLoaded.subscribe(() => { 32 this.userInformationLoaded.subscribe(() => {