Kavita/UI/Web/src/app/admin/manage-scrobble-errors/manage-scrobble-errors.component.html
Robbie Davis ff79710ac6
UX Overhaul Part 1 (#3047)
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
2024-08-09 10:55:31 -07:00

65 lines
2.2 KiB
HTML

<ng-container *transloco="let t; read: 'manage-scrobble-errors'">
<h4>{{t('title')}}</h4>
<p>{{t('description')}}</p>
<form [formGroup]="formGroup">
<div class="row g-0 mb-3">
<div class="col-md-12">
<label for="filter" class="visually-hidden">{{t('filter-label')}}</label>
<div class="input-group">
<input id="filter" type="text" class="form-control" [placeholder]="t('filter-label')" formControlName="filter" />
<button class="btn btn-primary" type="button" (click)="clear()">{{t('clear-errors')}}</button>
</div>
</div>
</div>
</form>
<table class="table table-striped table-sm">
<thead #header>
<tr>
<th scope="col" sortable="seriesId" (sort)="onSort($event)">
{{t('series-header')}}
</th>
<th scope="col" sortable="created" (sort)="onSort($event)">
{{t('created-header')}}
</th>
<th scope="col" sortable="comment" (sort)="onSort($event)">
{{t('comment-header')}}
</th>
<th scope="col">
{{t('edit-header')}}
</th>
</tr>
</thead>
<tbody #container>
@if (isLoading) {
<tr><td colspan="4" style="text-align: center;"><app-loading [loading]="isLoading"></app-loading></td></tr>
} @else {
@if(data | filter: filterList; as filteredData) {
@for(item of filteredData; track item.seriesId; let i = $index) {
<tr>
<td>
<a href="library/{{item.libraryId}}/series/{{item.seriesId}}" target="_blank">{{item.details}}</a>
</td>
<td>
{{item.createdUtc | utcToLocalTime | defaultValue }}
</td>
<td>
{{item.comment}}
</td>
<td>
<button class="btn btn-icon primary-icon" (click)="editSeries(item.seriesId)">
<i class="fa fa-pen me-1" aria-hidden="true"></i>
<span class="visually-hidden">{{t('edit-item-alt', {seriesName: item.details})}}</span>
</button>
</td>
</tr>
}
@empty {
<tr><td colspan="4" style="text-align: center;">{{t('no-data')}}</td></tr>
}
}
}
</tbody>
</table>
</ng-container>