From af6b45e5d96f37d986c54c1deb6d64e81cd0dbb0 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Fri, 4 Feb 2022 11:11:32 +0100 Subject: client: show private badge in playlists closes #2601 --- .../video-playlist-element-miniature.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts') diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts index ea58d7f76..7a2574345 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts @@ -3,7 +3,7 @@ import { AuthService, Notifier, ServerService } from '@app/core' 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' @@ -51,6 +51,10 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { this.serverConfig = this.serverService.getHTMLConfig() } + isVideoPrivate () { + return this.playlistElement.video.privacy.id === VideoPrivacy.PRIVATE + } + isUnavailable (e: VideoPlaylistElement) { return e.type === VideoPlaylistElementType.UNAVAILABLE } -- cgit v1.2.3