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/core/rest/rest-table.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/core/rest/rest-table.ts')
-rw-r--r-- | client/src/app/core/rest/rest-table.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/core/rest/rest-table.ts b/client/src/app/core/rest/rest-table.ts index ec5646b5d..cfaa16af9 100644 --- a/client/src/app/core/rest/rest-table.ts +++ b/client/src/app/core/rest/rest-table.ts | |||
@@ -7,7 +7,7 @@ import { RestPagination } from './rest-pagination' | |||
7 | 7 | ||
8 | const debugLogger = debug('peertube:tables:RestTable') | 8 | const debugLogger = debug('peertube:tables:RestTable') |
9 | 9 | ||
10 | export abstract class RestTable { | 10 | export abstract class RestTable <T = unknown> { |
11 | 11 | ||
12 | abstract totalRecords: number | 12 | abstract totalRecords: number |
13 | abstract sort: SortMeta | 13 | abstract sort: SortMeta |
@@ -17,6 +17,8 @@ export abstract class RestTable { | |||
17 | rowsPerPage = this.rowsPerPageOptions[0] | 17 | rowsPerPage = this.rowsPerPageOptions[0] |
18 | expandedRows = {} | 18 | expandedRows = {} |
19 | 19 | ||
20 | selectedRows: T[] = [] | ||
21 | |||
20 | search: string | 22 | search: string |
21 | 23 | ||
22 | protected route: ActivatedRoute | 24 | protected route: ActivatedRoute |
@@ -75,6 +77,10 @@ export abstract class RestTable { | |||
75 | this.reloadData() | 77 | this.reloadData() |
76 | } | 78 | } |
77 | 79 | ||
80 | isInSelectionMode () { | ||
81 | return this.selectedRows.length !== 0 | ||
82 | } | ||
83 | |||
78 | protected abstract reloadData (): void | 84 | protected abstract reloadData (): void |
79 | 85 | ||
80 | private getSortLocalStorageKey () { | 86 | private getSortLocalStorageKey () { |