Refactor avatar URL generation into reusable method

Centralized avatar URL generation with `getAvatarUrl()` method to reduce redundancy and improve code maintainability. Updated relevant components to utilize the new method for cleaner and more consistent implementation.
This commit is contained in:
2025-04-12 17:20:47 +02:00
parent 6a70428c75
commit a70159e88d
4 changed files with 35 additions and 25 deletions
@@ -21,7 +21,7 @@
<tr *ngFor="let entry of history">
<td class="historyType">{{ getType(entry) }}</td>
<td class="historyPlayer">
<img class="avatar" ngSrc="https://cravatar.eu/avatar/cba80e47fcbc407aa5ad37a933b7fe30/25" width="25px"
<img class="avatar" [ngSrc]="getAvatarUrl(entry)" width="25px"
height="25px" alt="">
{{ entry.username }}
</td>