diff --git a/frontend/src/app/bans/details/details.component.html b/frontend/src/app/bans/details/details.component.html index 517d5d9..035db8a 100644 --- a/frontend/src/app/bans/details/details.component.html +++ b/frontend/src/app/bans/details/details.component.html @@ -20,11 +20,23 @@
- {{ this.historyFormat.getType(punishment) }} + + {{ this.historyFormat.getType(punishment) }} +
{{ this.historyFormat.isActive(punishment) ? 'Active' : 'Inactive' }} + class="tag tagInfo" + [ngClass]="{ + 'tagActive': this.historyFormat.isActive(punishment), + 'tagInactive': !this.historyFormat.isActive(punishment) + }"> + {{ this.historyFormat.isActive(punishment) ? 'Active' : 'Inactive' }} +
@@ -34,7 +46,7 @@

Player

- {{punishment.username}}'s Minecraft skin

Moderator

- {{punishment.punishedBy}}'s Minecraft skin Date.now(); } + public isPermanent(entry: PunishmentHistory): boolean { + return entry.expiryTime <= 0; + } + public getType(entry: PunishmentHistory): string { return entry.type.charAt(0).toUpperCase() + entry.type.slice(1); } @@ -48,11 +58,11 @@ export class HistoryFormatService { }) + " " + suffix; } - public getAvatarUrl(entry: string): string { + public getAvatarUrl(entry: string, size: string = '25'): string { let uuid = entry.replace('-', ''); if (uuid === 'C') { uuid = "f78a4d8dd51b4b3998a3230f2de0c670" } - return `https://crafatar.com/avatars/${uuid}?size=25&overlay`; + return `https://crafatar.com/avatars/${uuid}?size=${size}&overlay`; } }