removeFiles?: boolean
transcoding?: boolean
studio?: boolean
+ stats?: boolean
}
@Component({
liveInfo: false,
removeFiles: false,
transcoding: false,
- studio: true
+ studio: true,
+ stats: true
}
@Input() placement = 'left'
+ @Input() moreActions: DropdownAction<{ video: Video }>[][] = []
@Input() label: string
return this.video.isEditableBy(this.user, this.serverService.getHTMLConfig().videoStudio.enabled)
}
+ isVideoStatsAvailable () {
+ return this.video.canSeeStats(this.user)
+ }
+
isVideoRemovable () {
return this.video.isRemovableBy(this.user)
}
iconName: 'film',
isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.studio && this.isVideoEditable()
},
+ {
+ label: $localize`Stats`,
+ linkBuilder: ({ video }) => [ '/stats/videos', video.uuid ],
+ iconName: 'stats',
+ isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.stats && this.isVideoStatsAvailable()
+ },
{
label: $localize`Block`,
handler: () => this.showBlockModal(),
}
]
]
+
+ this.videoActions = this.videoActions.concat(this.moreActions)
}
}