]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-edit/shared/video-edit.component.html
Translate plugin settings
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / shared / video-edit.component.html
CommitLineData
63347a0f 1<div class="video-edit" [formGroup]="form">
45c6bcf3 2 <div ngbNav #nav="ngbNav" class="nav-tabs">
63347a0f 3
087fc5da
C
4 <ng-template #pluginSettingTemplate let-pluginSetting>
5 <div class="form-group" [hidden]="isPluginFieldHidden(pluginSetting)">
6 <my-dynamic-form-field [form]="pluginDataFormGroup" [formErrors]="formErrors['pluginData']" [setting]="pluginSetting.commonOptions"></my-dynamic-form-field>
7 </div>
8 </ng-template>
9
45c6bcf3
C
10 <ng-container ngbNavItem>
11 <a ngbNavLink i18n>Basic info</a>
12
13 <ng-template ngbNavContent>
ce4b4495 14 <div class="form-columns">
6f02515e 15 <div class="col-video-edit">
63347a0f
C
16 <div class="form-group">
17 <label i18n for="name">Title</label>
a6d5ff76 18 <input type="text" id="name" class="form-control" formControlName="name" />
63347a0f
C
19 <div *ngIf="formErrors.name" class="form-error">
20 {{ formErrors.name }}
21 </div>
22 </div>
23
24 <div class="form-group">
b0c36821 25 <label i18n class="label-tags">Tags</label>
421d935d
C
26
27 <my-help>
28 <ng-template ptTemplate="customHtml">
29 <ng-container i18n>
30 Tags could be used to suggest relevant recommendations. <br />
47594fd7 31 There is a maximum of 5 tags. <br />
9e8929d6 32 Press <kbd>Enter</kbd> to add a new tag.
421d935d
C
33 </ng-container>
34 </ng-template>
35 </my-help>
36
02c01341
RK
37 <my-select-tags labelForId="label-tags" formControlName="tags"></my-select-tags>
38 <div *ngIf="formErrors.tags" class="form-error">
39 {{ formErrors.tags }}
40 </div>
63347a0f
C
41 </div>
42
43 <div class="form-group">
44 <label i18n for="description">Description</label>
421d935d
C
45
46 <my-help helpType="markdownText">
47 <ng-template ptTemplate="preHtml">
48 <ng-container i18n>
49 Video descriptions are truncated by default and require manual action to expand them.
50 </ng-container>
51 </ng-template>
52 </my-help>
53
9162fdd3 54 <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="videoToUpdate"></my-markdown-textarea>
63347a0f
C
55
56 <div *ngIf="formErrors.description" class="form-error">
57 {{ formErrors.description }}
58 </div>
59 </div>
6de36768 60 </div>
6de36768 61
6f02515e 62 <div class="col-video-edit">
63347a0f 63 <div class="form-group">
02c01341
RK
64 <label i18n for="channel">Channel</label>
65 <my-select-channel labelForId="channel" [items]="userVideoChannels" formControlName="channelId"></my-select-channel>
63347a0f
C
66 </div>
67
68 <div class="form-group">
69 <label i18n for="category">Category</label>
02c01341
RK
70 <my-select-options
71 labelForId="category" [items]="videoCategories" formControlName="category" [clearable]="true"
72 ></my-select-options>
63347a0f
C
73
74 <div *ngIf="formErrors.category" class="form-error">
75 {{ formErrors.category }}
76 </div>
77 </div>
78
79 <div class="form-group">
80 <label i18n for="licence">Licence</label>
2b8d7a7d
FS
81
82 <my-help>
83 <ng-template ptTemplate="customHtml">
84 <ng-container i18n>
7e6bdb5a 85 <a href="https://chooser-beta.creativecommons.org/" target="_blank" rel="noopener noreferrer">Choose</a> the appropriate licence for your work.
2b8d7a7d
FS
86 </ng-container>
87 </ng-template>
88 </my-help>
89
02c01341
RK
90 <my-select-options
91 labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true"
92 ></my-select-options>
63347a0f
C
93
94 <div *ngIf="formErrors.licence" class="form-error">
95 {{ formErrors.licence }}
96 </div>
97 </div>
98
99 <div class="form-group">
100 <label i18n for="language">Language</label>
02c01341
RK
101 <my-select-options
102 labelForId="language" [items]="videoLanguages" formControlName="language"
103 [clearable]="true" [searchable]="true" [groupBy]="'group'"
104 ></my-select-options>
63347a0f
C
105
106 <div *ngIf="formErrors.language" class="form-error">
107 {{ formErrors.language }}
108 </div>
109 </div>
110
111 <div class="form-group">
112 <label i18n for="privacy">Privacy</label>
02c01341
RK
113 <my-select-options
114 labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false"
115 ></my-select-options>
63347a0f
C
116
117 <div *ngIf="formErrors.privacy" class="form-error">
118 {{ formErrors.privacy }}
119 </div>
120 </div>
121
122 <div *ngIf="schedulePublicationEnabled" class="form-group">
123 <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label>
124 <p-calendar
125 id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat"
8e0a2f2a 126 [firstDayOfWeek]="0" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true"
63347a0f
C
127 >
128 </p-calendar>
129
130 <div *ngIf="formErrors.schedulePublicationAt" class="form-error">
131 {{ formErrors.schedulePublicationAt }}
132 </div>
133 </div>
134
421d935d
C
135 <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right">
136 <ng-template ptTemplate="label">
02c01341 137 <ng-container i18n>Contains sensitive content</ng-container>
421d935d
C
138 </ng-template>
139
140 <ng-template ptTemplate="help">
2d6f28a2 141 <ng-container i18n>Some instances hide videos containing mature or explicit content by default.</ng-container>
421d935d
C
142 </ng-template>
143 </my-peertube-checkbox>
144
ddb62a85 145 <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
421d935d 146 <ng-template ptTemplate="label">
02c01341 147 <ng-container i18n>Publish after transcoding</ng-container>
421d935d
C
148 </ng-template>
149
150 <ng-template ptTemplate="help">
151 <ng-container i18n>If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends.</ng-container>
152 </ng-template>
153 </my-peertube-checkbox>
6de36768 154
087fc5da
C
155 <ng-container
156 *ngFor="let pluginSetting of getPluginsFields('main')"
157 [ngTemplateOutlet]="pluginSettingTemplate" [ngTemplateOutletContext]="{ $implicit: pluginSetting }"
158 >
3c065fe3 159 </ng-container>
6de36768
C
160 </div>
161 </div>
63347a0f 162 </ng-template>
45c6bcf3
C
163 </ng-container>
164
b5b68755 165 <ng-container ngbNavItem *ngIf="!liveVideo">
45c6bcf3 166 <a ngbNavLink i18n>Captions</a>
63347a0f 167
45c6bcf3 168 <ng-template ngbNavContent>
63347a0f
C
169 <div class="captions">
170
171 <div class="captions-header">
172 <a (click)="openAddCaptionModal()" class="create-caption">
6ad971d5 173 <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
63347a0f
C
174 <ng-container i18n>Add another caption</ng-container>
175 </a>
6de36768 176 </div>
6de36768 177
63347a0f 178 <div class="form-group" *ngFor="let videoCaption of videoCaptions">
6de36768 179
63347a0f
C
180 <div class="caption-entry">
181 <ng-container *ngIf="!videoCaption.action">
182 <a
183 i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer"
184 [href]="videoCaption.captionPath"
185 >{{ videoCaption.language.label }}</a>
6de36768 186
cc3d1dce 187 <div i18n class="caption-entry-state">Already uploaded &#10004;</div>
6de36768 188
63347a0f
C
189 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span>
190 </ng-container>
6de36768 191
63347a0f
C
192 <ng-container *ngIf="videoCaption.action === 'CREATE'">
193 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
6de36768 194
cc3d1dce 195 <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div>
6de36768 196
63347a0f
C
197 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span>
198 </ng-container>
6de36768 199
63347a0f
C
200 <ng-container *ngIf="videoCaption.action === 'REMOVE'">
201 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
6de36768 202
cc3d1dce 203 <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div>
bbe0f064 204
63347a0f
C
205 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span>
206 </ng-container>
207 </div>
bbe0f064 208 </div>
bbe0f064 209
cc3d1dce 210 <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0">
63347a0f 211 No captions for now.
40e87e9e 212 </div>
40e87e9e 213
6de36768 214 </div>
63347a0f 215 </ng-template>
45c6bcf3
C
216 </ng-container>
217
a5cf76af 218 <ng-container ngbNavItem *ngIf="liveVideo">
c6c0fa6c
C
219 <a ngbNavLink i18n>Live settings</a>
220
221 <ng-template ngbNavContent>
222 <div class="row live-settings">
223 <div class="col-md-12">
cd5dc718
C
224 <div class="alert alert-info">
225 <my-live-documentation-link></my-live-documentation-link>
226 </div>
c6c0fa6c 227
df1db951 228 <div *ngIf="liveVideo.rtmpUrl" class="form-group">
a5cf76af 229 <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label>
1916c966 230 <my-input-toggle-hidden inputId="liveVideoRTMPUrl" [value]="liveVideo.rtmpUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
c6c0fa6c
C
231 </div>
232
df1db951
C
233 <div *ngIf="liveVideo.rtmpsUrl" class="form-group">
234 <label for="liveVideoRTMPSUrl" i18n>Live RTMPS Url</label>
235 <my-input-toggle-hidden inputId="liveVideoRTMPSUrl" [value]="liveVideo.rtmpsUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
236 </div>
237
c6c0fa6c 238 <div class="form-group">
a5cf76af 239 <label for="liveVideoStreamKey" i18n>Live stream key</label>
1916c966 240 <my-input-toggle-hidden inputId="liveVideoStreamKey" [value]="liveVideo.streamKey" [withCopy]="true" [readonly]="true"></my-input-toggle-hidden>
c29039e7
C
241
242 <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div>
c6c0fa6c 243 </div>
b5b68755 244
bb4ba6d9 245 <div class="form-group">
3eb7ee65
C
246 <div class="peertube-radio-container">
247 <input type="radio" formControlName="permanentLive" id="permanentLiveFalse" [value]="false">
248 <label i18n for="permanentLiveFalse" class="radio">This is a normal live</label>
249
250 <span class="form-group-description" i18n>
251 You can't stream multiple times in a normal live, but you can save a replay of it that will use the same URL
252 </span>
253 </div>
254
255 <div class="peertube-radio-container">
256 <input type="radio" formControlName="permanentLive" id="permanentLiveTrue" [value]="true">
257 <label i18n for="permanentLiveTrue" class="radio">This is a permanent/recurring live</label>
bb4ba6d9 258
3eb7ee65
C
259 <span class="form-group-description" i18n>
260 You can stream multiple times in a permanent/recurring live. The URL for your viewers won't change but you cannot save replays of your lives
261 </span>
262 </div>
bb4ba6d9
C
263 </div>
264
b5b68755
C
265 <div class="form-group" *ngIf="isSaveReplayEnabled()">
266 <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay">
267 <ng-template ptTemplate="label">
268 <ng-container i18n>Automatically publish a replay when your live ends</ng-container>
269 </ng-template>
270
271 <ng-container ngProjectAs="description">
272 <span i18n>⚠️ If you enable this option, your live will be terminated if you exceed your video quota</span>
273 </ng-container>
274 </my-peertube-checkbox>
275 </div>
c6c0fa6c
C
276 </div>
277 </div>
278 </ng-template>
279
280 </ng-container>
281
282
45c6bcf3
C
283 <ng-container ngbNavItem>
284 <a ngbNavLink i18n>Advanced settings</a>
63347a0f 285
45c6bcf3 286 <ng-template ngbNavContent>
6913f691
C
287 <div class="row advanced-settings">
288 <div class="col-md-12 col-xl-8">
6de36768 289
6913f691 290 <div class="form-group">
7b992a86
C
291 <label i18n for="previewfile">Video preview</label>
292
293 <my-preview-upload
294 i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile"
6913f691 295 previewWidth="360px" previewHeight="200px"
7b992a86 296 ></my-preview-upload>
6913f691 297 </div>
07fa4c97 298
6913f691
C
299 <div class="form-group">
300 <label i18n for="support">Support</label>
9e8929d6
RK
301 <my-help helpType="markdownEnhanced">
302 <ng-template ptTemplate="preHtml">
303 <ng-container i18n>
304 Short text to tell people how they can support you (membership platform...).
305 </ng-container>
306 </ng-template>
307 </my-help>
6913f691 308 <my-markdown-textarea
b15fe00f 309 id="support" formControlName="support" markdownType="enhanced"
6913f691
C
310 [classes]="{ 'input-error': formErrors['support'] }"
311 ></my-markdown-textarea>
312 <div *ngIf="formErrors.support" class="form-error">
313 {{ formErrors.support }}
314 </div>
63347a0f 315 </div>
07fa4c97 316 </div>
501e9611 317
6913f691
C
318 <div class="col-md-12 col-xl-4">
319 <div class="form-group originally-published-at">
320 <label i18n for="originallyPublishedAt">Original publication date</label>
9e8929d6
RK
321 <my-help>
322 <ng-template ptTemplate="preHtml">
323 <ng-container i18n>
324 This is the date when the content was originally published (e.g. the release date for a film)
325 </ng-container>
326 </ng-template>
327 </my-help>
6913f691 328 <p-calendar
8e0a2f2a
C
329 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" [firstDayOfWeek]="0"
330 [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange"
6913f691
C
331 >
332 </p-calendar>
333
334 <div *ngIf="formErrors.originallyPublishedAt" class="form-error">
335 {{ formErrors.originallyPublishedAt }}
336 </div>
337 </div>
338
339 <my-peertube-checkbox
340 inputName="commentsEnabled" formControlName="commentsEnabled"
341 i18n-labelText labelText="Enable video comments"
342 ></my-peertube-checkbox>
501e9611 343
6913f691
C
344 <my-peertube-checkbox
345 inputName="downloadEnabled" formControlName="downloadEnabled"
346 i18n-labelText labelText="Enable download"
347 ></my-peertube-checkbox>
348 </div>
07fa4c97 349 </div>
63347a0f 350 </ng-template>
45c6bcf3 351 </ng-container>
ff249f49 352
3c065fe3 353 <ng-container ngbNavItem *ngIf="getPluginsFields('plugin-settings').length !== 0">
7294aab0
C
354 <a ngbNavLink i18n>Plugin settings</a>
355
356 <ng-template ngbNavContent>
357 <div class="row plugin-settings">
358
359 <div class="col-md-12 col-xl-8">
087fc5da
C
360 <ng-container
361 *ngFor="let pluginSetting of getPluginsFields('plugin-settings')"
362 [ngTemplateOutlet]="pluginSettingTemplate" [ngTemplateOutletContext]="{ $implicit: pluginSetting }"
363 >
364 </ng-container>
7294aab0
C
365 </div>
366
367 </div>
368 </ng-template>
369 </ng-container>
45c6bcf3 370 </div>
47564bbe 371
45c6bcf3 372 <div [ngbNavOutlet]="nav"></div>
ff249f49 373</div>
40e87e9e
C
374
375<my-video-caption-add-modal
ddb62a85 376 #videoCaptionAddModal [existingCaptions]="getExistingCaptions()" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)"
b0c36821 377></my-video-caption-add-modal>