]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+videos/+video-edit/shared/video-edit.component.html
Merge remote-tracking branch 'weblate/develop' into develop
[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 <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>
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 &#10004;</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>
199 <a ngbNavLink i18n>Advanced settings</a>
200
201 <ng-template ngbNavContent>
202 <div class="row advanced-settings">
203 <div class="col-md-12 col-xl-8">
204
205 <div class="form-group">
206 <label i18n for="previewfile">Video preview</label>
207
208 <my-preview-upload
209 i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile"
210 previewWidth="360px" previewHeight="200px"
211 ></my-preview-upload>
212 </div>
213
214 <div class="form-group">
215 <label i18n for="support">Support</label>
216 <my-help helpType="markdownEnhanced">
217 <ng-template ptTemplate="preHtml">
218 <ng-container i18n>
219 Short text to tell people how they can support you (membership platform...).
220 </ng-container>
221 </ng-template>
222 </my-help>
223 <my-markdown-textarea
224 id="support" formControlName="support" markdownType="enhanced"
225 [classes]="{ 'input-error': formErrors['support'] }"
226 ></my-markdown-textarea>
227 <div *ngIf="formErrors.support" class="form-error">
228 {{ formErrors.support }}
229 </div>
230 </div>
231 </div>
232
233 <div class="col-md-12 col-xl-4">
234 <div class="form-group originally-published-at">
235 <label i18n for="originallyPublishedAt">Original publication date</label>
236 <my-help>
237 <ng-template ptTemplate="preHtml">
238 <ng-container i18n>
239 This is the date when the content was originally published (e.g. the release date for a film)
240 </ng-container>
241 </ng-template>
242 </my-help>
243 <p-calendar
244 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat"
245 [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange"
246 >
247 </p-calendar>
248
249 <div *ngIf="formErrors.originallyPublishedAt" class="form-error">
250 {{ formErrors.originallyPublishedAt }}
251 </div>
252 </div>
253
254 <my-peertube-checkbox
255 inputName="commentsEnabled" formControlName="commentsEnabled"
256 i18n-labelText labelText="Enable video comments"
257 ></my-peertube-checkbox>
258
259 <my-peertube-checkbox
260 inputName="downloadEnabled" formControlName="downloadEnabled"
261 i18n-labelText labelText="Enable download"
262 ></my-peertube-checkbox>
263 </div>
264 </div>
265 </ng-template>
266 </ng-container>
267
268 <ng-container ngbNavItem *ngIf="pluginFields.length !== 0">
269 <a ngbNavLink i18n>Plugin settings</a>
270
271 <ng-template ngbNavContent>
272 <div class="row plugin-settings">
273
274 <div class="col-md-12 col-xl-8">
275 <div *ngFor="let pluginSetting of pluginFields" class="form-group">
276 <my-dynamic-form-field [form]="pluginDataFormGroup" [formErrors]="formErrors" [setting]="pluginSetting.commonOptions"></my-dynamic-form-field>
277 </div>
278 </div>
279
280 </div>
281 </ng-template>
282 </ng-container>
283 </div>
284
285 <div [ngbNavOutlet]="nav"></div>
286 </div>
287
288 <my-video-caption-add-modal
289 #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)"
290 ></my-video-caption-add-modal>