]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.ts
Merge branch 'release/3.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-playlist / video-playlist-miniature.component.ts
1 import { Component, Input } from '@angular/core'
2 import { VideoPlaylist } from './video-playlist.model'
3
4 @Component({
5 selector: 'my-video-playlist-miniature',
6 styleUrls: [ './video-playlist-miniature.component.scss' ],
7 templateUrl: './video-playlist-miniature.component.html'
8 })
9 export class VideoPlaylistMiniatureComponent {
10 @Input() playlist: VideoPlaylist
11 @Input() toManage = false
12 @Input() displayChannel = false
13 @Input() displayDescription = false
14 @Input() displayPrivacy = false
15 @Input() displayAsRow = false
16
17 getPlaylistUrl () {
18 if (this.toManage) return [ '/my-library/video-playlists', this.playlist.uuid ]
19 if (this.playlist.videosLength === 0) return null
20
21 return [ '/w/p', this.playlist.uuid ]
22 }
23 }