aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-31 14:26:51 +0200
committerChocobozzz <me@florianbigard.com>2018-08-31 14:32:37 +0200
commit1a4710914432b44115b185cec1883fdf409aef1d (patch)
tree2bf0dd2589af3a630a419e4ebefff0f2dc371885 /client/src
parent73dc4da09e99ce0f6deab33326c731cbcdb52ca1 (diff)
downloadPeerTube-1a4710914432b44115b185cec1883fdf409aef1d.tar.gz
PeerTube-1a4710914432b44115b185cec1883fdf409aef1d.tar.zst
PeerTube-1a4710914432b44115b185cec1883fdf409aef1d.zip
Add channel avatar to overviews
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/videos/video-list/video-overview.component.html8
-rw-r--r--client/src/app/videos/video-list/video-overview.component.scss14
-rw-r--r--client/src/app/videos/video-list/video-overview.component.ts4
3 files changed, 24 insertions, 2 deletions
diff --git a/client/src/app/videos/video-list/video-overview.component.html b/client/src/app/videos/video-list/video-overview.component.html
index 9282dd59c..84a4c70ee 100644
--- a/client/src/app/videos/video-list/video-overview.component.html
+++ b/client/src/app/videos/video-list/video-overview.component.html
@@ -22,9 +22,13 @@
22 </div> 22 </div>
23 </div> 23 </div>
24 24
25 <div class="section" *ngFor="let object of overview.channels"> 25 <div class="section channel" *ngFor="let object of overview.channels">
26 <div class="section-title" i18n> 26 <div class="section-title" i18n>
27 <a [routerLink]="[ '/video-channels', buildVideoChannelBy(object) ]">Channel {{ object.channel.displayName }}</a> 27 <a [routerLink]="[ '/video-channels', buildVideoChannelBy(object) ]">
28 <img [src]="buildVideoChannelAvatarUrl(object)" alt="Avatar" />
29
30 <div>{{ object.channel.displayName }}</div>
31 </a>
28 </div> 32 </div>
29 33
30 <div> 34 <div>
diff --git a/client/src/app/videos/video-list/video-overview.component.scss b/client/src/app/videos/video-list/video-overview.component.scss
index 8d66cf80a..73b6d2e53 100644
--- a/client/src/app/videos/video-list/video-overview.component.scss
+++ b/client/src/app/videos/video-list/video-overview.component.scss
@@ -19,4 +19,18 @@
19 19
20 color: #000; 20 color: #000;
21 } 21 }
22}
23
24.channel {
25 .section-title a {
26 display: flex;
27 width: fit-content;
28 align-items: center;
29
30 img {
31 @include avatar(30px);
32
33 margin-right: 10px;
34 }
35 }
22} \ No newline at end of file 36} \ No newline at end of file
diff --git a/client/src/app/videos/video-list/video-overview.component.ts b/client/src/app/videos/video-list/video-overview.component.ts
index c758e115c..2c6054721 100644
--- a/client/src/app/videos/video-list/video-overview.component.ts
+++ b/client/src/app/videos/video-list/video-overview.component.ts
@@ -53,4 +53,8 @@ export class VideoOverviewComponent implements OnInit {
53 buildVideoChannelBy (object: { videos: Video[] }) { 53 buildVideoChannelBy (object: { videos: Video[] }) {
54 return object.videos[0].byVideoChannel 54 return object.videos[0].byVideoChannel
55 } 55 }
56
57 buildVideoChannelAvatarUrl (object: { videos: Video[] }) {
58 return object.videos[0].videoChannelAvatarUrl
59 }
56} 60}