diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-03 10:39:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-03 10:39:40 +0200 |
commit | 9ca0f688e9e8558233f1a538b96a43da44e35353 (patch) | |
tree | 16370ffe97df1bfeef874ce71fa6bedff0b7496b /client/src/app/+manage/video-channel-edit/video-channel-create.component.ts | |
parent | 0b6f531653a7a24f82ad65564479a70a9326301a (diff) | |
download | PeerTube-9ca0f688e9e8558233f1a538b96a43da44e35353.tar.gz PeerTube-9ca0f688e9e8558233f1a538b96a43da44e35353.tar.zst PeerTube-9ca0f688e9e8558233f1a538b96a43da44e35353.zip |
Add channel hooks
Diffstat (limited to 'client/src/app/+manage/video-channel-edit/video-channel-create.component.ts')
-rw-r--r-- | client/src/app/+manage/video-channel-edit/video-channel-create.component.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts index 5f8e0278e..8211451a4 100644 --- a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts +++ b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { of } from 'rxjs' | 1 | import { of } from 'rxjs' |
2 | import { switchMap } from 'rxjs/operators' | 2 | import { switchMap } from 'rxjs/operators' |
3 | import { Component, OnInit } from '@angular/core' | 3 | import { AfterViewInit, Component, OnInit } from '@angular/core' |
4 | import { Router } from '@angular/router' | 4 | import { Router } from '@angular/router' |
5 | import { AuthService, Notifier } from '@app/core' | 5 | import { AuthService, HooksService, Notifier } from '@app/core' |
6 | import { | 6 | import { |
7 | VIDEO_CHANNEL_DESCRIPTION_VALIDATOR, | 7 | VIDEO_CHANNEL_DESCRIPTION_VALIDATOR, |
8 | VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR, | 8 | VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR, |
@@ -18,7 +18,7 @@ import { VideoChannelEdit } from './video-channel-edit' | |||
18 | templateUrl: './video-channel-edit.component.html', | 18 | templateUrl: './video-channel-edit.component.html', |
19 | styleUrls: [ './video-channel-edit.component.scss' ] | 19 | styleUrls: [ './video-channel-edit.component.scss' ] |
20 | }) | 20 | }) |
21 | export class VideoChannelCreateComponent extends VideoChannelEdit implements OnInit { | 21 | export class VideoChannelCreateComponent extends VideoChannelEdit implements OnInit, AfterViewInit { |
22 | error: string | 22 | error: string |
23 | videoChannel = new VideoChannel({}) | 23 | videoChannel = new VideoChannel({}) |
24 | 24 | ||
@@ -30,7 +30,8 @@ export class VideoChannelCreateComponent extends VideoChannelEdit implements OnI | |||
30 | private authService: AuthService, | 30 | private authService: AuthService, |
31 | private notifier: Notifier, | 31 | private notifier: Notifier, |
32 | private router: Router, | 32 | private router: Router, |
33 | private videoChannelService: VideoChannelService | 33 | private videoChannelService: VideoChannelService, |
34 | private hooks: HooksService | ||
34 | ) { | 35 | ) { |
35 | super() | 36 | super() |
36 | } | 37 | } |
@@ -44,6 +45,10 @@ export class VideoChannelCreateComponent extends VideoChannelEdit implements OnI | |||
44 | }) | 45 | }) |
45 | } | 46 | } |
46 | 47 | ||
48 | ngAfterViewInit () { | ||
49 | this.hooks.runAction('action:video-channel-create.init', 'video-channel') | ||
50 | } | ||
51 | |||
47 | formValidated () { | 52 | formValidated () { |
48 | this.error = undefined | 53 | this.error = undefined |
49 | 54 | ||