aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-29 16:45:35 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-03-31 09:05:51 +0200
commitdeb8b9cdb03213efd8f1fc4b40ab94ae499fe058 (patch)
tree7ba35e933530a706ec939b9c26c152d760710990 /client/src/app/shared/shared-video-miniature
parent100d9ce23bb7c5186132607e4c444f9cba5002a4 (diff)
downloadPeerTube-deb8b9cdb03213efd8f1fc4b40ab94ae499fe058.tar.gz
PeerTube-deb8b9cdb03213efd8f1fc4b40ab94ae499fe058.tar.zst
PeerTube-deb8b9cdb03213efd8f1fc4b40ab94ae499fe058.zip
Square channel avatar consistency
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.html2
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.scss6
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.ts5
3 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.html b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
index 7a6df7b64..e5b07896f 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.html
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
@@ -10,7 +10,7 @@
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 <a *ngIf="displayOptions.avatar" class="avatar" [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle"> 13 <a *ngIf="displayOptions.avatar" class="avatar" [ngClass]="{ channel: displayOwnerVideoChannel() }" [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
14 <img [src]="getAvatarUrl()" alt="" /> 14 <img [src]="getAvatarUrl()" alt="" />
15 </a> 15 </a>
16 16
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.scss b/client/src/app/shared/shared-video-miniature/video-miniature.component.scss
index 38cac5b6e..cd492e9ad 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.scss
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.scss
@@ -21,9 +21,13 @@ $more-margin-right: 15px;
21 .avatar { 21 .avatar {
22 margin: 10px 10px 0 0; 22 margin: 10px 10px 0 0;
23 23
24 img { 24 img:not(.channel) {
25 @include avatar(40px); 25 @include avatar(40px);
26 } 26 }
27
28 img.channel {
29 @include channel-avatar(40px);
30 }
27 } 31 }
28 32
29 .video-miniature-name { 33 .video-miniature-name {
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
index cc5665ab1..f08be9c25 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
@@ -183,7 +183,7 @@ export class VideoMiniatureComponent implements OnInit {
183 } 183 }
184 184
185 getAvatarUrl () { 185 getAvatarUrl () {
186 if (this.ownerDisplayTypeChosen === 'account') { 186 if (this.displayOwnerAccount()) {
187 return this.video.accountAvatarUrl 187 return this.video.accountAvatarUrl
188 } 188 }
189 189
@@ -250,7 +250,8 @@ export class VideoMiniatureComponent implements OnInit {
250 return 250 return
251 } 251 }
252 252
253 // If the video channel name an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12) 253 // If the video channel name is an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12)
254 // Or is just a suffix of the account (default created channel)
254 // -> Use the account name 255 // -> Use the account name
255 if ( 256 if (
256 this.video.channel.name === `${this.video.account.name}_channel` || 257 this.video.channel.name === `${this.video.account.name}_channel` ||