]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-edit/shared/video-edit.component.html
Fix live infohash block
[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
45c6bcf3
C
4 <ng-container ngbNavItem>
5 <a ngbNavLink i18n>Basic info</a>
6
7 <ng-template ngbNavContent>
63347a0f 8 <div class="row">
6f02515e 9 <div class="col-video-edit">
63347a0f
C
10 <div class="form-group">
11 <label i18n for="name">Title</label>
a6d5ff76 12 <input type="text" id="name" class="form-control" formControlName="name" />
63347a0f
C
13 <div *ngIf="formErrors.name" class="form-error">
14 {{ formErrors.name }}
15 </div>
16 </div>
17
18 <div class="form-group">
b0c36821 19 <label i18n class="label-tags">Tags</label>
421d935d
C
20
21 <my-help>
22 <ng-template ptTemplate="customHtml">
23 <ng-container i18n>
24 Tags could be used to suggest relevant recommendations. <br />
47594fd7 25 There is a maximum of 5 tags. <br />
9e8929d6 26 Press <kbd>Enter</kbd> to add a new tag.
421d935d
C
27 </ng-container>
28 </ng-template>
29 </my-help>
30
02c01341
RK
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>
63347a0f
C
35 </div>
36
37 <div class="form-group">
38 <label i18n for="description">Description</label>
421d935d
C
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
be27ef3b 48 <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="true"></my-markdown-textarea>
63347a0f
C
49
50 <div *ngIf="formErrors.description" class="form-error">
51 {{ formErrors.description }}
52 </div>
53 </div>
6de36768 54 </div>
6de36768 55
6f02515e 56 <div class="col-video-edit">
63347a0f 57 <div class="form-group">
02c01341
RK
58 <label i18n for="channel">Channel</label>
59 <my-select-channel labelForId="channel" [items]="userVideoChannels" formControlName="channelId"></my-select-channel>
63347a0f
C
60 </div>
61
62 <div class="form-group">
63 <label i18n for="category">Category</label>
02c01341
RK
64 <my-select-options
65 labelForId="category" [items]="videoCategories" formControlName="category" [clearable]="true"
66 ></my-select-options>
63347a0f
C
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>
02c01341
RK
75 <my-select-options
76 labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true"
77 ></my-select-options>
63347a0f
C
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>
02c01341
RK
86 <my-select-options
87 labelForId="language" [items]="videoLanguages" formControlName="language"
88 [clearable]="true" [searchable]="true" [groupBy]="'group'"
89 ></my-select-options>
63347a0f
C
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>
02c01341
RK
98 <my-select-options
99 labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false"
100 ></my-select-options>
63347a0f
C
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
421d935d
C
120 <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right">
121 <ng-template ptTemplate="label">
02c01341 122 <ng-container i18n>Contains sensitive content</ng-container>
421d935d
C
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">
02c01341 132 <ng-container i18n>Publish after transcoding</ng-container>
421d935d
C
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>
6de36768 139
6de36768
C
140 </div>
141 </div>
63347a0f 142 </ng-template>
45c6bcf3
C
143 </ng-container>
144
b5b68755 145 <ng-container ngbNavItem *ngIf="!liveVideo">
45c6bcf3 146 <a ngbNavLink i18n>Captions</a>
63347a0f 147
45c6bcf3 148 <ng-template ngbNavContent>
63347a0f
C
149 <div class="captions">
150
151 <div class="captions-header">
152 <a (click)="openAddCaptionModal()" class="create-caption">
6ad971d5 153 <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
63347a0f
C
154 <ng-container i18n>Add another caption</ng-container>
155 </a>
6de36768 156 </div>
6de36768 157
63347a0f 158 <div class="form-group" *ngFor="let videoCaption of videoCaptions">
6de36768 159
63347a0f
C
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>
6de36768 166
cc3d1dce 167 <div i18n class="caption-entry-state">Already uploaded &#10004;</div>
6de36768 168
63347a0f
C
169 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span>
170 </ng-container>
6de36768 171
63347a0f
C
172 <ng-container *ngIf="videoCaption.action === 'CREATE'">
173 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
6de36768 174
cc3d1dce 175 <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div>
6de36768 176
63347a0f
C
177 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span>
178 </ng-container>
6de36768 179
63347a0f
C
180 <ng-container *ngIf="videoCaption.action === 'REMOVE'">
181 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
6de36768 182
cc3d1dce 183 <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div>
bbe0f064 184
63347a0f
C
185 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span>
186 </ng-container>
187 </div>
bbe0f064 188 </div>
bbe0f064 189
cc3d1dce 190 <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0">
63347a0f 191 No captions for now.
40e87e9e 192 </div>
40e87e9e 193
6de36768 194 </div>
63347a0f 195 </ng-template>
45c6bcf3
C
196 </ng-container>
197
a5cf76af 198 <ng-container ngbNavItem *ngIf="liveVideo">
c6c0fa6c
C
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">
a5cf76af
C
206 <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label>
207 <my-input-readonly-copy id="liveVideoRTMPUrl" [value]="liveVideo.rtmpUrl"></my-input-readonly-copy>
c6c0fa6c
C
208 </div>
209
210 <div class="form-group">
a5cf76af
C
211 <label for="liveVideoStreamKey" i18n>Live stream key</label>
212 <my-input-readonly-copy id="liveVideoStreamKey" [value]="liveVideo.streamKey"></my-input-readonly-copy>
c6c0fa6c 213 </div>
b5b68755
C
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>
c6c0fa6c
C
226 </div>
227 </div>
228 </ng-template>
229
230 </ng-container>
231
232
45c6bcf3
C
233 <ng-container ngbNavItem>
234 <a ngbNavLink i18n>Advanced settings</a>
63347a0f 235
45c6bcf3 236 <ng-template ngbNavContent>
6913f691
C
237 <div class="row advanced-settings">
238 <div class="col-md-12 col-xl-8">
6de36768 239
6913f691 240 <div class="form-group">
7b992a86
C
241 <label i18n for="previewfile">Video preview</label>
242
243 <my-preview-upload
244 i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile"
6913f691 245 previewWidth="360px" previewHeight="200px"
7b992a86 246 ></my-preview-upload>
6913f691 247 </div>
07fa4c97 248
6913f691
C
249 <div class="form-group">
250 <label i18n for="support">Support</label>
9e8929d6
RK
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>
6913f691 258 <my-markdown-textarea
b15fe00f 259 id="support" formControlName="support" markdownType="enhanced"
6913f691
C
260 [classes]="{ 'input-error': formErrors['support'] }"
261 ></my-markdown-textarea>
262 <div *ngIf="formErrors.support" class="form-error">
263 {{ formErrors.support }}
264 </div>
63347a0f 265 </div>
07fa4c97 266 </div>
501e9611 267
6913f691
C
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>
9e8929d6
RK
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>
6913f691
C
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>
501e9611 293
6913f691
C
294 <my-peertube-checkbox
295 inputName="downloadEnabled" formControlName="downloadEnabled"
296 i18n-labelText labelText="Enable download"
297 ></my-peertube-checkbox>
298 </div>
07fa4c97 299 </div>
63347a0f 300 </ng-template>
45c6bcf3 301 </ng-container>
ff249f49 302
7294aab0
C
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>
45c6bcf3 318 </div>
47564bbe 319
45c6bcf3 320 <div [ngbNavOutlet]="nav"></div>
ff249f49 321</div>
40e87e9e
C
322
323<my-video-caption-add-modal
ba430d75 324 #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)"
b0c36821 325></my-video-caption-add-modal>