Add custom avatar for console entries in ban history

Updated the `getAvatarUrl` method to return a specific avatar image for console entries. This ensures better visual distinction for console-generated actions in the ban history.
This commit is contained in:
Teriuihi 2025-04-12 22:20:45 +02:00
parent a5adb031bd
commit 3a2a54050f

View File

@ -95,6 +95,9 @@ export class HistoryComponent implements OnInit, OnChanges {
public getAvatarUrl(entry: string): string { public getAvatarUrl(entry: string): string {
let uuid = entry.replace('-', ''); let uuid = entry.replace('-', '');
if (uuid === 'C') {
return '/public/img/random/console.png';
}
return `https://crafatar.com/avatars/${uuid}?size=25&overlay`; return `https://crafatar.com/avatars/${uuid}?size=25&overlay`;
} }
} }