remove extra action for when the video block type is set to manual

pull/2915/head
Rigel Kent 2020-06-28 20:28:59 +02:00
parent 1c5d24e5b5
commit 4ee63ec648
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 6 additions and 4 deletions

View File

@ -39,7 +39,8 @@ export class VideoBlockListComponent extends RestTable implements OnInit, AfterV
[ [
{ {
label: this.i18n('Internal actions'), label: this.i18n('Internal actions'),
isHeader: true isHeader: true,
isDisplayed: videoBlock => videoBlock.type === VideoBlacklistType.AUTO_BEFORE_PUBLISHED
}, },
{ {
label: this.i18n('Switch video block to manual'), label: this.i18n('Switch video block to manual'),
@ -54,7 +55,8 @@ export class VideoBlockListComponent extends RestTable implements OnInit, AfterV
err => this.notifier.error(err.message) err => this.notifier.error(err.message)
) )
} },
isDisplayed: videoBlock => videoBlock.type === VideoBlacklistType.AUTO_BEFORE_PUBLISHED
} }
], ],
[ [
@ -63,12 +65,12 @@ export class VideoBlockListComponent extends RestTable implements OnInit, AfterV
isHeader: true isHeader: true
}, },
{ {
label: this.i18n('Unblock video'), label: this.i18n('Unblock'),
handler: videoBlock => this.unblockVideo(videoBlock) handler: videoBlock => this.unblockVideo(videoBlock)
}, },
{ {
label: this.i18n('Delete video'), label: this.i18n('Delete'),
handler: async videoBlock => { handler: async videoBlock => {
const res = await this.confirmService.confirm( const res = await this.confirmService.confirm(
this.i18n('Do you really want to delete this video?'), this.i18n('Do you really want to delete this video?'),