Files
SimpleCloudNotifier/webapp/src/app/features/senders/sender-list/sender-list.component.html

96 lines
2.8 KiB
HTML

<div class="page-content">
<div class="page-header">
<h2>Senders</h2>
<button nz-button (click)="refresh()">
<span nz-icon nzType="reload"></span>
Refresh
</button>
</div>
<nz-card>
<nz-tabset (nzSelectedIndexChange)="onTabChange($event)">
<nz-tab nzTitle="My Senders">
<nz-table
#mySenderTable
[nzData]="mySenders()"
[nzLoading]="loadingMy()"
[nzShowPagination]="false"
[nzNoResult]="noResultTpl"
nzSize="middle"
>
<ng-template #noResultTpl></ng-template>
<thead>
<tr>
<th nzWidth="40%">Sender Name</th>
<th nzWidth="20%">Message Count</th>
<th nzWidth="40%">Last Used</th>
</tr>
</thead>
<tbody>
@for (sender of mySenders(); track sender.name) {
<tr>
<td>
<span class="sender-name">{{ sender.name || '(No name)' }}</span>
</td>
<td>{{ sender.count }}</td>
<td>
<span nz-tooltip [nzTooltipTitle]="sender.last_timestamp">
{{ sender.last_timestamp | relativeTime }}
</span>
</td>
</tr>
} @empty {
<tr>
<td colspan="3">
<nz-empty nzNotFoundContent="No senders found"></nz-empty>
</td>
</tr>
}
</tbody>
</nz-table>
</nz-tab>
<nz-tab nzTitle="All Senders">
<nz-table
#allSenderTable
[nzData]="allSenders()"
[nzLoading]="loadingAll()"
[nzShowPagination]="false"
[nzNoResult]="noResultTpl2"
nzSize="middle"
>
<ng-template #noResultTpl2></ng-template>
<thead>
<tr>
<th nzWidth="40%">Sender Name</th>
<th nzWidth="20%">Message Count</th>
<th nzWidth="40%">Last Used</th>
</tr>
</thead>
<tbody>
@for (sender of allSenders(); track sender.name) {
<tr>
<td>
<span class="sender-name">{{ sender.name || '(No name)' }}</span>
</td>
<td>{{ sender.count }}</td>
<td>
<span nz-tooltip [nzTooltipTitle]="sender.last_timestamp">
{{ sender.last_timestamp | relativeTime }}
</span>
</td>
</tr>
} @empty {
<tr>
<td colspan="3">
<nz-empty nzNotFoundContent="No senders found"></nz-empty>
</td>
</tr>
}
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
</nz-card>
</div>