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