]>
Commit | Line | Data |
---|---|---|
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 |
b8cf27c0 | 7 | [value]="following" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
1d26d05f | 8 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($event)" |
b8cf27c0 | 9 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
f66b8d12 | 10 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} hosts" |
04e0fc48 | 11 | > |
b014b6b9 C |
12 | <ng-template pTemplate="caption"> |
13 | <div class="caption"> | |
9c1a88e3 C |
14 | <div class="left-buttons"> |
15 | <a class="follow-button" (click)="addDomainsToFollow()" (key.enter)="addDomainsToFollow()"> | |
16 | <my-global-icon iconName="following" aria-hidden="true"></my-global-icon> | |
17 | <ng-container i18n>Follow instances</ng-container> | |
18 | </a> | |
19 | </div> | |
20 | ||
25a42e29 | 21 | <div class="ml-auto has-feedback has-clear"> |
b014b6b9 C |
22 | <input |
23 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
be27ef3b | 24 | (keyup)="onSearch($event)" |
b014b6b9 | 25 | > |
25a42e29 RK |
26 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a> |
27 | <span class="sr-only" i18n>Clear filters</span> | |
b014b6b9 C |
28 | </div> |
29 | </div> | |
30 | </ng-template> | |
31 | ||
ab998f7b C |
32 | <ng-template pTemplate="header"> |
33 | <tr> | |
e0436741 | 34 | <th style="width: 150px;" i18n>Action</th> |
b1d40cff | 35 | <th i18n>Host</th> |
68d19a0a | 36 | <th style="width: 100px;" i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th> |
df4c603d | 37 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> |
68d19a0a | 38 | <th style="width: 160px;" i18n pSortableColumn="redundancyAllowed">Redundancy allowed <p-sortIcon field="redundancyAllowed"></p-sortIcon></th> |
ab998f7b C |
39 | </tr> |
40 | </ng-template> | |
41 | ||
42 | <ng-template pTemplate="body" let-follow> | |
43 | <tr> | |
30814423 | 44 | <td class="action-cell"> |
9c1a88e3 | 45 | <my-delete-button label="Unfollow" i18n-label (click)="removeFollowing(follow)"></my-delete-button> |
30814423 | 46 | </td> |
b8cf27c0 RK |
47 | <td> |
48 | <a [href]="'https://' + follow.following.host" i18n-title title="Open instance in a new tab" target="_blank" rel="noopener noreferrer"> | |
49 | {{ follow.following.host }} | |
50 | <span class="glyphicon glyphicon-new-window"></span> | |
51 | </a> | |
52 | </td> | |
3827c3b3 | 53 | |
bc99dfe5 RK |
54 | <td *ngIf="follow.state === 'accepted'"> |
55 | <span class="badge badge-green" i18n>Accepted</span> | |
56 | </td> | |
57 | <td *ngIf="follow.state === 'pending'"> | |
58 | <span class="badge badge-yellow" i18n>Pending</span> | |
59 | </td> | |
3827c3b3 | 60 | |
7f979fd8 | 61 | <td>{{ follow.createdAt | date: 'short' }}</td> |
c48e82b5 C |
62 | <td> |
63 | <my-redundancy-checkbox | |
64 | [host]="follow.following.host" [redundancyAllowed]="follow.following.hostRedundancyAllowed" | |
65 | ></my-redundancy-checkbox> | |
66 | </td> | |
ab998f7b C |
67 | </tr> |
68 | </ng-template> | |
d3840613 RK |
69 | |
70 | <ng-template pTemplate="emptymessage"> | |
71 | <tr> | |
72 | <td colspan="6"> | |
22839330 | 73 | <div class="no-results"> |
d3840613 | 74 | <ng-container *ngIf="search" i18n>No host found matching current filters.</ng-container> |
b8cf27c0 | 75 | <ng-container *ngIf="!search" i18n>Your instance is not following anyone.</ng-container> |
d3840613 RK |
76 | </div> |
77 | </td> | |
78 | </tr> | |
79 | </ng-template> | |
ab998f7b | 80 | </p-table> |
bb152476 | 81 | |
b8cf27c0 RK |
82 | <my-batch-domains-modal #batchDomainsModal i18n-action action="Follow domains" (domains)="addFollowing($event)"> |
83 | <ng-container ngProjectAs="warning"> | |
84 | <div i18n *ngIf="httpEnabled() === false" class="alert alert-warning"> | |
85 | It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers. | |
86 | </div> | |
87 | </ng-container> | |
88 | </my-batch-domains-modal> |