]>
Commit | Line | Data |
---|---|---|
1 | <div class="video-edit" [formGroup]="form"> | |
2 | <div ngbNav #nav="ngbNav" class="nav-tabs"> | |
3 | ||
4 | <ng-container ngbNavItem> | |
5 | <a ngbNavLink i18n>Basic info</a> | |
6 | ||
7 | <ng-template ngbNavContent> | |
8 | <div class="row"> | |
9 | <div class="col-video-edit"> | |
10 | <div class="form-group"> | |
11 | <label i18n for="name">Title</label> | |
12 | <input type="text" id="name" class="form-control" formControlName="name" /> | |
13 | <div *ngIf="formErrors.name" class="form-error"> | |
14 | {{ formErrors.name }} | |
15 | </div> | |
16 | </div> | |
17 | ||
18 | <div class="form-group"> | |
19 | <label i18n class="label-tags">Tags</label> | |
20 | ||
21 | <my-help> | |
22 | <ng-template ptTemplate="customHtml"> | |
23 | <ng-container i18n> | |
24 | Tags could be used to suggest relevant recommendations. <br /> | |
25 | There is a maximum of 5 tags. <br /> | |
26 | Press <kbd>Enter</kbd> to add a new tag. | |
27 | </ng-container> | |
28 | </ng-template> | |
29 | </my-help> | |
30 | ||
31 | <my-select-tags labelForId="label-tags" formControlName="tags"></my-select-tags> | |
32 | <div *ngIf="formErrors.tags" class="form-error"> | |
33 | {{ formErrors.tags }} | |
34 | </div> | |
35 | </div> | |
36 | ||
37 | <div class="form-group"> | |
38 | <label i18n for="description">Description</label> | |
39 | ||
40 | <my-help helpType="markdownText"> | |
41 | <ng-template ptTemplate="preHtml"> | |
42 | <ng-container i18n> | |
43 | Video descriptions are truncated by default and require manual action to expand them. | |
44 | </ng-container> | |
45 | </ng-template> | |
46 | </my-help> | |
47 | ||
48 | <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="true"></my-markdown-textarea> | |
49 | ||
50 | <div *ngIf="formErrors.description" class="form-error"> | |
51 | {{ formErrors.description }} | |
52 | </div> | |
53 | </div> | |
54 | </div> | |
55 | ||
56 | <div class="col-video-edit"> | |
57 | <div class="form-group"> | |
58 | <label i18n for="channel">Channel</label> | |
59 | <my-select-channel labelForId="channel" [items]="userVideoChannels" formControlName="channelId"></my-select-channel> | |
60 | </div> | |
61 | ||
62 | <div class="form-group"> | |
63 | <label i18n for="category">Category</label> | |
64 | <my-select-options | |
65 | labelForId="category" [items]="videoCategories" formControlName="category" [clearable]="true" | |
66 | ></my-select-options> | |
67 | ||
68 | <div *ngIf="formErrors.category" class="form-error"> | |
69 | {{ formErrors.category }} | |
70 | </div> | |
71 | </div> | |
72 | ||
73 | <div class="form-group"> | |
74 | <label i18n for="licence">Licence</label> | |
75 | <my-select-options | |
76 | labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true" | |
77 | ></my-select-options> | |
78 | ||
79 | <div *ngIf="formErrors.licence" class="form-error"> | |
80 | {{ formErrors.licence }} | |
81 | </div> | |
82 | </div> | |
83 | ||
84 | <div class="form-group"> | |
85 | <label i18n for="language">Language</label> | |
86 | <my-select-options | |
87 | labelForId="language" [items]="videoLanguages" formControlName="language" | |
88 | [clearable]="true" [searchable]="true" [groupBy]="'group'" | |
89 | ></my-select-options> | |
90 | ||
91 | <div *ngIf="formErrors.language" class="form-error"> | |
92 | {{ formErrors.language }} | |
93 | </div> | |
94 | </div> | |
95 | ||
96 | <div class="form-group"> | |
97 | <label i18n for="privacy">Privacy</label> | |
98 | <my-select-options | |
99 | labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false" | |
100 | ></my-select-options> | |
101 | ||
102 | <div *ngIf="formErrors.privacy" class="form-error"> | |
103 | {{ formErrors.privacy }} | |
104 | </div> | |
105 | </div> | |
106 | ||
107 | <div *ngIf="schedulePublicationEnabled" class="form-group"> | |
108 | <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label> | |
109 | <p-calendar | |
110 | id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat" | |
111 | [locale]="calendarLocale" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true" | |
112 | > | |
113 | </p-calendar> | |
114 | ||
115 | <div *ngIf="formErrors.schedulePublicationAt" class="form-error"> | |
116 | {{ formErrors.schedulePublicationAt }} | |
117 | </div> | |
118 | </div> | |
119 | ||
120 | <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right"> | |
121 | <ng-template ptTemplate="label"> | |
122 | <ng-container i18n>Contains sensitive content</ng-container> | |
123 | </ng-template> | |
124 | ||
125 | <ng-template ptTemplate="help"> | |
126 | <ng-container i18n>Some instances do not list videos containing mature or explicit content by default.</ng-container> | |
127 | </ng-template> | |
128 | </my-peertube-checkbox> | |
129 | ||
130 | <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> | |
131 | <ng-template ptTemplate="label"> | |
132 | <ng-container i18n>Publish after transcoding</ng-container> | |
133 | </ng-template> | |
134 | ||
135 | <ng-template ptTemplate="help"> | |
136 | <ng-container i18n>If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends.</ng-container> | |
137 | </ng-template> | |
138 | </my-peertube-checkbox> | |
139 | ||
140 | </div> | |
141 | </div> | |
142 | </ng-template> | |
143 | </ng-container> | |
144 | ||
145 | <ng-container ngbNavItem *ngIf="!liveVideo"> | |
146 | <a ngbNavLink i18n>Captions</a> | |
147 | ||
148 | <ng-template ngbNavContent> | |
149 | <div class="captions"> | |
150 | ||
151 | <div class="captions-header"> | |
152 | <a (click)="openAddCaptionModal()" class="create-caption"> | |
153 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> | |
154 | <ng-container i18n>Add another caption</ng-container> | |
155 | </a> | |
156 | </div> | |
157 | ||
158 | <div class="form-group" *ngFor="let videoCaption of videoCaptions"> | |
159 | ||
160 | <div class="caption-entry"> | |
161 | <ng-container *ngIf="!videoCaption.action"> | |
162 | <a | |
163 | i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer" | |
164 | [href]="videoCaption.captionPath" | |
165 | >{{ videoCaption.language.label }}</a> | |
166 | ||
167 | <div i18n class="caption-entry-state">Already uploaded ✔</div> | |
168 | ||
169 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span> | |
170 | </ng-container> | |
171 | ||
172 | <ng-container *ngIf="videoCaption.action === 'CREATE'"> | |
173 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
174 | ||
175 | <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div> | |
176 | ||
177 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span> | |
178 | </ng-container> | |
179 | ||
180 | <ng-container *ngIf="videoCaption.action === 'REMOVE'"> | |
181 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
182 | ||
183 | <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div> | |
184 | ||
185 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span> | |
186 | </ng-container> | |
187 | </div> | |
188 | </div> | |
189 | ||
190 | <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0"> | |
191 | No captions for now. | |
192 | </div> | |
193 | ||
194 | </div> | |
195 | </ng-template> | |
196 | </ng-container> | |
197 | ||
198 | <ng-container ngbNavItem *ngIf="liveVideo"> | |
199 | <a ngbNavLink i18n>Live settings</a> | |
200 | ||
201 | <ng-template ngbNavContent> | |
202 | <div class="row live-settings"> | |
203 | <div class="col-md-12"> | |
204 | ||
205 | <div class="form-group"> | |
206 | <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label> | |
207 | <my-input-readonly-copy id="liveVideoRTMPUrl" [value]="liveVideo.rtmpUrl"></my-input-readonly-copy> | |
208 | </div> | |
209 | ||
210 | <div class="form-group"> | |
211 | <label for="liveVideoStreamKey" i18n>Live stream key</label> | |
212 | <my-input-readonly-copy id="liveVideoStreamKey" [value]="liveVideo.streamKey"></my-input-readonly-copy> | |
213 | </div> | |
214 | ||
215 | <div class="form-group" *ngIf="isSaveReplayEnabled()"> | |
216 | <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay"> | |
217 | <ng-template ptTemplate="label"> | |
218 | <ng-container i18n>Automatically publish a replay when your live ends</ng-container> | |
219 | </ng-template> | |
220 | ||
221 | <ng-container ngProjectAs="description"> | |
222 | <span i18n>⚠️ If you enable this option, your live will be terminated if you exceed your video quota</span> | |
223 | </ng-container> | |
224 | </my-peertube-checkbox> | |
225 | </div> | |
226 | </div> | |
227 | </div> | |
228 | </ng-template> | |
229 | ||
230 | </ng-container> | |
231 | ||
232 | ||
233 | <ng-container ngbNavItem> | |
234 | <a ngbNavLink i18n>Advanced settings</a> | |
235 | ||
236 | <ng-template ngbNavContent> | |
237 | <div class="row advanced-settings"> | |
238 | <div class="col-md-12 col-xl-8"> | |
239 | ||
240 | <div class="form-group"> | |
241 | <label i18n for="previewfile">Video preview</label> | |
242 | ||
243 | <my-preview-upload | |
244 | i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile" | |
245 | previewWidth="360px" previewHeight="200px" | |
246 | ></my-preview-upload> | |
247 | </div> | |
248 | ||
249 | <div class="form-group"> | |
250 | <label i18n for="support">Support</label> | |
251 | <my-help helpType="markdownEnhanced"> | |
252 | <ng-template ptTemplate="preHtml"> | |
253 | <ng-container i18n> | |
254 | Short text to tell people how they can support you (membership platform...). | |
255 | </ng-container> | |
256 | </ng-template> | |
257 | </my-help> | |
258 | <my-markdown-textarea | |
259 | id="support" formControlName="support" markdownType="enhanced" | |
260 | [classes]="{ 'input-error': formErrors['support'] }" | |
261 | ></my-markdown-textarea> | |
262 | <div *ngIf="formErrors.support" class="form-error"> | |
263 | {{ formErrors.support }} | |
264 | </div> | |
265 | </div> | |
266 | </div> | |
267 | ||
268 | <div class="col-md-12 col-xl-4"> | |
269 | <div class="form-group originally-published-at"> | |
270 | <label i18n for="originallyPublishedAt">Original publication date</label> | |
271 | <my-help> | |
272 | <ng-template ptTemplate="preHtml"> | |
273 | <ng-container i18n> | |
274 | This is the date when the content was originally published (e.g. the release date for a film) | |
275 | </ng-container> | |
276 | </ng-template> | |
277 | </my-help> | |
278 | <p-calendar | |
279 | id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" | |
280 | [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange" | |
281 | > | |
282 | </p-calendar> | |
283 | ||
284 | <div *ngIf="formErrors.originallyPublishedAt" class="form-error"> | |
285 | {{ formErrors.originallyPublishedAt }} | |
286 | </div> | |
287 | </div> | |
288 | ||
289 | <my-peertube-checkbox | |
290 | inputName="commentsEnabled" formControlName="commentsEnabled" | |
291 | i18n-labelText labelText="Enable video comments" | |
292 | ></my-peertube-checkbox> | |
293 | ||
294 | <my-peertube-checkbox | |
295 | inputName="downloadEnabled" formControlName="downloadEnabled" | |
296 | i18n-labelText labelText="Enable download" | |
297 | ></my-peertube-checkbox> | |
298 | </div> | |
299 | </div> | |
300 | </ng-template> | |
301 | </ng-container> | |
302 | ||
303 | <ng-container ngbNavItem *ngIf="pluginFields.length !== 0"> | |
304 | <a ngbNavLink i18n>Plugin settings</a> | |
305 | ||
306 | <ng-template ngbNavContent> | |
307 | <div class="row plugin-settings"> | |
308 | ||
309 | <div class="col-md-12 col-xl-8"> | |
310 | <div *ngFor="let pluginSetting of pluginFields" class="form-group"> | |
311 | <my-dynamic-form-field [form]="pluginDataFormGroup" [formErrors]="formErrors" [setting]="pluginSetting.commonOptions"></my-dynamic-form-field> | |
312 | </div> | |
313 | </div> | |
314 | ||
315 | </div> | |
316 | </ng-template> | |
317 | </ng-container> | |
318 | </div> | |
319 | ||
320 | <div [ngbNavOutlet]="nav"></div> | |
321 | </div> | |
322 | ||
323 | <my-video-caption-add-modal | |
324 | #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)" | |
325 | ></my-video-caption-add-modal> |