Add channel avatar to overviews

This commit is contained in:
Chocobozzz 2018-08-31 14:26:51 +02:00
parent 73dc4da09e
commit 1a47109144
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 25 additions and 3 deletions

View File

@ -22,9 +22,13 @@
</div>
</div>
<div class="section" *ngFor="let object of overview.channels">
<div class="section channel" *ngFor="let object of overview.channels">
<div class="section-title" i18n>
<a [routerLink]="[ '/video-channels', buildVideoChannelBy(object) ]">Channel {{ object.channel.displayName }}</a>
<a [routerLink]="[ '/video-channels', buildVideoChannelBy(object) ]">
<img [src]="buildVideoChannelAvatarUrl(object)" alt="Avatar" />
<div>{{ object.channel.displayName }}</div>
</a>
</div>
<div>

View File

@ -19,4 +19,18 @@
color: #000;
}
}
.channel {
.section-title a {
display: flex;
width: fit-content;
align-items: center;
img {
@include avatar(30px);
margin-right: 10px;
}
}
}

View File

@ -53,4 +53,8 @@ export class VideoOverviewComponent implements OnInit {
buildVideoChannelBy (object: { videos: Video[] }) {
return object.videos[0].byVideoChannel
}
buildVideoChannelAvatarUrl (object: { videos: Video[] }) {
return object.videos[0].videoChannelAvatarUrl
}
}

View File

@ -473,7 +473,7 @@ const TORRENT_MIMETYPE_EXT = {
const OVERVIEWS = {
VIDEOS: {
SAMPLE_THRESHOLD: 4,
SAMPLE_THRESHOLD: 6,
SAMPLES_COUNT: 2
}
}