<div class="video-info">
<ng-container *ngIf="playlistElement.video">
- <a tabindex="-1" class="video-info-name"
- [routerLink]="buildRouterLink()" [queryParams]="buildRouterQuery()"
- [attr.title]="playlistElement.video.name"
- >{{ playlistElement.video.name }}</a>
+ <div class="video-info-header">
+ <a tabindex="-1" class="video-info-name"
+ [routerLink]="buildRouterLink()" [queryParams]="buildRouterQuery()"
+ [attr.title]="playlistElement.video.name"
+ >{{ playlistElement.video.name }}</a>
+
+ <span *ngIf="isVideoPrivate()" class="badge badge-yellow">Private</span>
+ </div>
<span class="video-miniature-created-at-views">
<my-date-toggle [date]="playlistElement.video.publishedAt"></my-date-toggle>
import { Video } from '@app/shared/shared-main'
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'
import { secondsToTime } from '@shared/core-utils'
-import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate } from '@shared/models'
+import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate, VideoPrivacy } from '@shared/models'
import { VideoPlaylistElement } from './video-playlist-element.model'
import { VideoPlaylist } from './video-playlist.model'
import { VideoPlaylistService } from './video-playlist.service'
this.serverConfig = this.serverService.getHTMLConfig()
}
+ isVideoPrivate () {
+ return this.playlistElement.video.privacy.id === VideoPrivacy.PRIVATE
+ }
+
isUnavailable (e: VideoPlaylistElement) {
return e.type === VideoPlaylistElementType.UNAVAILABLE
}