]>
Commit | Line | Data |
---|---|---|
ed5bb517 K |
1 | <h1> |
2 | <my-global-icon iconName="follower" aria-hidden="true"></my-global-icon> | |
4d029ef8 | 3 | <ng-container i18n>Followers of your instance</ng-container> |
ed5bb517 K |
4 | </h1> |
5 | ||
ab998f7b | 6 | <p-table |
2e46eb97 | 7 | [value]="followers" [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" |
b8cf27c0 | 10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
f66b8d12 | 11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} followers" |
04e0fc48 | 12 | > |
b014b6b9 C |
13 | <ng-template pTemplate="caption"> |
14 | <div class="caption"> | |
4c8749cb | 15 | <div class="ms-auto"> |
2e46eb97 | 16 | <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> |
25a42e29 | 17 | </div> |
b014b6b9 C |
18 | </div> |
19 | </ng-template> | |
20 | ||
ab998f7b C |
21 | <ng-template pTemplate="header"> |
22 | <tr> | |
e0436741 | 23 | <th style="width: 150px;" i18n>Actions</th> |
4d029ef8 | 24 | <th i18n>Follower</th> |
68d19a0a RK |
25 | <th style="width: 100px;" i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th> |
26 | <th style="width: 100px;" i18n pSortableColumn="score">Score <p-sortIcon field="score"></p-sortIcon></th> | |
df4c603d | 27 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> |
ab998f7b C |
28 | </tr> |
29 | </ng-template> | |
30 | ||
31 | <ng-template pTemplate="body" let-follow> | |
32 | <tr> | |
30814423 K |
33 | <td class="action-cell"> |
34 | <ng-container *ngIf="follow.state === 'pending'"> | |
35 | <my-button i18n-title title="Accept" icon="tick" (click)="acceptFollower(follow)"></my-button> | |
36 | <my-button i18n-title title="Refuse" icon="cross" (click)="rejectFollower(follow)"></my-button> | |
37 | </ng-container> | |
38 | ||
39 | <my-delete-button label *ngIf="follow.state === 'accepted'" (click)="deleteFollower(follow)"></my-delete-button> | |
40 | </td> | |
1d26d05f RK |
41 | <td> |
42 | <a [href]="follow.follower.url" i18n-title title="Open actor page in a new tab" target="_blank" rel="noopener noreferrer"> | |
43 | {{ follow.follower.name + '@' + follow.follower.host }} | |
c2faa073 | 44 | <my-global-icon iconName="external-link"></my-global-icon> |
1d26d05f RK |
45 | </a> |
46 | </td> | |
3827c3b3 | 47 | |
bc99dfe5 | 48 | <td *ngIf="follow.state === 'accepted'"> |
4c8749cb | 49 | <span class="pt-badge badge-green" i18n>Accepted</span> |
bc99dfe5 RK |
50 | </td> |
51 | <td *ngIf="follow.state === 'pending'"> | |
4c8749cb | 52 | <span class="pt-badge badge-yellow" i18n>Pending</span> |
bc99dfe5 | 53 | </td> |
3827c3b3 | 54 | |
0dc64777 | 55 | <td>{{ follow.score }}</td> |
7f979fd8 | 56 | <td>{{ follow.createdAt | date: 'short' }}</td> |
ab998f7b C |
57 | </tr> |
58 | </ng-template> | |
d3840613 RK |
59 | |
60 | <ng-template pTemplate="emptymessage"> | |
61 | <tr> | |
5b0ec7cd | 62 | <td colspan="5"> |
22839330 | 63 | <div class="no-results"> |
d3840613 RK |
64 | <ng-container *ngIf="search" i18n>No follower found matching current filters.</ng-container> |
65 | <ng-container *ngIf="!search" i18n>Your instance doesn't have any follower.</ng-container> | |
66 | </div> | |
67 | </td> | |
68 | </tr> | |
69 | </ng-template> | |
ab998f7b | 70 | </p-table> |