]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add show channel button in account page
authorChocobozzz <me@florianbigard.com>
Mon, 29 Jul 2019 15:12:18 +0000 (17:12 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 29 Jul 2019 15:12:18 +0000 (17:12 +0200)
client/src/app/+accounts/account-video-channels/account-video-channels.component.html
client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
client/src/app/shared/video/video-miniature.component.scss
client/src/sass/include/_miniature.scss
client/src/sass/include/_variables.scss

index e9c8179b77f1d898eef7befeecbff6d69bfba245..cb23bb522ae0f97fc6b3996e60d10f54bf46a881 100644 (file)
@@ -5,7 +5,7 @@
   <div class="channels" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true">
     <div class="section channel" *ngFor="let videoChannel of videoChannels">
       <div class="section-title">
-        <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" i18n-title title="See this video channel">
+        <a [routerLink]="getVideoChannelLink(videoChannel)" i18n-title title="See this video channel">
           <img [src]="videoChannel.avatarUrl" alt="Avatar" />
 
           <div>{{ videoChannel.displayName }}</div>
 
         <my-video-miniature *ngFor="let video of getVideosOf(videoChannel)" [video]="video" [user]="user" [displayVideoActions]="false"></my-video-miniature>
       </div>
+
+      <a class="show-more" i18n [routerLink]="getVideoChannelLink(videoChannel)">
+        Show this channel
+      </a>
     </div>
   </div>
 </div>
index 4d07d653f9adeafdf5e55c9fa8f32d08270bccc3..7144f4b5f501260d94c6a9ba1953e59700495517 100644 (file)
@@ -89,4 +89,8 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {
 
     this.loadMoreChannels()
   }
+
+  getVideoChannelLink (videoChannel: VideoChannel) {
+    return [ '/video-channels', videoChannel.nameWithHost ]
+  }
 }
index dac178bdef848e9cdce1ec6bd660304f15fcefab..3658ee3c006608852a77bbf014370b15db5062db 100644 (file)
@@ -9,7 +9,7 @@ $more-margin-right: 10px;
   width: $video-miniature-width;
   display: inline-flex;
   flex-direction: column;
-  margin-bottom: 30px;
+  margin-bottom: $video-miniature-margin-bottom;
   height: 195px;
   vertical-align: top;
 
index 26c327956d3170feff99080cc92526d7630e9532..e4ed88d31d261984663c519870dd496fa3135a5e 100644 (file)
@@ -142,10 +142,13 @@ $play-overlay-width: 18px;
 @mixin miniature-rows {
   max-height: 540px; // 2 rows max
   overflow: hidden;
-  padding-top: 10px;
 
   &:first-child {
     padding-top: 30px;
+
+    .section-title {
+      border-top: none !important;
+    }
   }
 
   my-video-miniature {
@@ -155,9 +158,11 @@ $play-overlay-width: 18px;
   .section-title {
     font-size: 24px;
     font-weight: $font-semibold;
-    margin-bottom: 30px;
+    padding-top: 15px;
+    margin-bottom: 15px;
     display: flex;
     justify-content: space-between;
+    border-top: 1px solid $separator-border-color;
 
     a {
       &:hover, &:focus:not(.focus-visible), &:active {
@@ -194,6 +199,17 @@ $play-overlay-width: 18px;
     }
   }
 
+  .show-more {
+    position: relative;
+    top: -5px;
+    display: inline-block;
+    font-size: 16px;
+    text-transform: uppercase;
+    color: $grey-foreground-color;
+    margin-bottom: 10px;
+    font-weight: $font-semibold;
+  }
+
   @media screen and (max-width: $mobile-view) {
     max-height: initial;
     overflow: initial;
index aafeda2577d0d80af58ac8836e1cb3c1ffb8bd2a..f629dc23efc345276128d7f6ab7534e44dda2cbf 100644 (file)
@@ -47,6 +47,7 @@ $footer-border-color: $header-border-color;
 $separator-border-color: rgba(0, 0, 0, 0.10);
 
 $video-miniature-width: 238px;
+$video-miniature-margin-bottom: 30px;
 $video-thumbnail-height: 122px;
 $video-thumbnail-width: 223px;
 $video-thumbnail-ratio: $video-thumbnail-width / $video-thumbnail-height;