]>
Commit | Line | Data |
---|---|---|
1 | <ng-template #modal let-hide="close"> | |
2 | <div class="modal-header"> | |
3 | <h4 i18n class="modal-title">Share</h4> | |
4 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon> | |
5 | </div> | |
6 | ||
7 | ||
8 | <div class="modal-body"> | |
9 | ||
10 | <div class="playlist" *ngIf="playlist"> | |
11 | <h5 i18n *ngIf="video">Share the playlist</h5> | |
12 | ||
13 | <div *ngIf="isPrivatePlaylist()" class="alert-private alert alert-warning"> | |
14 | <div i18n>This playlist is private so you won't be able to share it with external users</div> | |
15 | ||
16 | <a i18n class="peertube-button-link orange-button" [routerLink]="[ '/my-library/video-playlists/update', playlist.uuid ]" target="_blank" rel="noopener noreferrer"> | |
17 | Update playlist privacy | |
18 | </a> | |
19 | </div> | |
20 | ||
21 | <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activePlaylistId"> | |
22 | ||
23 | <ng-container ngbNavItem="url"> | |
24 | <a ngbNavLink i18n>URL</a> | |
25 | ||
26 | <ng-template ngbNavContent> | |
27 | <div class="nav-content"> | |
28 | <my-input-text [value]="playlistUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text> | |
29 | </div> | |
30 | </ng-template> | |
31 | </ng-container> | |
32 | ||
33 | <ng-container ngbNavItem="qrcode"> | |
34 | <a ngbNavLink i18n>QR-Code</a> | |
35 | ||
36 | <ng-template ngbNavContent> | |
37 | <div class="nav-content"> | |
38 | <qrcode [qrdata]="playlistUrl" [width]="256" level="Q"></qrcode> | |
39 | </div> | |
40 | </ng-template> | |
41 | </ng-container> | |
42 | ||
43 | <ng-container ngbNavItem="embed"> | |
44 | <a ngbNavLink i18n>Embed</a> | |
45 | ||
46 | <ng-template ngbNavContent> | |
47 | <div class="nav-content"> | |
48 | <my-input-text | |
49 | [value]="customizations.onlyEmbedUrl ? playlistEmbedUrl : playlistEmbedHTML" (change)="onUpdate()" | |
50 | [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true" | |
51 | ></my-input-text> | |
52 | ||
53 | <div i18n *ngIf="notSecure()" class="alert alert-warning"> | |
54 | The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites). | |
55 | </div> | |
56 | ||
57 | <div class="embed" [innerHTML]="playlistEmbedSafeHTML"></div> | |
58 | </div> | |
59 | </ng-template> | |
60 | </ng-container> | |
61 | ||
62 | </div> | |
63 | ||
64 | <div [ngbNavOutlet]="nav"></div> | |
65 | ||
66 | <div class="filters"> | |
67 | ||
68 | <div class="form-group" *ngIf="video"> | |
69 | <my-peertube-checkbox | |
70 | inputName="includeVideoInPlaylist" [(ngModel)]="customizations.includeVideoInPlaylist" | |
71 | i18n-labelText labelText="Share the playlist at this video position" | |
72 | ></my-peertube-checkbox> | |
73 | </div> | |
74 | ||
75 | <div class="form-group"> | |
76 | <my-peertube-checkbox | |
77 | *ngIf="isInPlaylistEmbedTab()" | |
78 | inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl" | |
79 | i18n-labelText labelText="Only display embed URL" | |
80 | ></my-peertube-checkbox> | |
81 | </div> | |
82 | ||
83 | <my-plugin-placeholder pluginId="share-modal-playlist-settings"></my-plugin-placeholder> | |
84 | </div> | |
85 | </div> | |
86 | ||
87 | ||
88 | <div class="video" *ngIf="video"> | |
89 | <h5 *ngIf="playlist" i18n>Share the video</h5> | |
90 | ||
91 | <div *ngIf="isPrivateVideo()" class="alert-private alert alert-warning"> | |
92 | <div i18n>This video is private so you won't be able to share it with external users</div> | |
93 | ||
94 | <a i18n class="peertube-button-link orange-button" [routerLink]="[ '/videos/', 'update', video.shortUUID ]" target="_blank" rel="noopener noreferrer"> | |
95 | Update video privacy | |
96 | </a> | |
97 | </div> | |
98 | ||
99 | <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activeVideoId"> | |
100 | ||
101 | <ng-container ngbNavItem="url"> | |
102 | <a ngbNavLink i18n>URL</a> | |
103 | ||
104 | <ng-template ngbNavContent> | |
105 | <div class="nav-content"> | |
106 | <my-input-text [value]="videoUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text> | |
107 | </div> | |
108 | </ng-template> | |
109 | </ng-container> | |
110 | ||
111 | <ng-container ngbNavItem="qrcode"> | |
112 | <a ngbNavLink i18n>QR-Code</a> | |
113 | ||
114 | <ng-template ngbNavContent> | |
115 | <div class="nav-content"> | |
116 | <qrcode [qrdata]="videoUrl" [width]="256" level="Q"></qrcode> | |
117 | </div> | |
118 | </ng-template> | |
119 | </ng-container> | |
120 | ||
121 | <ng-container ngbNavItem="embed"> | |
122 | <a ngbNavLink i18n>Embed</a> | |
123 | ||
124 | <ng-template ngbNavContent> | |
125 | <div class="nav-content"> | |
126 | <my-input-text | |
127 | [value]="customizations.onlyEmbedUrl ? videoEmbedUrl : videoEmbedHTML" (ngModelChange)="onUpdate()" | |
128 | [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true" | |
129 | ></my-input-text> | |
130 | ||
131 | <div i18n *ngIf="notSecure()" class="alert alert-warning"> | |
132 | The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites). | |
133 | </div> | |
134 | ||
135 | <div class="embed" [innerHTML]="videoEmbedSafeHTML"></div> | |
136 | </div> | |
137 | </ng-template> | |
138 | </ng-container> | |
139 | ||
140 | </div> | |
141 | ||
142 | <div [ngbNavOutlet]="nav"></div> | |
143 | ||
144 | <div class="filters"> | |
145 | <div> | |
146 | <div class="form-group start-at" *ngIf="!video.isLive"> | |
147 | <my-peertube-checkbox | |
148 | inputName="startAt" [(ngModel)]="customizations.startAtCheckbox" | |
149 | i18n-labelText labelText="Start at" | |
150 | ></my-peertube-checkbox> | |
151 | ||
152 | <my-timestamp-input | |
153 | [timestamp]="customizations.startAt" | |
154 | [maxTimestamp]="video.duration" | |
155 | [disabled]="!customizations.startAtCheckbox" | |
156 | [(ngModel)]="customizations.startAt" | |
157 | > | |
158 | </my-timestamp-input> | |
159 | </div> | |
160 | ||
161 | <div *ngIf="videoCaptions.length !== 0" class="form-group video-caption-block"> | |
162 | <my-peertube-checkbox | |
163 | inputName="subtitleCheckbox" [(ngModel)]="customizations.subtitleCheckbox" | |
164 | i18n-labelText labelText="Auto select subtitle" | |
165 | ></my-peertube-checkbox> | |
166 | ||
167 | <div class="peertube-select-container" [ngClass]="{ disabled: !customizations.subtitleCheckbox }"> | |
168 | <select [(ngModel)]="customizations.subtitle" [disabled]="!customizations.subtitleCheckbox" class="form-control"> | |
169 | <option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option> | |
170 | </select> | |
171 | </div> | |
172 | </div> | |
173 | ||
174 | <div class="form-group" *ngIf="isInVideoEmbedTab()"> | |
175 | <my-peertube-checkbox | |
176 | inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl" | |
177 | i18n-labelText labelText="Only display embed URL" | |
178 | ></my-peertube-checkbox> | |
179 | </div> | |
180 | ||
181 | <my-plugin-placeholder pluginId="share-modal-video-settings"></my-plugin-placeholder> | |
182 | </div> | |
183 | ||
184 | <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed"> | |
185 | <div> | |
186 | <div class="form-group stop-at" *ngIf="!video.isLive"> | |
187 | <my-peertube-checkbox | |
188 | inputName="stopAt" [(ngModel)]="customizations.stopAtCheckbox" | |
189 | i18n-labelText labelText="Stop at" | |
190 | ></my-peertube-checkbox> | |
191 | ||
192 | <my-timestamp-input | |
193 | [timestamp]="customizations.stopAt" | |
194 | [maxTimestamp]="video.duration" | |
195 | [disabled]="!customizations.stopAtCheckbox" | |
196 | [(ngModel)]="customizations.stopAt" | |
197 | > | |
198 | </my-timestamp-input> | |
199 | </div> | |
200 | ||
201 | <div class="form-group"> | |
202 | <my-peertube-checkbox | |
203 | inputName="autoplay" [(ngModel)]="customizations.autoplay" | |
204 | i18n-labelText labelText="Autoplay" | |
205 | ></my-peertube-checkbox> | |
206 | </div> | |
207 | ||
208 | <div class="form-group"> | |
209 | <my-peertube-checkbox | |
210 | inputName="muted" [(ngModel)]="customizations.muted" | |
211 | i18n-labelText labelText="Muted" | |
212 | ></my-peertube-checkbox> | |
213 | </div> | |
214 | ||
215 | <div class="form-group" *ngIf="!video.isLive"> | |
216 | <my-peertube-checkbox | |
217 | inputName="loop" [(ngModel)]="customizations.loop" | |
218 | i18n-labelText labelText="Loop" | |
219 | ></my-peertube-checkbox> | |
220 | </div> | |
221 | ||
222 | <div *ngIf="!isLocalVideo() && !isInVideoEmbedTab()" class="form-group"> | |
223 | <my-peertube-checkbox | |
224 | inputName="originUrl" [(ngModel)]="customizations.originUrl" | |
225 | i18n-labelText labelText="Use origin instance URL" | |
226 | ></my-peertube-checkbox> | |
227 | </div> | |
228 | </div> | |
229 | ||
230 | <ng-container *ngIf="isInVideoEmbedTab()"> | |
231 | <div class="form-group"> | |
232 | <my-peertube-checkbox | |
233 | inputName="title" [(ngModel)]="customizations.title" | |
234 | i18n-labelText labelText="Display video title" | |
235 | ></my-peertube-checkbox> | |
236 | </div> | |
237 | ||
238 | <div class="form-group"> | |
239 | <my-peertube-checkbox | |
240 | inputName="embedP2P" [(ngModel)]="customizations.embedP2P" | |
241 | i18n-labelText labelText="P2P" | |
242 | ></my-peertube-checkbox> | |
243 | </div> | |
244 | ||
245 | <div class="form-group"> | |
246 | <my-peertube-checkbox | |
247 | inputName="warningTitle" [(ngModel)]="customizations.warningTitle" | |
248 | i18n-labelText labelText="Display privacy warning" [disabled]="!customizations.embedP2P" | |
249 | ></my-peertube-checkbox> | |
250 | </div> | |
251 | ||
252 | <div class="form-group"> | |
253 | <my-peertube-checkbox | |
254 | inputName="controlBar" [(ngModel)]="customizations.controlBar" | |
255 | i18n-labelText labelText="Display player control bar" | |
256 | ></my-peertube-checkbox> | |
257 | </div> | |
258 | ||
259 | <div class="form-group"> | |
260 | <my-peertube-checkbox | |
261 | inputName="peertubeLink" [(ngModel)]="customizations.peertubeLink" | |
262 | i18n-labelText labelText="Display PeerTube button link" | |
263 | ></my-peertube-checkbox> | |
264 | </div> | |
265 | </ng-container> | |
266 | </div> | |
267 | ||
268 | <div (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed" role="button" class="advanced-filters-button" | |
269 | [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic"> | |
270 | ||
271 | <ng-container *ngIf="isAdvancedCustomizationCollapsed"> | |
272 | <span class="chevron-down"></span> | |
273 | ||
274 | <ng-container i18n> | |
275 | More customization | |
276 | </ng-container> | |
277 | </ng-container> | |
278 | ||
279 | <ng-container *ngIf="!isAdvancedCustomizationCollapsed"> | |
280 | <span class="chevron-up"></span> | |
281 | ||
282 | <ng-container i18n> | |
283 | Less customization | |
284 | </ng-container> | |
285 | </ng-container> | |
286 | </div> | |
287 | </div> | |
288 | </div> | |
289 | </div> | |
290 | ||
291 | </ng-template> |