]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+videos/+video-edit/shared/video-edit.component.html
f62464d35c031b45af6f852a80f321a855fd9155
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / shared / video-edit.component.html
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
76 <my-help>
77 <ng-template ptTemplate="customHtml">
78 <ng-container i18n>
79 <a href="https://chooser-beta.creativecommons.org/" target="_blank" rel="noopener noreferrer">Choose</a> the appropriate license for your work.
80 </ng-container>
81 </ng-template>
82 </my-help>
83
84 <my-select-options
85 labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true"
86 ></my-select-options>
87
88 <div *ngIf="formErrors.licence" class="form-error">
89 {{ formErrors.licence }}
90 </div>
91 </div>
92
93 <div class="form-group">
94 <label i18n for="language">Language</label>
95 <my-select-options
96 labelForId="language" [items]="videoLanguages" formControlName="language"
97 [clearable]="true" [searchable]="true" [groupBy]="'group'"
98 ></my-select-options>
99
100 <div *ngIf="formErrors.language" class="form-error">
101 {{ formErrors.language }}
102 </div>
103 </div>
104
105 <div class="form-group">
106 <label i18n for="privacy">Privacy</label>
107 <my-select-options
108 labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false"
109 ></my-select-options>
110
111 <div *ngIf="formErrors.privacy" class="form-error">
112 {{ formErrors.privacy }}
113 </div>
114 </div>
115
116 <div *ngIf="schedulePublicationEnabled" class="form-group">
117 <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label>
118 <p-calendar
119 id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat"
120 [locale]="calendarLocale" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true"
121 >
122 </p-calendar>
123
124 <div *ngIf="formErrors.schedulePublicationAt" class="form-error">
125 {{ formErrors.schedulePublicationAt }}
126 </div>
127 </div>
128
129 <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right">
130 <ng-template ptTemplate="label">
131 <ng-container i18n>Contains sensitive content</ng-container>
132 </ng-template>
133
134 <ng-template ptTemplate="help">
135 <ng-container i18n>Some instances do not list videos containing mature or explicit content by default.</ng-container>
136 </ng-template>
137 </my-peertube-checkbox>
138
139 <my-peertube-checkbox *ngIf="isWaitTranscodingDisplayed()" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
140 <ng-template ptTemplate="label">
141 <ng-container i18n>Publish after transcoding</ng-container>
142 </ng-template>
143
144 <ng-template ptTemplate="help">
145 <ng-container i18n>If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends.</ng-container>
146 </ng-template>
147 </my-peertube-checkbox>
148
149 </div>
150 </div>
151 </ng-template>
152 </ng-container>
153
154 <ng-container ngbNavItem *ngIf="!liveVideo">
155 <a ngbNavLink i18n>Captions</a>
156
157 <ng-template ngbNavContent>
158 <div class="captions">
159
160 <div class="captions-header">
161 <a (click)="openAddCaptionModal()" class="create-caption">
162 <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
163 <ng-container i18n>Add another caption</ng-container>
164 </a>
165 </div>
166
167 <div class="form-group" *ngFor="let videoCaption of videoCaptions">
168
169 <div class="caption-entry">
170 <ng-container *ngIf="!videoCaption.action">
171 <a
172 i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer"
173 [href]="videoCaption.captionPath"
174 >{{ videoCaption.language.label }}</a>
175
176 <div i18n class="caption-entry-state">Already uploaded &#10004;</div>
177
178 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span>
179 </ng-container>
180
181 <ng-container *ngIf="videoCaption.action === 'CREATE'">
182 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
183
184 <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div>
185
186 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span>
187 </ng-container>
188
189 <ng-container *ngIf="videoCaption.action === 'REMOVE'">
190 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
191
192 <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div>
193
194 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span>
195 </ng-container>
196 </div>
197 </div>
198
199 <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0">
200 No captions for now.
201 </div>
202
203 </div>
204 </ng-template>
205 </ng-container>
206
207 <ng-container ngbNavItem *ngIf="liveVideo">
208 <a ngbNavLink i18n>Live settings</a>
209
210 <ng-template ngbNavContent>
211 <div class="row live-settings">
212 <div class="col-md-12">
213
214 <div class="form-group">
215 <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label>
216 <my-input-readonly-copy id="liveVideoRTMPUrl" [value]="liveVideo.rtmpUrl"></my-input-readonly-copy>
217 </div>
218
219 <div class="form-group">
220 <label for="liveVideoStreamKey" i18n>Live stream key</label>
221 <my-input-readonly-copy id="liveVideoStreamKey" [value]="liveVideo.streamKey"></my-input-readonly-copy>
222
223 <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div>
224 </div>
225
226 <div class="form-group">
227 <my-peertube-checkbox inputName="liveVideoPermanentLive" formControlName="permanentLive">
228 <ng-template ptTemplate="label">
229 <ng-container i18n>This is a permanent live</ng-container>
230 </ng-template>
231
232 <ng-container ngProjectAs="description">
233 <span i18n>You can stream multiple times in a permanent live. The URL for your viewers won't change but you cannot save replays of your lives</span>
234 </ng-container>
235 </my-peertube-checkbox>
236 </div>
237
238 <div class="form-group" *ngIf="isSaveReplayEnabled()">
239 <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay">
240 <ng-template ptTemplate="label">
241 <ng-container i18n>Automatically publish a replay when your live ends</ng-container>
242 </ng-template>
243
244 <ng-container ngProjectAs="description">
245 <span i18n>⚠️ If you enable this option, your live will be terminated if you exceed your video quota</span>
246 </ng-container>
247 </my-peertube-checkbox>
248 </div>
249 </div>
250 </div>
251 </ng-template>
252
253 </ng-container>
254
255
256 <ng-container ngbNavItem>
257 <a ngbNavLink i18n>Advanced settings</a>
258
259 <ng-template ngbNavContent>
260 <div class="row advanced-settings">
261 <div class="col-md-12 col-xl-8">
262
263 <div class="form-group">
264 <label i18n for="previewfile">Video preview</label>
265
266 <my-preview-upload
267 i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile"
268 previewWidth="360px" previewHeight="200px"
269 ></my-preview-upload>
270 </div>
271
272 <div class="form-group">
273 <label i18n for="support">Support</label>
274 <my-help helpType="markdownEnhanced">
275 <ng-template ptTemplate="preHtml">
276 <ng-container i18n>
277 Short text to tell people how they can support you (membership platform...).
278 </ng-container>
279 </ng-template>
280 </my-help>
281 <my-markdown-textarea
282 id="support" formControlName="support" markdownType="enhanced"
283 [classes]="{ 'input-error': formErrors['support'] }"
284 ></my-markdown-textarea>
285 <div *ngIf="formErrors.support" class="form-error">
286 {{ formErrors.support }}
287 </div>
288 </div>
289 </div>
290
291 <div class="col-md-12 col-xl-4">
292 <div class="form-group originally-published-at">
293 <label i18n for="originallyPublishedAt">Original publication date</label>
294 <my-help>
295 <ng-template ptTemplate="preHtml">
296 <ng-container i18n>
297 This is the date when the content was originally published (e.g. the release date for a film)
298 </ng-container>
299 </ng-template>
300 </my-help>
301 <p-calendar
302 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat"
303 [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange"
304 >
305 </p-calendar>
306
307 <div *ngIf="formErrors.originallyPublishedAt" class="form-error">
308 {{ formErrors.originallyPublishedAt }}
309 </div>
310 </div>
311
312 <my-peertube-checkbox
313 inputName="commentsEnabled" formControlName="commentsEnabled"
314 i18n-labelText labelText="Enable video comments"
315 ></my-peertube-checkbox>
316
317 <my-peertube-checkbox
318 inputName="downloadEnabled" formControlName="downloadEnabled"
319 i18n-labelText labelText="Enable download"
320 ></my-peertube-checkbox>
321 </div>
322 </div>
323 </ng-template>
324 </ng-container>
325
326 <ng-container ngbNavItem *ngIf="pluginFields.length !== 0">
327 <a ngbNavLink i18n>Plugin settings</a>
328
329 <ng-template ngbNavContent>
330 <div class="row plugin-settings">
331
332 <div class="col-md-12 col-xl-8">
333 <div *ngFor="let pluginSetting of pluginFields" class="form-group">
334 <my-dynamic-form-field [form]="pluginDataFormGroup" [formErrors]="formErrors" [setting]="pluginSetting.commonOptions"></my-dynamic-form-field>
335 </div>
336 </div>
337
338 </div>
339 </ng-template>
340 </ng-container>
341 </div>
342
343 <div [ngbNavOutlet]="nav"></div>
344 </div>
345
346 <my-video-caption-add-modal
347 #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)"
348 ></my-video-caption-add-modal>