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/+videos | |
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/+videos')
4 files changed, 21 insertions, 23 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.html b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.html index 5a7221858..d433c7aba 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.html +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.html | |||
@@ -1,11 +1,20 @@ | |||
1 | <div class="wrapper" [ngClass]="{ 'generic-channel': genericChannel }"> | 1 | <div class="wrapper"> |
2 | <my-actor-avatar | 2 | <my-actor-avatar |
3 | class="channel" [channel]="video.channel" | 3 | *ngIf="showChannel" |
4 | [internalHref]="[ '/c', video.byVideoChannel ]" [title]="channelLinkTitle" | 4 | class="channel" |
5 | [class.main-avatar]="showChannel" | ||
6 | [channel]="video.channel" | ||
7 | [internalHref]="[ '/c', video.byVideoChannel ]" | ||
8 | [title]="channelLinkTitle" | ||
5 | ></my-actor-avatar> | 9 | ></my-actor-avatar> |
6 | 10 | ||
7 | <my-actor-avatar | 11 | <my-actor-avatar |
8 | class="account" [account]="video.account" | 12 | *ngIf="showAccount" |
9 | [internalHref]="[ '/a', video.byAccount ]" [title]="accountLinkTitle"> | 13 | class="account" |
14 | [class.main-avatar]="!showChannel" | ||
15 | [class.second-avatar]="showChannel" | ||
16 | [account]="video.account" | ||
17 | [internalHref]="[ '/a', video.byAccount ]" | ||
18 | [title]="accountLinkTitle"> | ||
10 | </my-actor-avatar> | 19 | </my-actor-avatar> |
11 | </div> | 20 | </div> |
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.scss b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.scss index 1ff8fb96e..71c5e4b5a 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.scss +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.scss | |||
@@ -20,23 +20,11 @@ | |||
20 | position: relative; | 20 | position: relative; |
21 | margin-bottom: 5px; | 21 | margin-bottom: 5px; |
22 | 22 | ||
23 | &.generic-channel { | 23 | .main-avatar { |
24 | .account { | 24 | @include main(); |
25 | @include main(); | ||
26 | } | ||
27 | |||
28 | .channel { | ||
29 | display: none !important; | ||
30 | } | ||
31 | } | 25 | } |
32 | 26 | ||
33 | &:not(.generic-channel) { | 27 | .second-avatar { |
34 | .account { | 28 | @include secondary(); |
35 | @include secondary(); | ||
36 | } | ||
37 | |||
38 | .channel { | ||
39 | @include main(); | ||
40 | } | ||
41 | } | 29 | } |
42 | } | 30 | } |
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts index 63edd7bad..146c440b3 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts | |||
@@ -10,7 +10,8 @@ export class VideoAvatarChannelComponent implements OnInit { | |||
10 | @Input() video: Video | 10 | @Input() video: Video |
11 | @Input() byAccount: string | 11 | @Input() byAccount: string |
12 | 12 | ||
13 | @Input() genericChannel: boolean | 13 | @Input() showAccount: boolean |
14 | @Input() showChannel: boolean | ||
14 | 15 | ||
15 | channelLinkTitle = '' | 16 | channelLinkTitle = '' |
16 | accountLinkTitle = '' | 17 | accountLinkTitle = '' |
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html index 45cfba167..df74a818b 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.html +++ b/client/src/app/+videos/+video-watch/video-watch.component.html | |||
@@ -60,7 +60,7 @@ | |||
60 | 60 | ||
61 | <div class="pt-3 border-top video-info-channel d-flex"> | 61 | <div class="pt-3 border-top video-info-channel d-flex"> |
62 | <div class="video-info-channel-left d-flex"> | 62 | <div class="video-info-channel-left d-flex"> |
63 | <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel> | 63 | <my-video-avatar-channel [video]="video" [showChannel]="!isChannelDisplayNameGeneric()"></my-video-avatar-channel> |
64 | 64 | ||
65 | <div class="video-info-channel-left-links ml-1"> | 65 | <div class="video-info-channel-left-links ml-1"> |
66 | <ng-container *ngIf="!isChannelDisplayNameGeneric()"> | 66 | <ng-container *ngIf="!isChannelDisplayNameGeneric()"> |