Verified Commit 8b5c8cd1 authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix actor avatar background

parent 931d3430
<ng-template #img>
<img *ngIf="previewImage || avatarUrl || !initial" [class]="class" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" />
<img *ngIf="previewImage || avatarUrl || !initial" [class]="getClass('avatar')" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" />
<div *ngIf="!avatarUrl && initial" [class]="class">
<div *ngIf="!avatarUrl && initial" [class]="getClass('initial')">
<span>{{ initial }}</span>
</div>
</ng-template>
......
......@@ -48,7 +48,7 @@ export class ActorAvatarComponent {
return ''
}
get class () {
getClass (type: 'avatar' | 'initial') {
const base = [ 'avatar' ]
if (this.size) base.push(`avatar-${this.size}`)
......@@ -56,7 +56,7 @@ export class ActorAvatarComponent {
if (this.account) base.push('account')
else base.push('channel')
if (this.initial) {
if (type === 'initial' && this.initial) {
base.push('initial')
base.push(this.getColorTheme())
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment