aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+manage/video-channel-edit/video-channel-update.component.ts')
-rw-r--r--client/src/app/+manage/video-channel-edit/video-channel-update.component.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
index 6b4947912..7e8d6ffe6 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
@@ -1,8 +1,8 @@
1import { Subscription } from 'rxjs' 1import { Subscription } from 'rxjs'
2import { HttpErrorResponse } from '@angular/common/http' 2import { HttpErrorResponse } from '@angular/common/http'
3import { Component, OnDestroy, OnInit } from '@angular/core' 3import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'
4import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute } from '@angular/router'
5import { AuthService, Notifier, RedirectService, ServerService } from '@app/core' 5import { AuthService, HooksService, Notifier, RedirectService, ServerService } from '@app/core'
6import { genericUploadErrorHandler } from '@app/helpers' 6import { genericUploadErrorHandler } from '@app/helpers'
7import { 7import {
8 VIDEO_CHANNEL_DESCRIPTION_VALIDATOR, 8 VIDEO_CHANNEL_DESCRIPTION_VALIDATOR,
@@ -19,7 +19,7 @@ import { VideoChannelEdit } from './video-channel-edit'
19 templateUrl: './video-channel-edit.component.html', 19 templateUrl: './video-channel-edit.component.html',
20 styleUrls: [ './video-channel-edit.component.scss' ] 20 styleUrls: [ './video-channel-edit.component.scss' ]
21}) 21})
22export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnInit, OnDestroy { 22export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnInit, AfterViewInit, OnDestroy {
23 error: string 23 error: string
24 videoChannel: VideoChannel 24 videoChannel: VideoChannel
25 25
@@ -31,11 +31,11 @@ export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnI
31 protected formValidatorService: FormValidatorService, 31 protected formValidatorService: FormValidatorService,
32 private authService: AuthService, 32 private authService: AuthService,
33 private notifier: Notifier, 33 private notifier: Notifier,
34 private router: Router,
35 private route: ActivatedRoute, 34 private route: ActivatedRoute,
36 private videoChannelService: VideoChannelService, 35 private videoChannelService: VideoChannelService,
37 private serverService: ServerService, 36 private serverService: ServerService,
38 private redirectService: RedirectService 37 private redirectService: RedirectService,
38 private hooks: HooksService
39 ) { 39 ) {
40 super() 40 super()
41 } 41 }
@@ -58,6 +58,8 @@ export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnI
58 next: videoChannelToUpdate => { 58 next: videoChannelToUpdate => {
59 this.videoChannel = videoChannelToUpdate 59 this.videoChannel = videoChannelToUpdate
60 60
61 this.hooks.runAction('action:video-channel-update.video-channel.loaded', 'video-channel', { videoChannel: this.videoChannel })
62
61 this.oldSupportField = videoChannelToUpdate.support 63 this.oldSupportField = videoChannelToUpdate.support
62 64
63 this.form.patchValue({ 65 this.form.patchValue({
@@ -74,6 +76,10 @@ export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnI
74 }) 76 })
75 } 77 }
76 78
79 ngAfterViewInit () {
80 this.hooks.runAction('action:video-channel-update.init', 'video-channel')
81 }
82
77 ngOnDestroy () { 83 ngOnDestroy () {
78 if (this.paramsSub) this.paramsSub.unsubscribe() 84 if (this.paramsSub) this.paramsSub.unsubscribe()
79 } 85 }