diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-12 09:51:13 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-12 09:51:16 +0200 |
commit | 435258ea3c17c10c7c2735075e59122956d45fca (patch) | |
tree | 44136d8c9362a5b219f1458a2a53a3c671cadee3 /client/src | |
parent | 8b381422b88a02a971f5e50422b5b4b79b1101e5 (diff) | |
download | PeerTube-435258ea3c17c10c7c2735075e59122956d45fca.tar.gz PeerTube-435258ea3c17c10c7c2735075e59122956d45fca.tar.zst PeerTube-435258ea3c17c10c7c2735075e59122956d45fca.zip |
fix miniature fixed height, add link/title to avatar, remove pr-2 on channels list
Diffstat (limited to 'client/src')
5 files changed, 12 insertions, 12 deletions
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html index b45ca58da..8f1ff21a5 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html | |||
@@ -19,7 +19,6 @@ | |||
19 | <div class="no-results my-5" i18n *ngIf="getVideosOf(videoChannel).length === 0">This channel doesn't have any videos.</div> | 19 | <div class="no-results my-5" i18n *ngIf="getVideosOf(videoChannel).length === 0">This channel doesn't have any videos.</div> |
20 | 20 | ||
21 | <my-video-miniature | 21 | <my-video-miniature |
22 | class="pr-2" | ||
23 | *ngFor="let video of getVideosOf(videoChannel)" | 22 | *ngFor="let video of getVideosOf(videoChannel)" |
24 | [video]="video" [user]="user" [displayVideoActions]="true" | 23 | [video]="video" [user]="user" [displayVideoActions]="true" |
25 | ></my-video-miniature> | 24 | ></my-video-miniature> |
diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 992c16585..d3b750da8 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html | |||
@@ -10,10 +10,10 @@ | |||
10 | <div class="video-bottom"> | 10 | <div class="video-bottom"> |
11 | <div class="video-miniature-information"> | 11 | <div class="video-miniature-information"> |
12 | <div class="d-inline-flex video-miniature-meta"> | 12 | <div class="d-inline-flex video-miniature-meta"> |
13 | <div *ngIf="displayOptions.avatar" class="avatar"> | 13 | <a *ngIf="displayOptions.avatar" class="avatar" [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle"> |
14 | <img [src]="getAvatarUrl()" alt="Avatar" /> | 14 | <img [src]="getAvatarUrl()" alt="" /> |
15 | </div> | 15 | </a> |
16 | 16 | ||
17 | <div class="d-flex flex-column"> | 17 | <div class="d-flex flex-column"> |
18 | <a | 18 | <a |
19 | tabindex="-1" | 19 | tabindex="-1" |
diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss index d926c4dec..99bd9c15b 100644 --- a/client/src/app/shared/video/video-miniature.component.scss +++ b/client/src/app/shared/video/video-miniature.component.scss | |||
@@ -9,7 +9,6 @@ $more-margin-right: 15px; | |||
9 | display: inline-flex; | 9 | display: inline-flex; |
10 | flex-direction: column; | 10 | flex-direction: column; |
11 | padding-bottom: $video-miniature-margin-bottom; | 11 | padding-bottom: $video-miniature-margin-bottom; |
12 | height: 195px; | ||
13 | vertical-align: top; | 12 | vertical-align: top; |
14 | 13 | ||
15 | .video-bottom { | 14 | .video-bottom { |
@@ -119,8 +118,6 @@ $more-margin-right: 15px; | |||
119 | 118 | ||
120 | &.fit-width { | 119 | &.fit-width { |
121 | width: 100%; | 120 | width: 100%; |
122 | height: unset; | ||
123 | padding-bottom: $video-miniature-margin-bottom / 2; | ||
124 | 121 | ||
125 | .video-bottom { | 122 | .video-bottom { |
126 | width: 100% !important; | 123 | width: 100% !important; |
diff --git a/client/src/app/shared/video/video-miniature.component.ts b/client/src/app/shared/video/video-miniature.component.ts index ccf90af54..36e18d018 100644 --- a/client/src/app/shared/video/video-miniature.component.ts +++ b/client/src/app/shared/video/video-miniature.component.ts | |||
@@ -78,6 +78,7 @@ export class VideoMiniatureComponent implements OnInit { | |||
78 | addToWatchLaterText: string | 78 | addToWatchLaterText: string |
79 | addedToWatchLaterText: string | 79 | addedToWatchLaterText: string |
80 | inWatchLaterPlaylist: boolean | 80 | inWatchLaterPlaylist: boolean |
81 | channelLinkTitle = '' | ||
81 | 82 | ||
82 | watchLaterPlaylist: { | 83 | watchLaterPlaylist: { |
83 | id: number | 84 | id: number |
@@ -96,9 +97,7 @@ export class VideoMiniatureComponent implements OnInit { | |||
96 | private videoPlaylistService: VideoPlaylistService, | 97 | private videoPlaylistService: VideoPlaylistService, |
97 | private cd: ChangeDetectorRef, | 98 | private cd: ChangeDetectorRef, |
98 | @Inject(LOCALE_ID) private localeId: string | 99 | @Inject(LOCALE_ID) private localeId: string |
99 | ) { | 100 | ) {} |
100 | |||
101 | } | ||
102 | 101 | ||
103 | get isVideoBlur () { | 102 | get isVideoBlur () { |
104 | return this.video.isVideoNSFWForUser(this.user, this.serverConfig) | 103 | return this.video.isVideoNSFWForUser(this.user, this.serverConfig) |
@@ -114,6 +113,11 @@ export class VideoMiniatureComponent implements OnInit { | |||
114 | 113 | ||
115 | this.setUpBy() | 114 | this.setUpBy() |
116 | 115 | ||
116 | this.channelLinkTitle = this.i18n( | ||
117 | 'Go to the channel page of {{name}} ({{handle}})', | ||
118 | { name: this.video.channel.name, handle: this.video.byVideoChannel } | ||
119 | ) | ||
120 | |||
117 | // We rely on mouseenter to lazy load actions | 121 | // We rely on mouseenter to lazy load actions |
118 | if (this.screenService.isInTouchScreen()) { | 122 | if (this.screenService.isInTouchScreen()) { |
119 | this.loadActions() | 123 | this.loadActions() |
diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index 56b1ff884..fc13f6509 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss | |||
@@ -56,7 +56,7 @@ $footer-margin: 30px; | |||
56 | $separator-border-color: rgba(0, 0, 0, 0.10); | 56 | $separator-border-color: rgba(0, 0, 0, 0.10); |
57 | 57 | ||
58 | $video-miniature-width: 238px; | 58 | $video-miniature-width: 238px; |
59 | $video-miniature-margin-bottom: 30px; | 59 | $video-miniature-margin-bottom: 15px; |
60 | $video-thumbnail-height: 122px; | 60 | $video-thumbnail-height: 122px; |
61 | $video-thumbnail-width: 223px; | 61 | $video-thumbnail-width: 223px; |
62 | 62 | ||