]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-actor-image/actor-avatar.component.ts
Fix actor avatar background
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-actor-image / actor-avatar.component.ts
index 6bb3b65fa31a826835a24285d050ba3e7a353da8..e4efbe475e038f294ea4d893071677971830f9c1 100644 (file)
@@ -48,7 +48,7 @@ export class ActorAvatarComponent {
     return ''
   }
 
-  get class () {
+  getClass (type: 'avatar' | 'initial') {
     const base = [ 'avatar' ]
 
     if (this.size) base.push(`avatar-${this.size}`)
@@ -56,7 +56,7 @@ export class ActorAvatarComponent {
     if (this.account) base.push('account')
     else base.push('channel')
 
-    if (this.initial) {
+    if (type === 'initial' && this.initial) {
       base.push('initial')
       base.push(this.getColorTheme())
     }
@@ -73,7 +73,7 @@ export class ActorAvatarComponent {
 
   get avatarUrl () {
     if (this.account) return Account.GET_ACTOR_AVATAR_URL(this.account)
-    if (this.channel) return VideoChannel.GET_ACTOR_AVATAR_URL(this.account)
+    if (this.channel) return VideoChannel.GET_ACTOR_AVATAR_URL(this.channel)
 
     return ''
   }