]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html
Refactor actor avatar display
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / instance-blocklist / instance-account-blocklist.component.html
1 <p-table
2 [value]="blockedAccounts" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($event)"
4 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
5 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted accounts"
6 >
7 <ng-template pTemplate="caption">
8 <div class="caption">
9 <div class="ml-auto has-feedback has-clear">
10 <input
11 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
12 (keyup)="onSearch($event)"
13 >
14 <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a>
15 <span class="sr-only" i18n>Clear filters</span>
16 </div>
17 </div>
18 </ng-template>
19
20 <ng-template pTemplate="header">
21 <tr>
22 <th style="width: 150px;">Action</th> <!-- column for action buttons -->
23 <th style="width: calc(100% - 300px);" i18n>Account</th>
24 <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th>
25 </tr>
26 </ng-template>
27
28 <ng-template pTemplate="body" let-accountBlock>
29 <tr>
30 <td class="action-cell">
31 <button class="unblock-button" (click)="unblockAccount(accountBlock)" i18n>Unmute</button>
32 </td>
33
34 <td>
35 <a [href]="accountBlock.blockedAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
36 <div class="chip two-lines">
37 <my-actor-avatar [account]="accountBlock.blockedAccount"></my-actor-avatar>
38 <div>
39 {{ accountBlock.blockedAccount.displayName }}
40 <span class="text-muted">{{ accountBlock.blockedAccount.nameWithHost }}</span>
41 </div>
42 </div>
43 </a>
44 </td>
45
46 <td>{{ accountBlock.createdAt | date: 'short' }}</td>
47 </tr>
48 </ng-template>
49
50 <ng-template pTemplate="emptymessage">
51 <tr>
52 <td colspan="6">
53 <div class="no-results">
54 <ng-container *ngIf="search" i18n>No account found matching current filters.</ng-container>
55 <ng-container *ngIf="!search" i18n>No account found.</ng-container>
56 </div>
57 </td>
58 </tr>
59 </ng-template>
60 </p-table>