X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-actor-image%2Factor-avatar.component.ts;h=f1c1aa03f388215b06a849776abb9ef414b4b1a0;hb=d0fbc9fd0a29c37f3ff9b99030351e90b276fe7d;hp=a52e68a176614f856e4823f89bf0b83194512df5;hpb=9e401fde36bdcb4b5e8dc54262c01f1e660d81a8;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 a52e68a17..f1c1aa03f 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 @@ -43,20 +43,17 @@ export class ActorAvatarComponent implements OnInit, OnChanges { } classes: string[] = [] - alt: string defaultAvatarUrl: string avatarUrl: string ngOnInit () { this.buildDefaultAvatarUrl() - this.buildAlt() this.buildAvatarUrl() this.buildClasses() } ngOnChanges () { - this.buildAlt() this.buildAvatarUrl() this.buildClasses() } @@ -81,12 +78,6 @@ export class ActorAvatarComponent implements OnInit, OnChanges { } } - private buildAlt () { - if (this.isAccount()) this.alt = $localize`Account avatar` - else if (this.isChannel()) this.alt = $localize`Channel avatar` - else this.alt = '' - } - private buildDefaultAvatarUrl () { this.defaultAvatarUrl = this.isChannel() ? VideoChannel.GET_DEFAULT_AVATAR_URL(this.getSizeNumber()) @@ -154,13 +145,13 @@ export class ActorAvatarComponent implements OnInit, OnChanges { // Keep consistency with CSS const themes = { '0123456789abc': 'blue', - def: 'green', - ghi: 'purple', - jkl: 'gray', - mno: 'yellow', - pqr: 'orange', - stvu: 'red', - wxyz: 'dark-blue' + 'def': 'green', + 'ghi': 'purple', + 'jkl': 'gray', + 'mno': 'yellow', + 'pqr': 'orange', + 'stvu': 'red', + 'wxyz': 'dark-blue' } const theme = Object.keys(themes)