aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-10 15:39:51 +0100
committerChocobozzz <me@florianbigard.com>2019-01-10 15:39:51 +0100
commit5abb9fbbd12e7097e348d6a38622d364b1fa47ed (patch)
tree8ef483ad15bd76c75876e0e2f34fd3c99b786103 /client/src/app/videos/+video-watch/modal/video-blacklist.component.ts
parent93f85e90ffa27453e2c909406b62bef65963b8ad (diff)
downloadPeerTube-5abb9fbbd12e7097e348d6a38622d364b1fa47ed.tar.gz
PeerTube-5abb9fbbd12e7097e348d6a38622d364b1fa47ed.tar.zst
PeerTube-5abb9fbbd12e7097e348d6a38622d364b1fa47ed.zip
Add ability to unfederate a local video (on blacklist)
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-blacklist.component.ts')
-rw-r--r--client/src/app/videos/+video-watch/modal/video-blacklist.component.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts b/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts
index 357ce39ce..50a7cadd1 100644
--- a/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts
+++ b/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts
@@ -34,9 +34,12 @@ export class VideoBlacklistComponent extends FormReactive implements OnInit {
34 } 34 }
35 35
36 ngOnInit () { 36 ngOnInit () {
37 const defaultValues = { unfederate: 'true' }
38
37 this.buildForm({ 39 this.buildForm({
38 reason: this.videoBlacklistValidatorsService.VIDEO_BLACKLIST_REASON 40 reason: this.videoBlacklistValidatorsService.VIDEO_BLACKLIST_REASON,
39 }) 41 unfederate: null
42 }, defaultValues)
40 } 43 }
41 44
42 show () { 45 show () {
@@ -50,8 +53,9 @@ export class VideoBlacklistComponent extends FormReactive implements OnInit {
50 53
51 blacklist () { 54 blacklist () {
52 const reason = this.form.value[ 'reason' ] || undefined 55 const reason = this.form.value[ 'reason' ] || undefined
56 const unfederate = this.video.isLocal ? this.form.value[ 'unfederate' ] : undefined
53 57
54 this.videoBlacklistService.blacklistVideo(this.video.id, reason) 58 this.videoBlacklistService.blacklistVideo(this.video.id, reason, unfederate)
55 .subscribe( 59 .subscribe(
56 () => { 60 () => {
57 this.notifier.success(this.i18n('Video blacklisted.')) 61 this.notifier.success(this.i18n('Video blacklisted.'))