diff options
author | Josh Morel <morel.josh@hotmail.com> | 2019-04-02 05:26:47 -0400 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-04-02 11:26:47 +0200 |
commit | 7ccddd7b5250bd25a917a6e77e58b87b9484a2a4 (patch) | |
tree | e75dc991369c1768804fefa114eb2a832881087f /client/src/app/+admin/moderation/video-blacklist-list | |
parent | 12fed49ebab0c414713d57ea316b6488ae6bef99 (diff) | |
download | PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.gz PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.zst PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.zip |
add quarantine videos feature (#1637)
* add quarantine videos feature
* increase Notification settings test timeout
to 20000ms. was completing 7000 locally but timing out
after 10000 on travis
* fix quarantine video test issues
-propagate misspelling
-remove skip from server/tests/client.ts
* WIP use blacklist for moderator video approval
instead of video.quarantine boolean
* finish auto-blacklist feature
Diffstat (limited to 'client/src/app/+admin/moderation/video-blacklist-list')
-rw-r--r-- | client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | 13 |
1 files changed, 10 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 5443d816d..f4bce7c48 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 | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { SortMeta } from 'primeng/components/common/sortmeta' | 2 | import { SortMeta } from 'primeng/components/common/sortmeta' |
3 | import { Notifier } from '@app/core' | 3 | import { Notifier, ServerService } from '@app/core' |
4 | import { ConfirmService } from '../../../core' | 4 | import { ConfirmService } from '../../../core' |
5 | import { RestPagination, RestTable, VideoBlacklistService } from '../../../shared' | 5 | import { RestPagination, RestTable, VideoBlacklistService } from '../../../shared' |
6 | import { VideoBlacklist } from '../../../../../../shared' | 6 | import { VideoBlacklist, VideoBlacklistType } from '../../../../../../shared' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' | 8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' |
9 | import { Video } from '../../../shared/video/video.model' | 9 | import { Video } from '../../../shared/video/video.model' |
@@ -20,11 +20,13 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
20 | rowsPerPage = 10 | 20 | rowsPerPage = 10 |
21 | sort: SortMeta = { field: 'createdAt', order: 1 } | 21 | sort: SortMeta = { field: 'createdAt', order: 1 } |
22 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } | 22 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } |
23 | listBlacklistTypeFilter: VideoBlacklistType = undefined | ||
23 | 24 | ||
24 | videoBlacklistActions: DropdownAction<VideoBlacklist>[] = [] | 25 | videoBlacklistActions: DropdownAction<VideoBlacklist>[] = [] |
25 | 26 | ||
26 | constructor ( | 27 | constructor ( |
27 | private notifier: Notifier, | 28 | private notifier: Notifier, |
29 | private serverService: ServerService, | ||
28 | private confirmService: ConfirmService, | 30 | private confirmService: ConfirmService, |
29 | private videoBlacklistService: VideoBlacklistService, | 31 | private videoBlacklistService: VideoBlacklistService, |
30 | private markdownRenderer: MarkdownService, | 32 | private markdownRenderer: MarkdownService, |
@@ -32,6 +34,11 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
32 | ) { | 34 | ) { |
33 | super() | 35 | super() |
34 | 36 | ||
37 | // don't filter if auto-blacklist not enabled as this will be only list | ||
38 | if (this.serverService.getConfig().autoBlacklist.videos.ofUsers.enabled) { | ||
39 | this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL | ||
40 | } | ||
41 | |||
35 | this.videoBlacklistActions = [ | 42 | this.videoBlacklistActions = [ |
36 | { | 43 | { |
37 | label: this.i18n('Unblacklist'), | 44 | label: this.i18n('Unblacklist'), |
@@ -77,7 +84,7 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
77 | } | 84 | } |
78 | 85 | ||
79 | protected loadData () { | 86 | protected loadData () { |
80 | this.videoBlacklistService.listBlacklist(this.pagination, this.sort) | 87 | this.videoBlacklistService.listBlacklist(this.pagination, this.sort, this.listBlacklistTypeFilter) |
81 | .subscribe( | 88 | .subscribe( |
82 | async resultList => { | 89 | async resultList => { |
83 | this.totalRecords = resultList.total | 90 | this.totalRecords = resultList.total |