diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/shared/shared-actor-image/actor-avatar.component.html | 2 | ||||
-rw-r--r-- | client/src/app/shared/shared-actor-image/actor-avatar.component.ts | 9 |
2 files changed, 1 insertions, 10 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 fb9efc20a..011afef27 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,5 +1,5 @@ | |||
1 | <ng-template #img> | 1 | <ng-template #img> |
2 | <img *ngIf="displayImage()" [class]="classes" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" /> | 2 | <img *ngIf="displayImage()" [class]="classes" [src]="previewImage || avatarUrl || defaultAvatarUrl" alt="" /> |
3 | 3 | ||
4 | <div *ngIf="displayActorInitial()" [ngClass]="classes"> | 4 | <div *ngIf="displayActorInitial()" [ngClass]="classes"> |
5 | <span>{{ getActorInitial() }}</span> | 5 | <span>{{ getActorInitial() }}</span> |
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..8e6ad4015 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 { | |||
43 | } | 43 | } |
44 | 44 | ||
45 | classes: string[] = [] | 45 | classes: string[] = [] |
46 | alt: string | ||
47 | defaultAvatarUrl: string | 46 | defaultAvatarUrl: string |
48 | avatarUrl: string | 47 | avatarUrl: string |
49 | 48 | ||
50 | ngOnInit () { | 49 | ngOnInit () { |
51 | this.buildDefaultAvatarUrl() | 50 | this.buildDefaultAvatarUrl() |
52 | 51 | ||
53 | this.buildAlt() | ||
54 | this.buildAvatarUrl() | 52 | this.buildAvatarUrl() |
55 | this.buildClasses() | 53 | this.buildClasses() |
56 | } | 54 | } |
57 | 55 | ||
58 | ngOnChanges () { | 56 | ngOnChanges () { |
59 | this.buildAlt() | ||
60 | this.buildAvatarUrl() | 57 | this.buildAvatarUrl() |
61 | this.buildClasses() | 58 | this.buildClasses() |
62 | } | 59 | } |
@@ -81,12 +78,6 @@ export class ActorAvatarComponent implements OnInit, OnChanges { | |||
81 | } | 78 | } |
82 | } | 79 | } |
83 | 80 | ||
84 | private buildAlt () { | ||
85 | if (this.isAccount()) this.alt = $localize`Account avatar` | ||
86 | else if (this.isChannel()) this.alt = $localize`Channel avatar` | ||
87 | else this.alt = '' | ||
88 | } | ||
89 | |||
90 | private buildDefaultAvatarUrl () { | 81 | private buildDefaultAvatarUrl () { |
91 | this.defaultAvatarUrl = this.isChannel() | 82 | this.defaultAvatarUrl = this.isChannel() |
92 | ? VideoChannel.GET_DEFAULT_AVATAR_URL(this.getSizeNumber()) | 83 | ? VideoChannel.GET_DEFAULT_AVATAR_URL(this.getSizeNumber()) |