]>
Commit | Line | Data |
---|---|---|
ed5bb517 | 1 | <h1> |
f4a2dc50 | 2 | <my-global-icon iconName="peertube-x" aria-hidden="true"></my-global-icon> |
ed5bb517 K |
3 | <ng-container i18n>Muted servers</ng-container> |
4 | </h1> | |
5 | ||
65b21c96 | 6 | <p-table |
2e46eb97 | 7 | [value]="blockedServers" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
e6492b2d | 8 | [sortField]="sort.field" [sortOrder]="sort.order" |
2e46eb97 | 9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" |
2bc9bd08 | 10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
45c14ae1 | 11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted instances" |
65b21c96 | 12 | > |
bb152476 RK |
13 | <ng-template pTemplate="caption"> |
14 | <div class="caption"> | |
9c1a88e3 C |
15 | <div class="left-buttons"> |
16 | <a class="block-button" (click)="addServersToBlock()" (key.enter)="addServersToBlock()"> | |
17 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> | |
18 | <ng-container i18n>Mute domain</ng-container> | |
19 | </a> | |
20 | </div> | |
21 | ||
4c8749cb | 22 | <div class="ms-auto"> |
2e46eb97 | 23 | <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> |
e0a92917 | 24 | </div> |
bb152476 RK |
25 | </div> |
26 | </ng-template> | |
65b21c96 C |
27 | |
28 | <ng-template pTemplate="header"> | |
29 | <tr> | |
e0436741 | 30 | <th style="width: 150px;" i18n>Action</th> <!-- column for action buttons --> |
7f0d8561 | 31 | <th style="width: calc(100% - 300px);" i18n>Instance</th> |
df4c603d | 32 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> |
65b21c96 C |
33 | </tr> |
34 | </ng-template> | |
35 | ||
36 | <ng-template pTemplate="body" let-serverBlock> | |
37 | <tr> | |
30814423 K |
38 | <td class="action-cell"> |
39 | <button class="unblock-button" (click)="unblockServer(serverBlock)" i18n>Unmute</button> | |
40 | </td> | |
86521a67 RK |
41 | <td> |
42 | <a [href]="'https://' + serverBlock.blockedServer.host" i18n-title title="Open instance in a new tab" target="_blank" rel="noopener noreferrer"> | |
43 | {{ serverBlock.blockedServer.host }} | |
c2faa073 | 44 | <my-global-icon iconName="external-link"></my-global-icon> |
86521a67 RK |
45 | </a> |
46 | </td> | |
7f979fd8 | 47 | <td>{{ serverBlock.createdAt | date: 'short' }}</td> |
65b21c96 C |
48 | </tr> |
49 | </ng-template> | |
d3840613 RK |
50 | |
51 | <ng-template pTemplate="emptymessage"> | |
52 | <tr> | |
5b0ec7cd | 53 | <td colspan="3"> |
22839330 | 54 | <div class="no-results"> |
d3840613 RK |
55 | <ng-container *ngIf="search" i18n>No server found matching current filters.</ng-container> |
56 | <ng-container *ngIf="!search" i18n>No server found.</ng-container> | |
57 | </div> | |
58 | </td> | |
59 | </tr> | |
60 | </ng-template> | |
65b21c96 | 61 | </p-table> |
bb152476 | 62 | |
b8cf27c0 | 63 | <my-batch-domains-modal #batchDomainsModal i18n-action action="Mute domains" (domains)="onDomainsToBlock($event)"></my-batch-domains-modal> |