diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-07 11:20:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-07 11:20:58 +0200 |
commit | 95166f9aafa378a2d39fd76ef773f39dcb3f8b39 (patch) | |
tree | c0b91ee127bed329c9176aad85f26cbf611748b3 /client/src/app/my-account/my-account-video-channels | |
parent | 13a6b53655cdd7baba494abc3c9ff52788d4651e (diff) | |
download | PeerTube-95166f9aafa378a2d39fd76ef773f39dcb3f8b39.tar.gz PeerTube-95166f9aafa378a2d39fd76ef773f39dcb3f8b39.tar.zst PeerTube-95166f9aafa378a2d39fd76ef773f39dcb3f8b39.zip |
Add link to the channel page in watch page
Diffstat (limited to 'client/src/app/my-account/my-account-video-channels')
2 files changed, 6 insertions, 0 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 3cfe74752..c3c0ae63a 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 | |||
@@ -12,6 +12,7 @@ import { | |||
12 | VIDEO_CHANNEL_SUPPORT | 12 | VIDEO_CHANNEL_SUPPORT |
13 | } from '@app/shared/forms/form-validators/video-channel' | 13 | } from '@app/shared/forms/form-validators/video-channel' |
14 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 14 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
15 | import { AuthService } from '@app/core' | ||
15 | 16 | ||
16 | @Component({ | 17 | @Component({ |
17 | selector: 'my-account-video-channel-create', | 18 | selector: 'my-account-video-channel-create', |
@@ -34,6 +35,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
34 | } | 35 | } |
35 | 36 | ||
36 | constructor ( | 37 | constructor ( |
38 | private authService: AuthService, | ||
37 | private notificationsService: NotificationsService, | 39 | private notificationsService: NotificationsService, |
38 | private router: Router, | 40 | private router: Router, |
39 | private formBuilder: FormBuilder, | 41 | private formBuilder: FormBuilder, |
@@ -68,6 +70,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
68 | 70 | ||
69 | this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe( | 71 | this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe( |
70 | () => { | 72 | () => { |
73 | this.authService.refreshUserInformation() | ||
71 | this.notificationsService.success('Success', `Video channel ${videoChannelCreate.displayName} created.`) | 74 | this.notificationsService.success('Success', `Video channel ${videoChannelCreate.displayName} created.`) |
72 | this.router.navigate([ '/my-account', 'video-channels' ]) | 75 | this.router.navigate([ '/my-account', 'video-channels' ]) |
73 | }, | 76 | }, |
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 2b8415938..3cb8b9e9a 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 | |||
@@ -14,6 +14,7 @@ import { | |||
14 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 14 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
15 | import { Subscription } from 'rxjs/Subscription' | 15 | import { Subscription } from 'rxjs/Subscription' |
16 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 16 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
17 | import { AuthService } from '@app/core' | ||
17 | 18 | ||
18 | @Component({ | 19 | @Component({ |
19 | selector: 'my-account-video-channel-update', | 20 | selector: 'my-account-video-channel-update', |
@@ -39,6 +40,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
39 | private paramsSub: Subscription | 40 | private paramsSub: Subscription |
40 | 41 | ||
41 | constructor ( | 42 | constructor ( |
43 | private authService: AuthService, | ||
42 | private notificationsService: NotificationsService, | 44 | private notificationsService: NotificationsService, |
43 | private router: Router, | 45 | private router: Router, |
44 | private route: ActivatedRoute, | 46 | private route: ActivatedRoute, |
@@ -96,6 +98,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
96 | 98 | ||
97 | this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.uuid, videoChannelUpdate).subscribe( | 99 | this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.uuid, videoChannelUpdate).subscribe( |
98 | () => { | 100 | () => { |
101 | this.authService.refreshUserInformation() | ||
99 | this.notificationsService.success('Success', `Video channel ${videoChannelUpdate.displayName} updated.`) | 102 | this.notificationsService.success('Success', `Video channel ${videoChannelUpdate.displayName} updated.`) |
100 | this.router.navigate([ '/my-account', 'video-channels' ]) | 103 | this.router.navigate([ '/my-account', 'video-channels' ]) |
101 | }, | 104 | }, |