diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2021-10-12 14:23:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 14:23:44 +0200 |
commit | 7399a79f73cc2015e64fad49361439a322ee1d3b (patch) | |
tree | 134903063dbc66e5f3b12cc59669d061403bdde1 /client/src/app/shared/shared-video-miniature | |
parent | 10ef089102f2225c5ec3ed426bc612e4f2bc8655 (diff) | |
download | PeerTube-7399a79f73cc2015e64fad49361439a322ee1d3b.tar.gz PeerTube-7399a79f73cc2015e64fad49361439a322ee1d3b.tar.zst PeerTube-7399a79f73cc2015e64fad49361439a322ee1d3b.zip |
add option to always show channel display name (#4422)
* add option to always show channel display name
closes #4040
* show avatar in video miniatures
closes #4040
* Revert "show avatar in video miniatures"
This reverts commit 79b1a84140857fc24f7e2233e838d012f72bc56f.
* channel display name: fix review comments
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-miniature.component.html | 4 | ||||
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-miniature.component.ts | 8 |
2 files changed, 10 insertions, 2 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 f51c298f2..b12495f90 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 | |||
@@ -39,10 +39,10 @@ | |||
39 | </span> | 39 | </span> |
40 | 40 | ||
41 | <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/c', video.byVideoChannel ]"> | 41 | <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/c', video.byVideoChannel ]"> |
42 | {{ video.byAccount }} | 42 | {{ authorAccount }} |
43 | </a> | 43 | </a> |
44 | <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerVideoChannel()" class="video-miniature-channel" [routerLink]="[ '/c', video.byVideoChannel ]"> | 44 | <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerVideoChannel()" class="video-miniature-channel" [routerLink]="[ '/c', video.byVideoChannel ]"> |
45 | {{ video.byVideoChannel }} | 45 | {{ authorChannel }} |
46 | </a> | 46 | </a> |
47 | 47 | ||
48 | <div class="video-info-privacy"> | 48 | <div class="video-info-privacy"> |
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 cb81ba3bd..69f00fb10 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 | |||
@@ -100,6 +100,14 @@ export class VideoMiniatureComponent implements OnInit { | |||
100 | @Inject(LOCALE_ID) private localeId: string | 100 | @Inject(LOCALE_ID) private localeId: string |
101 | ) {} | 101 | ) {} |
102 | 102 | ||
103 | get authorAccount () { | ||
104 | return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.account.displayName : this.video.byAccount | ||
105 | } | ||
106 | |||
107 | get authorChannel () { | ||
108 | return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.channel.displayName : this.video.byVideoChannel | ||
109 | } | ||
110 | |||
103 | get isVideoBlur () { | 111 | get isVideoBlur () { |
104 | return this.video.isVideoNSFWForUser(this.user, this.serverConfig) | 112 | return this.video.isVideoNSFWForUser(this.user, this.serverConfig) |
105 | } | 113 | } |