Replace edit button with a Material icon, adjust styles, and add MatIconModule to component imports.

This commit is contained in:
akastijn 2025-10-24 21:28:20 +02:00
parent 64ea68ab39
commit 8bfcdb6ccc
3 changed files with 11 additions and 4 deletions

View File

@ -14,7 +14,7 @@
<th class="historyDate">Date</th>
<th class="historyDate">Expires</th>
@if (canEdit()) {
<th class="historyActions">Actions</th>
<th class="historyActions"></th>
}
</tr>
</thead>
@ -51,8 +51,8 @@
{{ this.historyFormat.getExpiredTime(entry) }}
</td>
@if (canEdit()) {
<td class="historyActions">
<button (click)="$event.stopPropagation(); openEdit(entry)">Edit</button>
<td class="historyActions" (click)="openEdit(entry)">
<mat-icon>edit</mat-icon>
</td>
}
</tr>

View File

@ -111,3 +111,8 @@ img {
.historyDate {
width: 170px;
}
.historyActions {
width: 100px;
padding: 0 10px 0 10px;
}

View File

@ -11,12 +11,14 @@ import {Router} from '@angular/router';
import {AuthService} from '@services/auth.service';
import {MatDialog} from '@angular/material/dialog';
import {EditPunishmentDialogComponent} from '../edit-punishment-dialog/edit-punishment-dialog.component';
import {MatIconModule} from '@angular/material/icon';
@Component({
selector: 'app-history',
imports: [
NgOptimizedImage,
RemoveTrailingPeriodPipe
RemoveTrailingPeriodPipe,
MatIconModule,
],
templateUrl: './history.component.html',
styleUrl: './history.component.scss',