Fixed punishment removed message closes #12
This commit is contained in:
parent
07c77f5485
commit
43b75b8e74
|
|
@ -22,14 +22,14 @@
|
||||||
<td class="historyType" (click)="showDetailedPunishment(entry)">
|
<td class="historyType" (click)="showDetailedPunishment(entry)">
|
||||||
{{ this.historyFormat.getType(entry) }}
|
{{ this.historyFormat.getType(entry) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="historyPlayer" (click)="setSearch(entry.type, entry.username, 'player')">
|
<td class="historyPlayer" (click)="setSearch(entry.username, 'player')">
|
||||||
<div class="playerContainer">
|
<div class="playerContainer">
|
||||||
<img class="avatar" [ngSrc]="this.historyFormat.getAvatarUrl(entry.uuid)" width="25" height="25"
|
<img class="avatar" [ngSrc]="this.historyFormat.getAvatarUrl(entry.uuid)" width="25" height="25"
|
||||||
alt="{{entry.username}}'s Minecraft skin">
|
alt="{{entry.username}}'s Minecraft skin">
|
||||||
<span class="username">{{ entry.username }}</span>
|
<span class="username">{{ entry.username }}</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="historyPlayer" (click)="setSearch(entry.type, entry.punishedBy, 'staff')">
|
<td class="historyPlayer" (click)="setSearch(entry.punishedBy, 'staff')">
|
||||||
<div class="playerContainer">
|
<div class="playerContainer">
|
||||||
<img class="avatar" [ngSrc]="this.historyFormat.getAvatarUrl(entry.punishedByUuid)" width="25" height="25"
|
<img class="avatar" [ngSrc]="this.historyFormat.getAvatarUrl(entry.punishedByUuid)" width="25" height="25"
|
||||||
alt="{{entry.punishedBy}}'s Minecraft skin">
|
alt="{{entry.punishedBy}}'s Minecraft skin">
|
||||||
|
|
|
||||||
|
|
@ -93,25 +93,10 @@ export class HistoryComponent implements OnInit, OnChanges {
|
||||||
).subscribe();
|
).subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
setSearch(type: PunishmentHistory.TypeEnum, name: string, userType: 'player' | 'staff') {
|
setSearch(name: string, userType: 'player' | 'staff') {
|
||||||
let punishmentType: 'all' | 'ban' | 'mute' | 'kick' | 'warn' = 'all';
|
|
||||||
switch (type) {
|
|
||||||
case 'ban':
|
|
||||||
punishmentType = 'ban';
|
|
||||||
break;
|
|
||||||
case 'mute':
|
|
||||||
punishmentType = 'mute';
|
|
||||||
break;
|
|
||||||
case 'kick':
|
|
||||||
punishmentType = 'kick';
|
|
||||||
break;
|
|
||||||
case 'warn':
|
|
||||||
punishmentType = 'warn';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
let searchParams: SearchParams = {
|
let searchParams: SearchParams = {
|
||||||
userType: userType,
|
userType: userType,
|
||||||
punishmentType: punishmentType,
|
punishmentType: 'all',
|
||||||
searchTerm: name
|
searchTerm: name
|
||||||
}
|
}
|
||||||
this.selectItem.emit(searchParams);
|
this.selectItem.emit(searchParams);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user