Merge remote-tracking branch 'origin/pr/1785' into develop
[oweals/peertube.git] / client / src / app / shared / video-playlist / video-playlist-miniature.component.ts
index b3bba7c8731cecbd543a81f055476c05ebd5c968..523e96f2a8fe8cbc8e8daa70b77cd92db7037968 100644 (file)
@@ -8,4 +8,15 @@ import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
 })
 export class VideoPlaylistMiniatureComponent {
   @Input() playlist: VideoPlaylist
+  @Input() toManage = false
+  @Input() displayChannel = false
+  @Input() displayDescription = false
+  @Input() displayPrivacy = false
+
+  getPlaylistUrl () {
+    if (this.toManage) return [ '/my-account/video-playlists', this.playlist.uuid ]
+    if (this.playlist.videosLength === 0) return null
+
+    return [ '/videos/watch/playlist', this.playlist.uuid ]
+  }
 }