diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-29 09:10:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-29 09:10:57 +0200 |
commit | 8b5c8cd1e52d685de65942a08cdda16eb0bf8b33 (patch) | |
tree | 527416f0f30331555d1a549af62dc9d3d07e01f8 /client/src/app/shared | |
parent | 931d3430184143ebd88e5243def6eb1d7acfdbf4 (diff) | |
download | PeerTube-8b5c8cd1e52d685de65942a08cdda16eb0bf8b33.tar.gz PeerTube-8b5c8cd1e52d685de65942a08cdda16eb0bf8b33.tar.zst PeerTube-8b5c8cd1e52d685de65942a08cdda16eb0bf8b33.zip |
Fix actor avatar background
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/shared-actor-image/actor-avatar.component.html | 4 | ||||
-rw-r--r-- | client/src/app/shared/shared-actor-image/actor-avatar.component.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.html b/client/src/app/shared/shared-actor-image/actor-avatar.component.html index 607f28e5b..13a5385a8 100644 --- a/client/src/app/shared/shared-actor-image/actor-avatar.component.html +++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.html | |||
@@ -1,7 +1,7 @@ | |||
1 | <ng-template #img> | 1 | <ng-template #img> |
2 | <img *ngIf="previewImage || avatarUrl || !initial" [class]="class" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" /> | 2 | <img *ngIf="previewImage || avatarUrl || !initial" [class]="getClass('avatar')" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" /> |
3 | 3 | ||
4 | <div *ngIf="!avatarUrl && initial" [class]="class"> | 4 | <div *ngIf="!avatarUrl && initial" [class]="getClass('initial')"> |
5 | <span>{{ initial }}</span> | 5 | <span>{{ initial }}</span> |
6 | </div> | 6 | </div> |
7 | </ng-template> | 7 | </ng-template> |
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts index 71e020cba..e4efbe475 100644 --- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts +++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts | |||
@@ -48,7 +48,7 @@ export class ActorAvatarComponent { | |||
48 | return '' | 48 | return '' |
49 | } | 49 | } |
50 | 50 | ||
51 | get class () { | 51 | getClass (type: 'avatar' | 'initial') { |
52 | const base = [ 'avatar' ] | 52 | const base = [ 'avatar' ] |
53 | 53 | ||
54 | if (this.size) base.push(`avatar-${this.size}`) | 54 | if (this.size) base.push(`avatar-${this.size}`) |
@@ -56,7 +56,7 @@ export class ActorAvatarComponent { | |||
56 | if (this.account) base.push('account') | 56 | if (this.account) base.push('account') |
57 | else base.push('channel') | 57 | else base.push('channel') |
58 | 58 | ||
59 | if (this.initial) { | 59 | if (type === 'initial' && this.initial) { |
60 | base.push('initial') | 60 | base.push('initial') |
61 | base.push(this.getColorTheme()) | 61 | base.push(this.getColorTheme()) |
62 | } | 62 | } |