diff options
Diffstat (limited to 'client/src/app')
3 files changed, 32 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.html b/client/src/app/shared/shared-share-modal/video-share.component.html index bcb1db4c4..059699d3b 100644 --- a/client/src/app/shared/shared-share-modal/video-share.component.html +++ b/client/src/app/shared/shared-share-modal/video-share.component.html | |||
@@ -10,6 +10,15 @@ | |||
10 | <div class="playlist" *ngIf="playlist"> | 10 | <div class="playlist" *ngIf="playlist"> |
11 | <div class="title-page title-page-single" i18n *ngIf="video">Share the playlist</div> | 11 | <div class="title-page title-page-single" i18n *ngIf="video">Share the playlist</div> |
12 | 12 | ||
13 | |||
14 | <div *ngIf="isPrivatePlaylist()" class="alert-private alert alert-warning"> | ||
15 | <div i18n>This playlist is private so you won't be able to share it with external users</div> | ||
16 | |||
17 | <a i18n class="peertube-button-link orange-button" [routerLink]="[ '/my-library/video-playlists/update', playlist.uuid ]" target="_blank" rel="noopener noreferrer"> | ||
18 | Update playlist privacy | ||
19 | </a> | ||
20 | </div> | ||
21 | |||
13 | <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activePlaylistId"> | 22 | <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activePlaylistId"> |
14 | 23 | ||
15 | <ng-container ngbNavItem="url"> | 24 | <ng-container ngbNavItem="url"> |
@@ -65,6 +74,14 @@ | |||
65 | <div class="video" *ngIf="video"> | 74 | <div class="video" *ngIf="video"> |
66 | <div class="title-page title-page-single" *ngIf="playlist" i18n>Share the video</div> | 75 | <div class="title-page title-page-single" *ngIf="playlist" i18n>Share the video</div> |
67 | 76 | ||
77 | <div *ngIf="isPrivateVideo()" class="alert-private alert alert-warning"> | ||
78 | <div i18n>This video is private so you won't be able to share it with external users</div> | ||
79 | |||
80 | <a i18n class="peertube-button-link orange-button" [routerLink]="[ '/videos/', 'update', video.shortUUID ]" target="_blank" rel="noopener noreferrer"> | ||
81 | Update video privacy | ||
82 | </a> | ||
83 | </div> | ||
84 | |||
68 | <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activeVideoId"> | 85 | <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activeVideoId"> |
69 | 86 | ||
70 | <ng-container ngbNavItem="url"> | 87 | <ng-container ngbNavItem="url"> |
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.scss b/client/src/app/shared/shared-share-modal/video-share.component.scss index 98aab8fe8..ac3b841da 100644 --- a/client/src/app/shared/shared-share-modal/video-share.component.scss +++ b/client/src/app/shared/shared-share-modal/video-share.component.scss | |||
@@ -81,3 +81,9 @@ my-input-toggle-hidden { | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | } | 83 | } |
84 | |||
85 | .alert-private { | ||
86 | display: flex; | ||
87 | align-items: center; | ||
88 | justify-content: space-between; | ||
89 | } | ||
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, |