Browse Source

Fix account channel overflow

Chocobozzz 5 years ago
parent
commit
fff77ba231

+ 5 - 1
client/src/app/+accounts/account-video-channels/account-video-channels.component.html

@@ -15,7 +15,11 @@
         <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>

+ 11 - 0
client/src/app/+accounts/account-video-channels/account-video-channels.component.scss

@@ -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;
+    }
+  }
 }
+
+

+ 1 - 1
client/src/app/+accounts/account-video-channels/account-video-channels.component.ts

@@ -79,7 +79,7 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {
   }
 
   getVideosOf (videoChannel: VideoChannel) {
-    return this.videos[ videoChannel.id ] || []
+    return this.videos[ videoChannel.id ]
   }
 
   onNearOfBottom () {