X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-actor-image%2Factor-avatar.component.ts;h=b06c2bae6547cf6946e5da965fcccf24fcffdd36;hb=8f608a4cb22ab232cfab20665050764b38bac9c7;hp=e4efbe475e038f294ea4d893071677971830f9c1;hpb=8b5c8cd1e52d685de65942a08cdda16eb0bf8b33;p=github%2FChocobozzz%2FPeerTube.git 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 e4efbe475..b06c2bae6 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 @@ -9,6 +9,8 @@ type ActorInput = { url: string } +export type ActorAvatarSize = '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120' + @Component({ selector: 'my-actor-avatar', styleUrls: [ './actor-avatar.component.scss' ], @@ -20,7 +22,7 @@ export class ActorAvatarComponent { @Input() previewImage: SafeResourceUrl - @Input() size: '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120' + @Input() size: ActorAvatarSize // Use an external link @Input() href: string @@ -53,8 +55,8 @@ export class ActorAvatarComponent { if (this.size) base.push(`avatar-${this.size}`) - if (this.account) base.push('account') - else base.push('channel') + if (this.channel) base.push('channel') + else base.push('account') if (type === 'initial' && this.initial) { base.push('initial') @@ -65,10 +67,9 @@ export class ActorAvatarComponent { } get defaultAvatarUrl () { - if (this.account) Account.GET_DEFAULT_AVATAR_URL() if (this.channel) return VideoChannel.GET_DEFAULT_AVATAR_URL() - return '' + return Account.GET_DEFAULT_AVATAR_URL() } get avatarUrl () { @@ -98,7 +99,7 @@ export class ActorAvatarComponent { jkl: 'gray', mno: 'yellow', pqr: 'orange', - stv: 'red', + stvu: 'red', wxyz: 'dark-blue' }