diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-19 14:11:40 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2020-05-01 16:41:02 +0200 |
commit | e0a929179a9dc76e035ca7fda2b61d5ff46afbc5 (patch) | |
tree | 1e6615c612ad6995dcb1c3619342dbbc7db35034 /client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | |
parent | aeb1bed9835b3b092832160245080d4023c14d91 (diff) | |
download | PeerTube-e0a929179a9dc76e035ca7fda2b61d5ff46afbc5.tar.gz PeerTube-e0a929179a9dc76e035ca7fda2b61d5ff46afbc5.tar.zst PeerTube-e0a929179a9dc76e035ca7fda2b61d5ff46afbc5.zip |
Add filter inputs for blacklisted videos and muted accounts/servers
Diffstat (limited to 'client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts')
-rw-r--r-- | client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts index c38d30865..e9925f9bf 100644 --- a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts +++ b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | |||
@@ -17,7 +17,8 @@ import { MarkdownService } from '@app/shared/renderer' | |||
17 | export class VideoBlacklistListComponent extends RestTable implements OnInit { | 17 | export class VideoBlacklistListComponent extends RestTable implements OnInit { |
18 | blacklist: (VideoBlacklist & { reasonHtml?: string })[] = [] | 18 | blacklist: (VideoBlacklist & { reasonHtml?: string })[] = [] |
19 | totalRecords = 0 | 19 | totalRecords = 0 |
20 | rowsPerPage = 10 | 20 | rowsPerPageOptions = [ 20, 50, 100 ] |
21 | rowsPerPage = this.rowsPerPageOptions[0] | ||
21 | sort: SortMeta = { field: 'createdAt', order: -1 } | 22 | sort: SortMeta = { field: 'createdAt', order: -1 } |
22 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } | 23 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } |
23 | listBlacklistTypeFilter: VideoBlacklistType = undefined | 24 | listBlacklistTypeFilter: VideoBlacklistType = undefined |
@@ -38,7 +39,7 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
38 | ngOnInit () { | 39 | ngOnInit () { |
39 | this.serverService.getConfig() | 40 | this.serverService.getConfig() |
40 | .subscribe(config => { | 41 | .subscribe(config => { |
41 | // don't filter if auto-blacklist not enabled as this will be the only list | 42 | // don't filter if auto-blacklist is not enabled as this will be the only list |
42 | if (config.autoBlacklist.videos.ofUsers.enabled) { | 43 | if (config.autoBlacklist.videos.ofUsers.enabled) { |
43 | this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL | 44 | this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL |
44 | } | 45 | } |
@@ -91,7 +92,12 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
91 | } | 92 | } |
92 | 93 | ||
93 | protected loadData () { | 94 | protected loadData () { |
94 | this.videoBlacklistService.listBlacklist(this.pagination, this.sort, this.listBlacklistTypeFilter) | 95 | this.videoBlacklistService.listBlacklist({ |
96 | pagination: this.pagination, | ||
97 | sort: this.sort, | ||
98 | search: this.search, | ||
99 | type: this.listBlacklistTypeFilter | ||
100 | }) | ||
95 | .subscribe( | 101 | .subscribe( |
96 | async resultList => { | 102 | async resultList => { |
97 | this.totalRecords = resultList.total | 103 | this.totalRecords = resultList.total |