diff options
author | Chocobozzz <me@florianbigard.com> | 2023-03-06 16:16:43 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-03-07 10:18:32 +0100 |
commit | 145d7da2dea7234b0be0212a998d27efea4f1320 (patch) | |
tree | 1c8281de626df75b28451ec7280e39875b49d1e4 /client/src | |
parent | b52f50484878b17a1f3446083b9c1fcaebdc1b59 (diff) | |
download | PeerTube-145d7da2dea7234b0be0212a998d27efea4f1320.tar.gz PeerTube-145d7da2dea7234b0be0212a998d27efea4f1320.tar.zst PeerTube-145d7da2dea7234b0be0212a998d27efea4f1320.zip |
Don't display alt for actor images
We don't need it since it's just a "cosmetic" image
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()) |