diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/shared/shared-actor-image/actor-avatar.component.html | 4 | ||||
-rw-r--r-- | client/src/app/shared/shared-actor-image/actor-avatar.component.ts | 4 |
2 files changed, 4 insertions, 4 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 607f28e5b..13a5385a8 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,7 +1,7 @@ | |||
1 | <ng-template #img> | 1 | <ng-template #img> |
2 | <img *ngIf="previewImage || avatarUrl || !initial" [class]="class" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" /> | 2 | <img *ngIf="previewImage || avatarUrl || !initial" [class]="getClass('avatar')" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" /> |
3 | 3 | ||
4 | <div *ngIf="!avatarUrl && initial" [class]="class"> | 4 | <div *ngIf="!avatarUrl && initial" [class]="getClass('initial')"> |
5 | <span>{{ initial }}</span> | 5 | <span>{{ initial }}</span> |
6 | </div> | 6 | </div> |
7 | </ng-template> | 7 | </ng-template> |
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 71e020cba..e4efbe475 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 | |||
@@ -48,7 +48,7 @@ export class ActorAvatarComponent { | |||
48 | return '' | 48 | return '' |
49 | } | 49 | } |
50 | 50 | ||
51 | get class () { | 51 | getClass (type: 'avatar' | 'initial') { |
52 | const base = [ 'avatar' ] | 52 | const base = [ 'avatar' ] |
53 | 53 | ||
54 | if (this.size) base.push(`avatar-${this.size}`) | 54 | if (this.size) base.push(`avatar-${this.size}`) |
@@ -56,7 +56,7 @@ export class ActorAvatarComponent { | |||
56 | if (this.account) base.push('account') | 56 | if (this.account) base.push('account') |
57 | else base.push('channel') | 57 | else base.push('channel') |
58 | 58 | ||
59 | if (this.initial) { | 59 | if (type === 'initial' && this.initial) { |
60 | base.push('initial') | 60 | base.push('initial') |
61 | base.push(this.getColorTheme()) | 61 | base.push(this.getColorTheme()) |
62 | } | 62 | } |