} from '@angular/core'
import { AuthService, ScreenService, ServerService, User } from '@app/core'
import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models'
+import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component'
import { Video } from '../shared-main'
import { VideoPlaylistService } from '../shared-video-playlist'
import { VideoActionsDisplayType } from './video-actions-dropdown.component'
-export type OwnerDisplayType = 'account' | 'videoChannel'
export type MiniatureDisplayOptions = {
date?: boolean
views?: boolean
state: false,
blacklistInfo: false
}
- @Input() displayAsRow = false
@Input() displayVideoActions = true
- @Input() fitWidth = false
+
+ @Input() actorImageSize: ActorAvatarSize = '40'
+
+ @Input() displayAsRow = false
@Input() videoLinkType: VideoLinkType = 'internal'
buildVideoLink () {
if (this.videoLinkType === 'internal' || !this.video.url) {
- this.videoRouterLink = [ '/videos/watch', this.video.uuid ]
+ this.videoRouterLink = [ '/w', this.video.uuid ]
return
}
return ''
}
- getAvatarUrl () {
- if (this.displayOwnerAccount()) {
- return this.video.accountAvatarUrl
- }
-
- return this.video.videoChannelAvatarUrl
- }
-
loadActions () {
if (this.displayVideoActions) this.showActions = true
return this.displayVideoActions && this.isUserLoggedIn() && this.inWatchLaterPlaylist !== undefined
}
+ getClasses () {
+ return {
+ 'display-as-row': this.displayAsRow
+ }
+ }
+
private setUpBy () {
const accountName = this.video.account.name