diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-28 11:49:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-28 11:49:34 +0200 |
commit | 746018f6b81b40e8858303662ac9ec5ce59ac6eb (patch) | |
tree | 7b115d12c1926e6283346072fe1c6adbf056abd7 /client/src/app/+my-library | |
parent | ec489ce2f74570f94dffb62266f4ed6f18621b3e (diff) | |
download | PeerTube-746018f6b81b40e8858303662ac9ec5ce59ac6eb.tar.gz PeerTube-746018f6b81b40e8858303662ac9ec5ce59ac6eb.tar.zst PeerTube-746018f6b81b40e8858303662ac9ec5ce59ac6eb.zip |
Refactor actor avatar display
Diffstat (limited to 'client/src/app/+my-library')
7 files changed, 27 insertions, 17 deletions
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html index b704a1cc6..a2bdfa31a 100644 --- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html +++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html | |||
@@ -22,9 +22,7 @@ | |||
22 | 22 | ||
23 | <div class="video-channels"> | 23 | <div class="video-channels"> |
24 | <div *ngFor="let videoChannel of videoChannels; let i = index" class="video-channel"> | 24 | <div *ngFor="let videoChannel of videoChannels; let i = index" class="video-channel"> |
25 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]"> | 25 | <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/video-channels', videoChannel.nameWithHost ]"></my-actor-avatar> |
26 | <img [src]="videoChannel.avatarUrl" alt="Avatar" /> | ||
27 | </a> | ||
28 | 26 | ||
29 | <div class="video-channel-info"> | 27 | <div class="video-channel-info"> |
30 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page"> | 28 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page"> |
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss index 8804fa95c..dafba925e 100644 --- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss +++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss | |||
@@ -20,8 +20,8 @@ input[type=text] { | |||
20 | 20 | ||
21 | padding-bottom: 0; | 21 | padding-bottom: 0; |
22 | 22 | ||
23 | img { | 23 | my-actor-avatar { |
24 | @include channel-avatar(80px); | 24 | @include actor-avatar-size(80px); |
25 | 25 | ||
26 | margin-right: 10px; | 26 | margin-right: 10px; |
27 | } | 27 | } |
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.module.ts b/client/src/app/+my-library/+my-video-channels/my-video-channels.module.ts index a23b53ee0..c775bfdee 100644 --- a/client/src/app/+my-library/+my-video-channels/my-video-channels.module.ts +++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.module.ts | |||
@@ -8,6 +8,7 @@ import { MyVideoChannelCreateComponent } from './my-video-channel-create.compone | |||
8 | import { MyVideoChannelUpdateComponent } from './my-video-channel-update.component' | 8 | import { MyVideoChannelUpdateComponent } from './my-video-channel-update.component' |
9 | import { MyVideoChannelsRoutingModule } from './my-video-channels-routing.module' | 9 | import { MyVideoChannelsRoutingModule } from './my-video-channels-routing.module' |
10 | import { MyVideoChannelsComponent } from './my-video-channels.component' | 10 | import { MyVideoChannelsComponent } from './my-video-channels.component' |
11 | import { SharedActorImageModule } from '@app/shared/shared-actor-image/shared-actor-image.module' | ||
11 | 12 | ||
12 | @NgModule({ | 13 | @NgModule({ |
13 | imports: [ | 14 | imports: [ |
@@ -18,7 +19,8 @@ import { MyVideoChannelsComponent } from './my-video-channels.component' | |||
18 | SharedMainModule, | 19 | SharedMainModule, |
19 | SharedFormModule, | 20 | SharedFormModule, |
20 | SharedGlobalIconModule, | 21 | SharedGlobalIconModule, |
21 | SharedActorImageEditModule | 22 | SharedActorImageEditModule, |
23 | SharedActorImageModule | ||
22 | ], | 24 | ], |
23 | 25 | ||
24 | declarations: [ | 26 | declarations: [ |
diff --git a/client/src/app/+my-library/my-library.module.ts b/client/src/app/+my-library/my-library.module.ts index a1d706f0b..264ad03f7 100644 --- a/client/src/app/+my-library/my-library.module.ts +++ b/client/src/app/+my-library/my-library.module.ts | |||
@@ -26,7 +26,7 @@ import { MyVideoPlaylistUpdateComponent } from './my-video-playlists/my-video-pl | |||
26 | import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component' | 26 | import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component' |
27 | import { VideoChangeOwnershipComponent } from './my-videos/modals/video-change-ownership.component' | 27 | import { VideoChangeOwnershipComponent } from './my-videos/modals/video-change-ownership.component' |
28 | import { MyVideosComponent } from './my-videos/my-videos.component' | 28 | import { MyVideosComponent } from './my-videos/my-videos.component' |
29 | import { SharedAccountAvatarModule } from '../shared/shared-account-avatar/shared-account-avatar.module' | 29 | import { SharedActorImageModule } from '../shared/shared-actor-image/shared-actor-image.module' |
30 | 30 | ||
31 | @NgModule({ | 31 | @NgModule({ |
32 | imports: [ | 32 | imports: [ |
@@ -47,7 +47,7 @@ import { SharedAccountAvatarModule } from '../shared/shared-account-avatar/share | |||
47 | SharedAbuseListModule, | 47 | SharedAbuseListModule, |
48 | SharedShareModal, | 48 | SharedShareModal, |
49 | SharedVideoLiveModule, | 49 | SharedVideoLiveModule, |
50 | SharedAccountAvatarModule | 50 | SharedActorImageModule |
51 | ], | 51 | ], |
52 | 52 | ||
53 | declarations: [ | 53 | declarations: [ |
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.html b/client/src/app/+my-library/my-ownership/my-ownership.component.html index d0eff0521..4c02c78fc 100644 --- a/client/src/app/+my-library/my-ownership/my-ownership.component.html +++ b/client/src/app/+my-library/my-ownership/my-ownership.component.html | |||
@@ -37,7 +37,7 @@ | |||
37 | <td> | 37 | <td> |
38 | <a [href]="videoChangeOwnership.initiatorAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | 38 | <a [href]="videoChangeOwnership.initiatorAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> |
39 | <div class="chip two-lines"> | 39 | <div class="chip two-lines"> |
40 | <my-account-avatar [account]="videoChangeOwnership.initiatorAccount"></my-account-avatar> | 40 | <my-actor-avatar [account]="videoChangeOwnership.initiatorAccount"></my-actor-avatar> |
41 | <div> | 41 | <div> |
42 | {{ videoChangeOwnership.initiatorAccount.displayName }} | 42 | {{ videoChangeOwnership.initiatorAccount.displayName }} |
43 | <span class="text-muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span> | 43 | <span class="text-muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span> |
diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html index ff448ad87..853d47fe6 100644 --- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html +++ b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html | |||
@@ -19,9 +19,7 @@ | |||
19 | 19 | ||
20 | <div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> | 20 | <div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> |
21 | <div *ngFor="let videoChannel of videoChannels" class="video-channel"> | 21 | <div *ngFor="let videoChannel of videoChannels" class="video-channel"> |
22 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]"> | 22 | <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/video-channels', videoChannel.nameWithHost ]"></my-actor-avatar> |
23 | <img [src]="videoChannel.avatarUrl" alt="Avatar" /> | ||
24 | </a> | ||
25 | 23 | ||
26 | <div class="video-channel-info"> | 24 | <div class="video-channel-info"> |
27 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page"> | 25 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page"> |
@@ -33,7 +31,8 @@ | |||
33 | 31 | ||
34 | <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Owner account page" class="actor-owner"> | 32 | <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Owner account page" class="actor-owner"> |
35 | <span i18n>Created by {{ videoChannel.ownerBy }}</span> | 33 | <span i18n>Created by {{ videoChannel.ownerBy }}</span> |
36 | <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" /> | 34 | |
35 | <my-actor-avatar [account]="videoChannel.ownerAccount" size="18"></my-actor-avatar> | ||
37 | </a> | 36 | </a> |
38 | </div> | 37 | </div> |
39 | 38 | ||
diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss index 3c1a4d2ad..53ceaa250 100644 --- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss +++ b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss | |||
@@ -8,8 +8,8 @@ input[type=text] { | |||
8 | .video-channel { | 8 | .video-channel { |
9 | @include row-blocks; | 9 | @include row-blocks; |
10 | 10 | ||
11 | img { | 11 | > my-actor-avatar { |
12 | @include channel-avatar(80px); | 12 | @include actor-avatar-size(80px); |
13 | 13 | ||
14 | margin-right: 10px; | 14 | margin-right: 10px; |
15 | } | 15 | } |
@@ -40,9 +40,20 @@ input[type=text] { | |||
40 | } | 40 | } |
41 | 41 | ||
42 | .actor-owner { | 42 | .actor-owner { |
43 | @include actor-owner; | 43 | @include disable-default-a-behaviour; |
44 | |||
45 | font-size: 13px; | ||
46 | color: pvar(--mainForegroundColor); | ||
44 | 47 | ||
45 | margin-top: 0; | 48 | span:hover { |
49 | opacity: 0.8; | ||
50 | } | ||
51 | |||
52 | my-actor-avatar { | ||
53 | margin-left: 7px; | ||
54 | display: inline-block; | ||
55 | vertical-align: top; | ||
56 | } | ||
46 | } | 57 | } |
47 | 58 | ||
48 | .video-subscriptions-header { | 59 | .video-subscriptions-header { |