]>
Commit | Line | Data |
---|---|---|
ed5bb517 | 1 | <h1> |
a7eaeae1 | 2 | <my-global-icon iconName="user-x" aria-hidden="true"></my-global-icon> |
ed5bb517 K |
3 | <ng-container i18n>Muted accounts</ng-container> |
4 | </h1> | |
5 | ||
22839330 RK |
6 | <p-table |
7 | [value]="blockedAccounts" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | |
e6492b2d | 8 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" |
22839330 RK |
9 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
10 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted accounts" | |
11 | > | |
12 | <ng-template pTemplate="caption"> | |
13 | <div class="caption"> | |
4c8749cb | 14 | <div class="ms-auto"> |
2e46eb97 | 15 | <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> |
22839330 RK |
16 | </div> |
17 | </div> | |
18 | </ng-template> | |
19 | ||
20 | <ng-template pTemplate="header"> | |
21 | <tr> | |
e0436741 | 22 | <th style="width: 150px;" i18n>Action</th> <!-- column for action buttons --> |
7f0d8561 | 23 | <th style="width: calc(100% - 300px);" i18n>Account</th> |
22839330 | 24 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> |
22839330 RK |
25 | </tr> |
26 | </ng-template> | |
27 | ||
28 | <ng-template pTemplate="body" let-accountBlock> | |
29 | <tr> | |
30814423 K |
30 | <td class="action-cell"> |
31 | <button class="unblock-button" (click)="unblockAccount(accountBlock)" i18n>Unmute</button> | |
32 | </td> | |
22839330 RK |
33 | <td> |
34 | <a [href]="accountBlock.blockedAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | |
35 | <div class="chip two-lines"> | |
87fdea2f | 36 | <my-actor-avatar [actor]="accountBlock.blockedAccount" actorType="account" size="32"></my-actor-avatar> |
22839330 RK |
37 | <div> |
38 | {{ accountBlock.blockedAccount.displayName }} | |
b788e691 | 39 | <span class="muted">{{ accountBlock.blockedAccount.nameWithHost }}</span> |
22839330 RK |
40 | </div> |
41 | </div> | |
42 | </a> | |
43 | </td> | |
44 | ||
45 | <td>{{ accountBlock.createdAt | date: 'short' }}</td> | |
22839330 RK |
46 | </tr> |
47 | </ng-template> | |
48 | ||
49 | <ng-template pTemplate="emptymessage"> | |
50 | <tr> | |
5b0ec7cd | 51 | <td colspan="3"> |
22839330 RK |
52 | <div class="no-results"> |
53 | <ng-container *ngIf="search" i18n>No account found matching current filters.</ng-container> | |
54 | <ng-container *ngIf="!search" i18n>No account found.</ng-container> | |
55 | </div> | |
56 | </td> | |
57 | </tr> | |
58 | </ng-template> | |
59 | </p-table> |