fix miniature fixed height, add link/title to avatar, remove pr-2 on channels list

pull/2870/head
Rigel Kent 2020-06-12 09:51:13 +02:00
parent 8b381422b8
commit 435258ea3c
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
5 changed files with 12 additions and 12 deletions

View File

@ -19,7 +19,6 @@
<div class="no-results my-5" i18n *ngIf="getVideosOf(videoChannel).length === 0">This channel doesn't have any videos.</div>
<my-video-miniature
class="pr-2"
*ngFor="let video of getVideosOf(videoChannel)"
[video]="video" [user]="user" [displayVideoActions]="true"
></my-video-miniature>

View File

@ -10,10 +10,10 @@
<div class="video-bottom">
<div class="video-miniature-information">
<div class="d-inline-flex video-miniature-meta">
<div *ngIf="displayOptions.avatar" class="avatar">
<img [src]="getAvatarUrl()" alt="Avatar" />
</div>
<a *ngIf="displayOptions.avatar" class="avatar" [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
<img [src]="getAvatarUrl()" alt="" />
</a>
<div class="d-flex flex-column">
<a
tabindex="-1"

View File

@ -9,7 +9,6 @@ $more-margin-right: 15px;
display: inline-flex;
flex-direction: column;
padding-bottom: $video-miniature-margin-bottom;
height: 195px;
vertical-align: top;
.video-bottom {
@ -119,8 +118,6 @@ $more-margin-right: 15px;
&.fit-width {
width: 100%;
height: unset;
padding-bottom: $video-miniature-margin-bottom / 2;
.video-bottom {
width: 100% !important;

View File

@ -78,6 +78,7 @@ export class VideoMiniatureComponent implements OnInit {
addToWatchLaterText: string
addedToWatchLaterText: string
inWatchLaterPlaylist: boolean
channelLinkTitle = ''
watchLaterPlaylist: {
id: number
@ -96,9 +97,7 @@ export class VideoMiniatureComponent implements OnInit {
private videoPlaylistService: VideoPlaylistService,
private cd: ChangeDetectorRef,
@Inject(LOCALE_ID) private localeId: string
) {
}
) {}
get isVideoBlur () {
return this.video.isVideoNSFWForUser(this.user, this.serverConfig)
@ -114,6 +113,11 @@ export class VideoMiniatureComponent implements OnInit {
this.setUpBy()
this.channelLinkTitle = this.i18n(
'Go to the channel page of {{name}} ({{handle}})',
{ name: this.video.channel.name, handle: this.video.byVideoChannel }
)
// We rely on mouseenter to lazy load actions
if (this.screenService.isInTouchScreen()) {
this.loadActions()

View File

@ -56,7 +56,7 @@ $footer-margin: 30px;
$separator-border-color: rgba(0, 0, 0, 0.10);
$video-miniature-width: 238px;
$video-miniature-margin-bottom: 30px;
$video-miniature-margin-bottom: 15px;
$video-thumbnail-height: 122px;
$video-thumbnail-width: 223px;