diff options
author | Nataly Rocha <nata_r10@hotmail.com> | 2021-10-22 08:11:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 15:11:45 +0200 |
commit | 382258676c3ab83f9cebfc4e378ab955cd8fd9ff (patch) | |
tree | 46e54635aa42597a0ff527f065ae1fbd31e81441 /client/src/app/shared/shared-share-modal/video-share.component.ts | |
parent | d1bfbdeb203b0e4f37e9468861c690171156ee29 (diff) | |
download | PeerTube-382258676c3ab83f9cebfc4e378ab955cd8fd9ff.tar.gz PeerTube-382258676c3ab83f9cebfc4e378ab955cd8fd9ff.tar.zst PeerTube-382258676c3ab83f9cebfc4e378ab955cd8fd9ff.zip |
Add warning and update privacy on share playlist (#4469)
* add warning and update privacy on share
* update playlist display name on toast
* change privacy update to link
* remove conditional
* Improve share private warning styling
Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'client/src/app/shared/shared-share-modal/video-share.component.ts')
-rw-r--r-- | client/src/app/shared/shared-share-modal/video-share.component.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.ts index 70890e551..e6e4bd147 100644 --- a/client/src/app/shared/shared-share-modal/video-share.component.ts +++ b/client/src/app/shared/shared-share-modal/video-share.component.ts | |||
@@ -3,7 +3,7 @@ import { VideoDetails } from '@app/shared/shared-main' | |||
3 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' | 3 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { buildPlaylistLink, buildVideoLink, decoratePlaylistLink, decorateVideoLink } from '@shared/core-utils' | 5 | import { buildPlaylistLink, buildVideoLink, decoratePlaylistLink, decorateVideoLink } from '@shared/core-utils' |
6 | import { VideoCaption } from '@shared/models' | 6 | import { VideoCaption, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' |
7 | import { buildVideoOrPlaylistEmbed } from '../../../assets/player/utils' | 7 | import { buildVideoOrPlaylistEmbed } from '../../../assets/player/utils' |
8 | 8 | ||
9 | type Customizations = { | 9 | type Customizations = { |
@@ -126,6 +126,14 @@ export class VideoShareComponent { | |||
126 | return this.video.isLocal | 126 | return this.video.isLocal |
127 | } | 127 | } |
128 | 128 | ||
129 | isPrivateVideo () { | ||
130 | return this.video.privacy.id === VideoPrivacy.PRIVATE | ||
131 | } | ||
132 | |||
133 | isPrivatePlaylist () { | ||
134 | return this.playlist.privacy.id === VideoPlaylistPrivacy.PRIVATE | ||
135 | } | ||
136 | |||
129 | private getPlaylistOptions (baseUrl?: string) { | 137 | private getPlaylistOptions (baseUrl?: string) { |
130 | return { | 138 | return { |
131 | baseUrl, | 139 | baseUrl, |