aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/following-list
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-11 16:27:07 +0200
committerChocobozzz <me@florianbigard.com>2018-09-13 14:05:49 +0200
commitc48e82b5e0478434de30626d14594a97f2402e7c (patch)
treea78e5272bd0fe4f5b41831e571e02d05f1515b82 /client/src/app/+admin/follows/following-list
parenta651038487faa838bda3ce04695b08bc65baff70 (diff)
downloadPeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.gz
PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.zst
PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.zip
Basic video redundancy implementation
Diffstat (limited to 'client/src/app/+admin/follows/following-list')
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.html6
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.scss13
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.ts9
3 files changed, 24 insertions, 4 deletions
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 e4a45e88c..66ab64c50 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
@@ -8,6 +8,7 @@
8 <th i18n>Host</th> 8 <th i18n>Host</th>
9 <th i18n>State</th> 9 <th i18n>State</th>
10 <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> 10 <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
11 <th i18n>Redundancy allowed</th>
11 <th></th> 12 <th></th>
12 </tr> 13 </tr>
13 </ng-template> 14 </ng-template>
@@ -18,6 +19,11 @@
18 <td>{{ follow.following.host }}</td> 19 <td>{{ follow.following.host }}</td>
19 <td>{{ follow.state }}</td> 20 <td>{{ follow.state }}</td>
20 <td>{{ follow.createdAt }}</td> 21 <td>{{ follow.createdAt }}</td>
22 <td>
23 <my-redundancy-checkbox
24 [host]="follow.following.host" [redundancyAllowed]="follow.following.hostRedundancyAllowed"
25 ></my-redundancy-checkbox>
26 </td>
21 <td class="action-cell"> 27 <td class="action-cell">
22 <my-delete-button (click)="removeFollowing(follow)"></my-delete-button> 28 <my-delete-button (click)="removeFollowing(follow)"></my-delete-button>
23 </td> 29 </td>
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.scss b/client/src/app/+admin/follows/following-list/following-list.component.scss
new file mode 100644
index 000000000..bfcdcaa49
--- /dev/null
+++ b/client/src/app/+admin/follows/following-list/following-list.component.scss
@@ -0,0 +1,13 @@
1@import '_variables';
2@import '_mixins';
3
4my-redundancy-checkbox /deep/ my-peertube-checkbox {
5 .form-group {
6 margin-bottom: 0;
7 align-items: center;
8 }
9
10 label {
11 margin: 0;
12 }
13} \ No newline at end of file
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts
index 06e341e68..dd57884c6 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.ts
+++ b/client/src/app/+admin/follows/following-list/following-list.component.ts
@@ -1,7 +1,7 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { NotificationsService } from 'angular2-notifications' 2import { NotificationsService } from 'angular2-notifications'
3import { SortMeta } from 'primeng/primeng' 3import { SortMeta } from 'primeng/primeng'
4import { AccountFollow } from '../../../../../../shared/models/actors/follow.model' 4import { ActorFollow } from '../../../../../../shared/models/actors/follow.model'
5import { ConfirmService } from '../../../core/confirm/confirm.service' 5import { ConfirmService } from '../../../core/confirm/confirm.service'
6import { RestPagination, RestTable } from '../../../shared' 6import { RestPagination, RestTable } from '../../../shared'
7import { FollowService } from '../shared' 7import { FollowService } from '../shared'
@@ -9,10 +9,11 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
9 9
10@Component({ 10@Component({
11 selector: 'my-followers-list', 11 selector: 'my-followers-list',
12 templateUrl: './following-list.component.html' 12 templateUrl: './following-list.component.html',
13 styleUrls: [ './following-list.component.scss' ]
13}) 14})
14export class FollowingListComponent extends RestTable implements OnInit { 15export class FollowingListComponent extends RestTable implements OnInit {
15 following: AccountFollow[] = [] 16 following: ActorFollow[] = []
16 totalRecords = 0 17 totalRecords = 0
17 rowsPerPage = 10 18 rowsPerPage = 10
18 sort: SortMeta = { field: 'createdAt', order: 1 } 19 sort: SortMeta = { field: 'createdAt', order: 1 }
@@ -31,7 +32,7 @@ export class FollowingListComponent extends RestTable implements OnInit {
31 this.loadSort() 32 this.loadSort()
32 } 33 }
33 34
34 async removeFollowing (follow: AccountFollow) { 35 async removeFollowing (follow: ActorFollow) {
35 const res = await this.confirmService.confirm( 36 const res = await this.confirmService.confirm(
36 this.i18n('Do you really want to unfollow {{host}}?', { host: follow.following.host }), 37 this.i18n('Do you really want to unfollow {{host}}?', { host: follow.following.host }),
37 this.i18n('Unfollow') 38 this.i18n('Unfollow')