diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-20 14:58:05 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-20 14:58:20 +0100 |
commit | cd940f40cb62fa105b14e1ce838e97f316c13c5c (patch) | |
tree | 96c9e2473b2c6243537e287787528492349ff92b /client/src/app/+admin/overview/users/user-list/user-list.component.ts | |
parent | 9436936cf68b6c1225298b0e30c23c40f0d15bda (diff) | |
download | PeerTube-cd940f40cb62fa105b14e1ce838e97f316c13c5c.tar.gz PeerTube-cd940f40cb62fa105b14e1ce838e97f316c13c5c.tar.zst PeerTube-cd940f40cb62fa105b14e1ce838e97f316c13c5c.zip |
Support bulk registration request removal
Diffstat (limited to 'client/src/app/+admin/overview/users/user-list/user-list.component.ts')
-rw-r--r-- | client/src/app/+admin/overview/users/user-list/user-list.component.ts | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.ts b/client/src/app/+admin/overview/users/user-list/user-list.component.ts index 99987fdff..7d62302f8 100644 --- a/client/src/app/+admin/overview/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.ts | |||
@@ -22,7 +22,7 @@ type UserForList = User & { | |||
22 | templateUrl: './user-list.component.html', | 22 | templateUrl: './user-list.component.html', |
23 | styleUrls: [ './user-list.component.scss' ] | 23 | styleUrls: [ './user-list.component.scss' ] |
24 | }) | 24 | }) |
25 | export class UserListComponent extends RestTable implements OnInit { | 25 | export class UserListComponent extends RestTable <User> implements OnInit { |
26 | private static readonly LOCAL_STORAGE_SELECTED_COLUMNS_KEY = 'admin-user-list-selected-columns' | 26 | private static readonly LOCAL_STORAGE_SELECTED_COLUMNS_KEY = 'admin-user-list-selected-columns' |
27 | 27 | ||
28 | @ViewChild('userBanModal', { static: true }) userBanModal: UserBanModalComponent | 28 | @ViewChild('userBanModal', { static: true }) userBanModal: UserBanModalComponent |
@@ -35,8 +35,7 @@ export class UserListComponent extends RestTable implements OnInit { | |||
35 | 35 | ||
36 | highlightBannedUsers = false | 36 | highlightBannedUsers = false |
37 | 37 | ||
38 | selectedUsers: User[] = [] | 38 | bulkActions: DropdownAction<User[]>[][] = [] |
39 | bulkUserActions: DropdownAction<User[]>[][] = [] | ||
40 | columns: { id: string, label: string }[] | 39 | columns: { id: string, label: string }[] |
41 | 40 | ||
42 | inputFilters: AdvancedInputFilter[] = [ | 41 | inputFilters: AdvancedInputFilter[] = [ |
@@ -95,7 +94,7 @@ export class UserListComponent extends RestTable implements OnInit { | |||
95 | 94 | ||
96 | this.initialize() | 95 | this.initialize() |
97 | 96 | ||
98 | this.bulkUserActions = [ | 97 | this.bulkActions = [ |
99 | [ | 98 | [ |
100 | { | 99 | { |
101 | label: $localize`Delete`, | 100 | label: $localize`Delete`, |
@@ -249,7 +248,7 @@ export class UserListComponent extends RestTable implements OnInit { | |||
249 | const res = await this.confirmService.confirm(message, $localize`Delete`) | 248 | const res = await this.confirmService.confirm(message, $localize`Delete`) |
250 | if (res === false) return | 249 | if (res === false) return |
251 | 250 | ||
252 | this.userAdminService.removeUser(users) | 251 | this.userAdminService.removeUsers(users) |
253 | .subscribe({ | 252 | .subscribe({ |
254 | next: () => { | 253 | next: () => { |
255 | this.notifier.success( | 254 | this.notifier.success( |
@@ -284,12 +283,8 @@ export class UserListComponent extends RestTable implements OnInit { | |||
284 | }) | 283 | }) |
285 | } | 284 | } |
286 | 285 | ||
287 | isInSelectionMode () { | ||
288 | return this.selectedUsers.length !== 0 | ||
289 | } | ||
290 | |||
291 | protected reloadData () { | 286 | protected reloadData () { |
292 | this.selectedUsers = [] | 287 | this.selectedRows = [] |
293 | 288 | ||
294 | this.userAdminService.getUsers({ | 289 | this.userAdminService.getUsers({ |
295 | pagination: this.pagination, | 290 | pagination: this.pagination, |