fix(ui): use authenticated user avatarUrl instead of fallback initial in chat

This commit is contained in:
lidf 2026-04-12 16:33:47 +08:00
parent 82c5e5828c
commit f31c1eb947

View File

@ -143,7 +143,10 @@
<!-- 用户头像:圆形 --> <!-- 用户头像:圆形 -->
<div class="msg-avatar user-avatar" *ngIf="msg.role === 'user'"> <div class="msg-avatar user-avatar" *ngIf="msg.role === 'user'">
{{ auth.user()?.name?.charAt(0) || '我' }} <img *ngIf="auth.user()?.avatarUrl" [src]="auth.user()?.avatarUrl" alt="User" style="width: 100%; height: 100%; border-radius: 50%; object-fit: cover;">
<ng-container *ngIf="!auth.user()?.avatarUrl">
{{ auth.user()?.name?.charAt(0) || '我' }}
</ng-container>
</div> </div>
</div> </div>
} }