aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/+my-account-video-channels
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-video-channels
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-video-channels')
-rw-r--r--client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts17
-rw-r--r--client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts14
2 files changed, 20 insertions, 11 deletions
diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts
index 5c438c3bf..e2ea87fb8 100644
--- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts
+++ b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts
@@ -1,7 +1,13 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { Router } from '@angular/router' 2import { Router } from '@angular/router'
3import { AuthService, Notifier } from '@app/core' 3import { AuthService, Notifier } from '@app/core'
4import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms' 4import {
5 VIDEO_CHANNEL_DESCRIPTION_VALIDATOR,
6 VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR,
7 VIDEO_CHANNEL_NAME_VALIDATOR,
8 VIDEO_CHANNEL_SUPPORT_VALIDATOR
9} from '@app/shared/form-validators/video-channel-validators'
10import { FormValidatorService } from '@app/shared/shared-forms'
5import { VideoChannelService } from '@app/shared/shared-main' 11import { VideoChannelService } from '@app/shared/shared-main'
6import { VideoChannelCreate } from '@shared/models' 12import { VideoChannelCreate } from '@shared/models'
7import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' 13import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
@@ -17,7 +23,6 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
17 constructor ( 23 constructor (
18 protected formValidatorService: FormValidatorService, 24 protected formValidatorService: FormValidatorService,
19 private authService: AuthService, 25 private authService: AuthService,
20 private videoChannelValidatorsService: VideoChannelValidatorsService,
21 private notifier: Notifier, 26 private notifier: Notifier,
22 private router: Router, 27 private router: Router,
23 private videoChannelService: VideoChannelService 28 private videoChannelService: VideoChannelService
@@ -31,10 +36,10 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
31 36
32 ngOnInit () { 37 ngOnInit () {
33 this.buildForm({ 38 this.buildForm({
34 name: this.videoChannelValidatorsService.VIDEO_CHANNEL_NAME, 39 name: VIDEO_CHANNEL_NAME_VALIDATOR,
35 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, 40 'display-name': VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR,
36 description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, 41 description: VIDEO_CHANNEL_DESCRIPTION_VALIDATOR,
37 support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT 42 support: VIDEO_CHANNEL_SUPPORT_VALIDATOR
38 }) 43 })
39 } 44 }
40 45
diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts
index 485521dcc..01659b8da 100644
--- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts
+++ b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts
@@ -2,7 +2,12 @@ import { Subscription } from 'rxjs'
2import { Component, OnDestroy, OnInit } from '@angular/core' 2import { Component, OnDestroy, OnInit } from '@angular/core'
3import { ActivatedRoute, Router } from '@angular/router' 3import { ActivatedRoute, Router } from '@angular/router'
4import { AuthService, Notifier, ServerService } from '@app/core' 4import { AuthService, Notifier, ServerService } from '@app/core'
5import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms' 5import {
6 VIDEO_CHANNEL_DESCRIPTION_VALIDATOR,
7 VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR,
8 VIDEO_CHANNEL_SUPPORT_VALIDATOR
9} from '@app/shared/form-validators/video-channel-validators'
10import { FormValidatorService } from '@app/shared/shared-forms'
6import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' 11import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
7import { ServerConfig, VideoChannelUpdate } from '@shared/models' 12import { ServerConfig, VideoChannelUpdate } from '@shared/models'
8import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' 13import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
@@ -23,7 +28,6 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
23 constructor ( 28 constructor (
24 protected formValidatorService: FormValidatorService, 29 protected formValidatorService: FormValidatorService,
25 private authService: AuthService, 30 private authService: AuthService,
26 private videoChannelValidatorsService: VideoChannelValidatorsService,
27 private notifier: Notifier, 31 private notifier: Notifier,
28 private router: Router, 32 private router: Router,
29 private route: ActivatedRoute, 33 private route: ActivatedRoute,
@@ -39,9 +43,9 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
39 .subscribe(config => this.serverConfig = config) 43 .subscribe(config => this.serverConfig = config)
40 44
41 this.buildForm({ 45 this.buildForm({
42 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, 46 'display-name': VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR,
43 description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, 47 description: VIDEO_CHANNEL_DESCRIPTION_VALIDATOR,
44 support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT, 48 support: VIDEO_CHANNEL_SUPPORT_VALIDATOR,
45 bulkVideosSupportUpdate: null 49 bulkVideosSupportUpdate: null
46 }) 50 })
47 51