]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix account channel overflow
authorChocobozzz <me@florianbigard.com>
Tue, 11 Jun 2019 09:28:26 +0000 (11:28 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 11 Jun 2019 12:31:11 +0000 (14:31 +0200)
client/src/app/+accounts/account-video-channels/account-video-channels.component.html
client/src/app/+accounts/account-video-channels/account-video-channels.component.scss
client/src/app/+accounts/account-video-channels/account-video-channels.component.ts

index 43dbbebb3b6b8f5f17de54d407e418f43f95d25b..e9c8179b77f1d898eef7befeecbff6d69bfba245 100644 (file)
         <my-subscribe-button [videoChannel]="videoChannel"></my-subscribe-button>
       </div>
 
-      <my-video-miniature *ngFor="let video of getVideosOf(videoChannel)" [video]="video" [user]="user" [displayVideoActions]="false"></my-video-miniature>
+      <div *ngIf="getVideosOf(videoChannel)" class="videos">
+        <div class="no-results" i18n *ngIf="getVideosOf(videoChannel).length === 0">This channel does not have videos.</div>
+
+        <my-video-miniature *ngFor="let video of getVideosOf(videoChannel)" [video]="video" [user]="user" [displayVideoActions]="false"></my-video-miniature>
+      </div>
     </div>
   </div>
 </div>
index d9f78bdcdd3221021fc7bd500fb0bfbc3cdc5c63..98931f0c2542dbfcc3d28a74ceb0e9de5c75624b 100644 (file)
@@ -9,9 +9,20 @@
 .section {
   @include miniature-rows;
 
+  overflow: visible; // For the subscribe dropdown
   padding-top: 0 !important;
 
   .section-title {
     align-items: center;
   }
+
+  .videos {
+    overflow: hidden;
+
+    .no-results {
+      height: 50px;
+    }
+  }
 }
+
+
index ee3b5f8e4b6cc3dfe878868312256f5cbda6b78c..a8d4237e81242c5cabf834e0d5794cfd1913881e 100644 (file)
@@ -79,7 +79,7 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {
   }
 
   getVideosOf (videoChannel: VideoChannel) {
-    return this.videos[ videoChannel.id ] || []
+    return this.videos[ videoChannel.id ]
   }
 
   onNearOfBottom () {