]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/follows/followers-list/followers-list.component.html
Handle rejected follows in client
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / follows / followers-list / followers-list.component.html
1 <h1>
2 <my-global-icon iconName="follower" aria-hidden="true"></my-global-icon>
3 <ng-container i18n>Followers of your instance</ng-container>
4 </h1>
5
6 <p-table
7 [value]="followers" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start"
8 [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order"
9 [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false"
10 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
11 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} followers"
12 >
13 <ng-template pTemplate="caption">
14 <div class="caption">
15 <div class="ms-auto">
16 <my-advanced-input-filter [filters]="searchFilters" (search)="onSearch($event)"></my-advanced-input-filter>
17 </div>
18 </div>
19 </ng-template>
20
21 <ng-template pTemplate="header">
22 <tr>
23 <th style="width: 150px;" i18n>Actions</th>
24 <th i18n>Follower</th>
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>
27 <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
28 </tr>
29 </ng-template>
30
31 <ng-template pTemplate="body" let-follow>
32 <tr>
33 <td class="action-cell">
34 <my-button *ngIf="follow.state !== 'accepted'" i18n-title title="Accept" icon="tick" (click)="acceptFollower(follow)"></my-button>
35 <my-button *ngIf="follow.state !== 'rejected'" i18n-title title="Refuse" icon="cross" (click)="rejectFollower(follow)"></my-button>
36
37 <my-delete-button *ngIf="follow.state === 'rejected'" (click)="deleteFollower(follow)"></my-delete-button>
38 </td>
39 <td>
40 <a [href]="follow.follower.url" i18n-title title="Open actor page in a new tab" target="_blank" rel="noopener noreferrer">
41 {{ follow.follower.name + '@' + follow.follower.host }}
42 <my-global-icon iconName="external-link"></my-global-icon>
43 </a>
44 </td>
45
46 <td>
47 <span *ngIf="follow.state === 'accepted'" class="pt-badge badge-green" i18n>Accepted</span>
48 <span *ngIf="follow.state === 'pending'" class="pt-badge badge-yellow" i18n>Pending</span>
49 <span *ngIf="follow.state === 'rejected'" class="pt-badge badge-red" i18n>Rejected</span>
50 </td>
51
52 <td>{{ follow.score }}</td>
53 <td>{{ follow.createdAt | date: 'short' }}</td>
54 </tr>
55 </ng-template>
56
57 <ng-template pTemplate="emptymessage">
58 <tr>
59 <td colspan="5">
60 <div class="no-results">
61 <ng-container *ngIf="search" i18n>No follower found matching current filters.</ng-container>
62 <ng-container *ngIf="!search" i18n>Your instance doesn't have any follower.</ng-container>
63 </div>
64 </td>
65 </tr>
66 </ng-template>
67 </p-table>