aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/follows')
-rw-r--r--client/src/app/+admin/follows/followers-list/followers-list.component.html26
-rw-r--r--client/src/app/+admin/follows/following-add/following-add.component.html53
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.html34
-rw-r--r--client/src/app/+admin/follows/follows.component.scss18
4 files changed, 50 insertions, 81 deletions
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.html b/client/src/app/+admin/follows/followers-list/followers-list.component.html
index 473801822..ea5380ff7 100644
--- a/client/src/app/+admin/follows/followers-list/followers-list.component.html
+++ b/client/src/app/+admin/follows/followers-list/followers-list.component.html
@@ -1,16 +1,12 @@
1<div class="row"> 1<h3>Followers list</h3>
2 <div class="content-padding">
3 <h3>Followers list</h3>
4 2
5 <p-dataTable 3<p-dataTable
6 [value]="followers" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" 4 [value]="followers" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
7 sortField="createdAt" (onLazyLoad)="loadLazy($event)" 5 sortField="createdAt" (onLazyLoad)="loadLazy($event)"
8 > 6>
9 <p-column field="id" header="ID"></p-column> 7 <p-column field="id" header="ID"></p-column>
10 <p-column field="follower.host" header="Host"></p-column> 8 <p-column field="follower.host" header="Host"></p-column>
11 <p-column field="follower.score" header="Score"></p-column> 9 <p-column field="follower.score" header="Score"></p-column>
12 <p-column field="state" header="State"></p-column> 10 <p-column field="state" header="State"></p-column>
13 <p-column field="createdAt" header="Created date" [sortable]="true"></p-column> 11 <p-column field="createdAt" header="Created date" [sortable]="true"></p-column>
14 </p-dataTable> 12</p-dataTable>
15 </div>
16</div>
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.html b/client/src/app/+admin/follows/following-add/following-add.component.html
index 8e7dddc11..65c1eda0c 100644
--- a/client/src/app/+admin/follows/following-add/following-add.component.html
+++ b/client/src/app/+admin/follows/following-add/following-add.component.html
@@ -1,35 +1,30 @@
1<div class="row"> 1<h3>Add following</h3>
2 <div class="content-padding">
3 2
4 <h3>Add following</h3> 3<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
5 4
6 <div *ngIf="error" class="alert alert-danger">{{ error }}</div> 5<form (ngSubmit)="addFollowing()" [formGroup]="form">
6 <div class="form-group" *ngFor="let host of hosts; let id = index; trackBy:customTrackBy">
7 <label [for]="'host-' + id">Host (so without "http://")</label>
7 8
8 <form (ngSubmit)="addFollowing()" [formGroup]="form"> 9 <div class="input-group">
9 <div class="form-group" *ngFor="let host of hosts; let id = index; trackBy:customTrackBy"> 10 <input
10 <label [for]="'host-' + id">Host (so without "http://")</label> 11 type="text" class="form-control" placeholder="example.com"
12 [id]="'host-' + id" [formControlName]="'host-' + id"
13 />
14 <span class="input-group-btn">
15 <button *ngIf="displayAddField(id)" (click)="addField()" class="btn btn-default" type="button">+</button>
16 <button *ngIf="displayRemoveField(id)" (click)="removeField(id)" class="btn btn-default" type="button">-</button>
17 </span>
18 </div>
11 19
12 <div class="input-group"> 20 <div [hidden]="form.controls['host-' + id].valid || form.controls['host-' + id].pristine" class="alert alert-warning">
13 <input 21 It should be a valid host.
14 type="text" class="form-control" placeholder="example.com" 22 </div>
15 [id]="'host-' + id" [formControlName]="'host-' + id" 23 </div>
16 />
17 <span class="input-group-btn">
18 <button *ngIf="displayAddField(id)" (click)="addField()" class="btn btn-default" type="button">+</button>
19 <button *ngIf="displayRemoveField(id)" (click)="removeField(id)" class="btn btn-default" type="button">-</button>
20 </span>
21 </div>
22
23 <div [hidden]="form.controls['host-' + id].valid || form.controls['host-' + id].pristine" class="alert alert-warning">
24 It should be a valid host.
25 </div>
26 </div>
27
28 <div *ngIf="canMakeFriends() === false" class="alert alert-warning">
29 It seems that you are not on a HTTPS server. Your webserver need to have TLS activated in order to follow servers.
30 </div>
31 24
32 <input type="submit" value="Add following" class="btn btn-default" [disabled]="!isFormValid()"> 25 <div *ngIf="canMakeFriends() === false" class="alert alert-warning">
33 </form> 26 It seems that you are not on a HTTPS server. Your webserver need to have TLS activated in order to follow servers.
34 </div> 27 </div>
35</div> 28
29 <input type="submit" value="Add following" class="btn btn-default" [disabled]="!isFormValid()">
30</form>
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.html b/client/src/app/+admin/follows/following-list/following-list.component.html
index a73084312..85c7c3af1 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.html
+++ b/client/src/app/+admin/follows/following-list/following-list.component.html
@@ -1,20 +1,16 @@
1<div class="row"> 1<h3>Following list</h3>
2 <div class="content-padding">
3 <h3>Following list</h3>
4 2
5 <p-dataTable 3<p-dataTable
6 [value]="following" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" 4 [value]="following" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
7 sortField="createdAt" (onLazyLoad)="loadLazy($event)" 5 sortField="createdAt" (onLazyLoad)="loadLazy($event)"
8 > 6>
9 <p-column field="id" header="ID"></p-column> 7 <p-column field="id" header="ID"></p-column>
10 <p-column field="following.host" header="Host"></p-column> 8 <p-column field="following.host" header="Host"></p-column>
11 <p-column field="state" header="State"></p-column> 9 <p-column field="state" header="State"></p-column>
12 <p-column field="createdAt" header="Created date" [sortable]="true"></p-column> 10 <p-column field="createdAt" header="Created date" [sortable]="true"></p-column>
13 <p-column header="Unfollow" styleClass="action-cell"> 11 <p-column header="Unfollow" styleClass="action-cell">
14 <ng-template pTemplate="body" let-following="rowData"> 12 <ng-template pTemplate="body" let-following="rowData">
15 <span (click)="removeFollowing(following)" class="glyphicon glyphicon-remove glyphicon-black" title="Unfollow"></span> 13 <span (click)="removeFollowing(following)" class="glyphicon glyphicon-remove glyphicon-black" title="Unfollow"></span>
16 </ng-template> 14 </ng-template>
17 </p-column> 15 </p-column>
18 </p-dataTable> 16</p-dataTable>
19 </div>
20</div>
diff --git a/client/src/app/+admin/follows/follows.component.scss b/client/src/app/+admin/follows/follows.component.scss
index d8ab41975..242effd85 100644
--- a/client/src/app/+admin/follows/follows.component.scss
+++ b/client/src/app/+admin/follows/follows.component.scss
@@ -1,21 +1,3 @@
1.follows-menu { 1.follows-menu {
2 margin-top: 20px; 2 margin-top: 20px;
3} 3}
4
5tabset /deep/ {
6 .nav-link {
7 padding: 0;
8 }
9
10 .tab-link {
11 display: block;
12 text-align: center;
13 height: 40px;
14 width: 120px;
15 line-height: 40px;
16
17 &:hover, &:active, &:focus {
18 text-decoration: none !important;
19 }
20 }
21}