diff options
Diffstat (limited to 'client/src/app/+admin/follows/following-list')
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 | |||
4 | my-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 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { NotificationsService } from 'angular2-notifications' | 2 | import { NotificationsService } from 'angular2-notifications' |
3 | import { SortMeta } from 'primeng/primeng' | 3 | import { SortMeta } from 'primeng/primeng' |
4 | import { AccountFollow } from '../../../../../../shared/models/actors/follow.model' | 4 | import { ActorFollow } from '../../../../../../shared/models/actors/follow.model' |
5 | import { ConfirmService } from '../../../core/confirm/confirm.service' | 5 | import { ConfirmService } from '../../../core/confirm/confirm.service' |
6 | import { RestPagination, RestTable } from '../../../shared' | 6 | import { RestPagination, RestTable } from '../../../shared' |
7 | import { FollowService } from '../shared' | 7 | import { 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 | }) |
14 | export class FollowingListComponent extends RestTable implements OnInit { | 15 | export 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') |