Add link to the channel page in watch page
This commit is contained in:
parent
13a6b53655
commit
95166f9aaf
|
@ -12,6 +12,7 @@ import {
|
||||||
VIDEO_CHANNEL_SUPPORT
|
VIDEO_CHANNEL_SUPPORT
|
||||||
} from '@app/shared/forms/form-validators/video-channel'
|
} from '@app/shared/forms/form-validators/video-channel'
|
||||||
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
|
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
|
||||||
|
import { AuthService } from '@app/core'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-account-video-channel-create',
|
selector: 'my-account-video-channel-create',
|
||||||
|
@ -34,6 +35,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
|
private authService: AuthService,
|
||||||
private notificationsService: NotificationsService,
|
private notificationsService: NotificationsService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
|
@ -68,6 +70,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
|
||||||
|
|
||||||
this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe(
|
this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe(
|
||||||
() => {
|
() => {
|
||||||
|
this.authService.refreshUserInformation()
|
||||||
this.notificationsService.success('Success', `Video channel ${videoChannelCreate.displayName} created.`)
|
this.notificationsService.success('Success', `Video channel ${videoChannelCreate.displayName} created.`)
|
||||||
this.router.navigate([ '/my-account', 'video-channels' ])
|
this.router.navigate([ '/my-account', 'video-channels' ])
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,6 +14,7 @@ import {
|
||||||
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
|
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
|
||||||
import { Subscription } from 'rxjs/Subscription'
|
import { Subscription } from 'rxjs/Subscription'
|
||||||
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
|
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
|
||||||
|
import { AuthService } from '@app/core'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-account-video-channel-update',
|
selector: 'my-account-video-channel-update',
|
||||||
|
@ -39,6 +40,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
|
||||||
private paramsSub: Subscription
|
private paramsSub: Subscription
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
|
private authService: AuthService,
|
||||||
private notificationsService: NotificationsService,
|
private notificationsService: NotificationsService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
|
@ -96,6 +98,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
|
||||||
|
|
||||||
this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.uuid, videoChannelUpdate).subscribe(
|
this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.uuid, videoChannelUpdate).subscribe(
|
||||||
() => {
|
() => {
|
||||||
|
this.authService.refreshUserInformation()
|
||||||
this.notificationsService.success('Success', `Video channel ${videoChannelUpdate.displayName} updated.`)
|
this.notificationsService.success('Success', `Video channel ${videoChannelUpdate.displayName} updated.`)
|
||||||
this.router.navigate([ '/my-account', 'video-channels' ])
|
this.router.navigate([ '/my-account', 'video-channels' ])
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="video-info-channel">
|
<div class="video-info-channel">
|
||||||
{{ video.channel.displayName }}
|
<a [routerLink]="[ '/video-channels', video.channel.id ]" title="Go the channel page">
|
||||||
|
{{ video.channel.displayName }}
|
||||||
|
</a>
|
||||||
<!-- Here will be the subscribe button -->
|
<!-- Here will be the subscribe button -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,16 @@
|
||||||
.video-info-channel {
|
.video-info-channel {
|
||||||
font-weight: $font-semibold;
|
font-weight: $font-semibold;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
@include disable-default-a-behaviour;
|
||||||
|
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-info-by a {
|
.video-info-by a {
|
||||||
|
|
Loading…
Reference in New Issue