]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/follows/following-list/following-list.component.html
Add ability for instances to follow any actor
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / follows / following-list / following-list.component.html
CommitLineData
ed5bb517
K
1<h1>
2 <my-global-icon iconName="following" aria-hidden="true"></my-global-icon>
4d029ef8 3 <ng-container i18n>Your instance subscriptions</ng-container>
ed5bb517
K
4</h1>
5
ab998f7b 6<p-table
2e46eb97 7 [value]="following" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
1d26d05f 8 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($event)"
2e46eb97 9 [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false"
b8cf27c0 10 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
f66b8d12 11 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} hosts"
04e0fc48 12>
b014b6b9
C
13 <ng-template pTemplate="caption">
14 <div class="caption">
9c1a88e3 15 <div class="left-buttons">
4d029ef8 16 <a class="follow-button" (click)="openFollowModal()" (key.enter)="openFollowModal()">
9c1a88e3 17 <my-global-icon iconName="following" aria-hidden="true"></my-global-icon>
4d029ef8 18 <ng-container i18n>Follow</ng-container>
9c1a88e3
C
19 </a>
20 </div>
21
2e46eb97
C
22 <div class="ml-auto">
23 <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter>
b014b6b9
C
24 </div>
25 </div>
26 </ng-template>
27
ab998f7b
C
28 <ng-template pTemplate="header">
29 <tr>
e0436741 30 <th style="width: 150px;" i18n>Action</th>
4d029ef8 31 <th i18n>Following</th>
68d19a0a 32 <th style="width: 100px;" i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th>
df4c603d 33 <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
68d19a0a 34 <th style="width: 160px;" i18n pSortableColumn="redundancyAllowed">Redundancy allowed <p-sortIcon field="redundancyAllowed"></p-sortIcon></th>
ab998f7b
C
35 </tr>
36 </ng-template>
37
38 <ng-template pTemplate="body" let-follow>
39 <tr>
30814423 40 <td class="action-cell">
9c1a88e3 41 <my-delete-button label="Unfollow" i18n-label (click)="removeFollowing(follow)"></my-delete-button>
30814423 42 </td>
b8cf27c0 43 <td>
4d029ef8
C
44 <a [href]="follow.following.url" i18n-title title="Open instance in a new tab" target="_blank" rel="noopener noreferrer">
45 {{ follow.following.name + '@' + follow.following.host }}
b8cf27c0
RK
46 <span class="glyphicon glyphicon-new-window"></span>
47 </a>
48 </td>
3827c3b3 49
bc99dfe5
RK
50 <td *ngIf="follow.state === 'accepted'">
51 <span class="badge badge-green" i18n>Accepted</span>
52 </td>
53 <td *ngIf="follow.state === 'pending'">
54 <span class="badge badge-yellow" i18n>Pending</span>
55 </td>
3827c3b3 56
7f979fd8 57 <td>{{ follow.createdAt | date: 'short' }}</td>
c48e82b5
C
58 <td>
59 <my-redundancy-checkbox
4d029ef8 60 *ngIf="isInstanceFollowing(follow)"
c48e82b5
C
61 [host]="follow.following.host" [redundancyAllowed]="follow.following.hostRedundancyAllowed"
62 ></my-redundancy-checkbox>
63 </td>
ab998f7b
C
64 </tr>
65 </ng-template>
d3840613
RK
66
67 <ng-template pTemplate="emptymessage">
68 <tr>
69 <td colspan="6">
22839330 70 <div class="no-results">
d3840613 71 <ng-container *ngIf="search" i18n>No host found matching current filters.</ng-container>
b8cf27c0 72 <ng-container *ngIf="!search" i18n>Your instance is not following anyone.</ng-container>
d3840613
RK
73 </div>
74 </td>
75 </tr>
76 </ng-template>
ab998f7b 77</p-table>
bb152476 78
4d029ef8 79<my-follow-modal #followModal></my-follow-modal>