]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add link to the channel page in watch page
authorChocobozzz <me@florianbigard.com>
Mon, 7 May 2018 09:20:58 +0000 (11:20 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 7 May 2018 09:20:58 +0000 (11:20 +0200)
client/src/app/my-account/my-account-video-channels/my-account-video-channel-create.component.ts
client/src/app/my-account/my-account-video-channels/my-account-video-channel-update.component.ts
client/src/app/videos/+video-watch/video-watch.component.html
client/src/app/videos/+video-watch/video-watch.component.scss

index 3cfe747525ea5d3ee50c4f3a40bb2f2b2d899bf3..c3c0ae63a0961546cc1c41e9b99e8716a63a3506 100644 (file)
@@ -12,6 +12,7 @@ import {
   VIDEO_CHANNEL_SUPPORT
 } from '@app/shared/forms/form-validators/video-channel'
 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
+import { AuthService } from '@app/core'
 
 @Component({
   selector: 'my-account-video-channel-create',
@@ -34,6 +35,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
   }
 
   constructor (
+    private authService: AuthService,
     private notificationsService: NotificationsService,
     private router: Router,
     private formBuilder: FormBuilder,
@@ -68,6 +70,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
 
     this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe(
       () => {
+        this.authService.refreshUserInformation()
         this.notificationsService.success('Success', `Video channel ${videoChannelCreate.displayName} created.`)
         this.router.navigate([ '/my-account', 'video-channels' ])
       },
index 2b8415938edfa8ecd13a868f26b7c78f1f987ea1..3cb8b9e9a7d5bd81b6880ac53d1fa1aeffa7bdd9 100644 (file)
@@ -14,6 +14,7 @@ import {
 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
 import { Subscription } from 'rxjs/Subscription'
 import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
+import { AuthService } from '@app/core'
 
 @Component({
   selector: 'my-account-video-channel-update',
@@ -39,6 +40,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
   private paramsSub: Subscription
 
   constructor (
+    private authService: AuthService,
     private notificationsService: NotificationsService,
     private router: Router,
     private route: ActivatedRoute,
@@ -96,6 +98,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
 
     this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.uuid, videoChannelUpdate).subscribe(
       () => {
+        this.authService.refreshUserInformation()
         this.notificationsService.success('Success', `Video channel ${videoChannelUpdate.displayName} updated.`)
         this.router.navigate([ '/my-account', 'video-channels' ])
       },
index f38e90927b8c34b696484aaf17cd4c96635e1438..402a916476ac39863a69b678ca3cd721119e3c6c 100644 (file)
@@ -17,7 +17,9 @@
           </div>
 
           <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 -->
           </div>
 
index b4d9841fe728d4a27e7e904e8a737199c3b0c05e..508c553a4cb53df705665c28fc40df416b6ac0b8 100644 (file)
       .video-info-channel {
         font-weight: $font-semibold;
         font-size: 15px;
+
+        a {
+          @include disable-default-a-behaviour;
+
+          color: #000;
+
+          &:hover {
+            opacity: 0.8;
+          }
+        }
       }
 
       .video-info-by a {