]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/follows/following-list/following-list.component.html
Refactor search filters
[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>
3 <ng-container i18n>Instances you follow</ng-container>
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
C
15 <div class="left-buttons">
16 <a class="follow-button" (click)="addDomainsToFollow()" (key.enter)="addDomainsToFollow()">
17 <my-global-icon iconName="following" aria-hidden="true"></my-global-icon>
18 <ng-container i18n>Follow instances</ng-container>
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>
b1d40cff 31 <th i18n>Host</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
RK
43 <td>
44 <a [href]="'https://' + follow.following.host" i18n-title title="Open instance in a new tab" target="_blank" rel="noopener noreferrer">
45 {{ follow.following.host }}
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
60 [host]="follow.following.host" [redundancyAllowed]="follow.following.hostRedundancyAllowed"
61 ></my-redundancy-checkbox>
62 </td>
ab998f7b
C
63 </tr>
64 </ng-template>
d3840613
RK
65
66 <ng-template pTemplate="emptymessage">
67 <tr>
68 <td colspan="6">
22839330 69 <div class="no-results">
d3840613 70 <ng-container *ngIf="search" i18n>No host found matching current filters.</ng-container>
b8cf27c0 71 <ng-container *ngIf="!search" i18n>Your instance is not following anyone.</ng-container>
d3840613
RK
72 </div>
73 </td>
74 </tr>
75 </ng-template>
ab998f7b 76</p-table>
bb152476 77
b8cf27c0
RK
78<my-batch-domains-modal #batchDomainsModal i18n-action action="Follow domains" (domains)="addFollowing($event)">
79 <ng-container ngProjectAs="warning">
80 <div i18n *ngIf="httpEnabled() === false" class="alert alert-warning">
81 It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers.
82 </div>
83 </ng-container>
84</my-batch-domains-modal>