diff options
Diffstat (limited to 'client/src/app/+admin/follows/following-list')
-rw-r--r-- | client/src/app/+admin/follows/following-list/following-list.component.html | 4 | ||||
-rw-r--r-- | client/src/app/+admin/follows/following-list/following-list.component.ts | 11 |
2 files changed, 5 insertions, 10 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 f7abb7ede..eca79be71 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 | |||
@@ -9,14 +9,14 @@ | |||
9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" | 9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" |
10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | 10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} hosts" | 11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} hosts" |
12 | [(selection)]="selectedFollows" | 12 | [(selection)]="selectedRows" |
13 | > | 13 | > |
14 | <ng-template pTemplate="caption"> | 14 | <ng-template pTemplate="caption"> |
15 | <div class="caption"> | 15 | <div class="caption"> |
16 | <div class="left-buttons"> | 16 | <div class="left-buttons"> |
17 | <my-action-dropdown | 17 | <my-action-dropdown |
18 | *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange" | 18 | *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange" |
19 | [actions]="bulkFollowsActions" [entry]="selectedFollows" | 19 | [actions]="bulkActions" [entry]="selectedRows" |
20 | > | 20 | > |
21 | </my-action-dropdown> | 21 | </my-action-dropdown> |
22 | 22 | ||
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 e3a56651a..e986a610a 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 | |||
@@ -12,7 +12,7 @@ import { prepareIcu } from '@app/helpers' | |||
12 | templateUrl: './following-list.component.html', | 12 | templateUrl: './following-list.component.html', |
13 | styleUrls: [ './following-list.component.scss' ] | 13 | styleUrls: [ './following-list.component.scss' ] |
14 | }) | 14 | }) |
15 | export class FollowingListComponent extends RestTable implements OnInit { | 15 | export class FollowingListComponent extends RestTable <ActorFollow> implements OnInit { |
16 | @ViewChild('followModal') followModal: FollowModalComponent | 16 | @ViewChild('followModal') followModal: FollowModalComponent |
17 | 17 | ||
18 | following: ActorFollow[] = [] | 18 | following: ActorFollow[] = [] |
@@ -22,8 +22,7 @@ export class FollowingListComponent extends RestTable implements OnInit { | |||
22 | 22 | ||
23 | searchFilters: AdvancedInputFilter[] = [] | 23 | searchFilters: AdvancedInputFilter[] = [] |
24 | 24 | ||
25 | selectedFollows: ActorFollow[] = [] | 25 | bulkActions: DropdownAction<ActorFollow[]>[] = [] |
26 | bulkFollowsActions: DropdownAction<ActorFollow[]>[] = [] | ||
27 | 26 | ||
28 | constructor ( | 27 | constructor ( |
29 | private notifier: Notifier, | 28 | private notifier: Notifier, |
@@ -38,7 +37,7 @@ export class FollowingListComponent extends RestTable implements OnInit { | |||
38 | 37 | ||
39 | this.searchFilters = this.followService.buildFollowsListFilters() | 38 | this.searchFilters = this.followService.buildFollowsListFilters() |
40 | 39 | ||
41 | this.bulkFollowsActions = [ | 40 | this.bulkActions = [ |
42 | { | 41 | { |
43 | label: $localize`Delete`, | 42 | label: $localize`Delete`, |
44 | handler: follows => this.removeFollowing(follows) | 43 | handler: follows => this.removeFollowing(follows) |
@@ -58,10 +57,6 @@ export class FollowingListComponent extends RestTable implements OnInit { | |||
58 | return follow.following.name === 'peertube' | 57 | return follow.following.name === 'peertube' |
59 | } | 58 | } |
60 | 59 | ||
61 | isInSelectionMode () { | ||
62 | return this.selectedFollows.length !== 0 | ||
63 | } | ||
64 | |||
65 | buildFollowingName (follow: ActorFollow) { | 60 | buildFollowingName (follow: ActorFollow) { |
66 | return follow.following.name + '@' + follow.following.host | 61 | return follow.following.name + '@' + follow.following.host |
67 | } | 62 | } |