]>
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 | <tag-input | |
32 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" | |
33 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a new tag" | |
34 | formControlName="tags" [maxItems]="5" [modelAsStrings]="true" | |
35 | ></tag-input> | |
36 | </div> | |
37 | ||
38 | <div class="form-group"> | |
39 | <label i18n for="description">Description</label> | |
40 | ||
41 | <my-help helpType="markdownText"> | |
42 | <ng-template ptTemplate="preHtml"> | |
43 | <ng-container i18n> | |
44 | Video descriptions are truncated by default and require manual action to expand them. | |
45 | </ng-container> | |
46 | </ng-template> | |
47 | </my-help> | |
48 | ||
49 | <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="true"></my-markdown-textarea> | |
50 | ||
51 | <div *ngIf="formErrors.description" class="form-error"> | |
52 | {{ formErrors.description }} | |
53 | </div> | |
54 | </div> | |
55 | </div> | |
56 | ||
57 | <div class="col-video-edit"> | |
58 | <div class="form-group"> | |
59 | <label i18n>Channel</label> | |
60 | <div class="peertube-select-container"> | |
61 | <select formControlName="channelId" class="form-control"> | |
62 | <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option> | |
63 | </select> | |
64 | </div> | |
65 | </div> | |
66 | ||
67 | <div class="form-group"> | |
68 | <label i18n for="category">Category</label> | |
69 | <div class="peertube-select-container"> | |
70 | <select id="category" formControlName="category" class="form-control"> | |
71 | <option></option> | |
72 | <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option> | |
73 | </select> | |
74 | </div> | |
75 | ||
76 | <div *ngIf="formErrors.category" class="form-error"> | |
77 | {{ formErrors.category }} | |
78 | </div> | |
79 | </div> | |
80 | ||
81 | <div class="form-group"> | |
82 | <label i18n for="licence">Licence</label> | |
83 | <div class="peertube-select-container"> | |
84 | <select id="licence" formControlName="licence" class="form-control"> | |
85 | <option></option> | |
86 | <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option> | |
87 | </select> | |
88 | </div> | |
89 | ||
90 | <div *ngIf="formErrors.licence" class="form-error"> | |
91 | {{ formErrors.licence }} | |
92 | </div> | |
93 | </div> | |
94 | ||
95 | <div class="form-group"> | |
96 | <label i18n for="language">Language</label> | |
97 | <div class="peertube-select-container"> | |
98 | <select id="language" formControlName="language" class="form-control"> | |
99 | <option></option> | |
100 | <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option> | |
101 | </select> | |
102 | </div> | |
103 | ||
104 | <div *ngIf="formErrors.language" class="form-error"> | |
105 | {{ formErrors.language }} | |
106 | </div> | |
107 | </div> | |
108 | ||
109 | <div class="form-group"> | |
110 | <label i18n for="privacy">Privacy</label> | |
111 | <div class="peertube-select-container"> | |
112 | <select id="privacy" formControlName="privacy" class="form-control"> | |
113 | <option></option> | |
114 | <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option> | |
115 | <option *ngIf="schedulePublicationPossible" [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option> | |
116 | </select> | |
117 | </div> | |
118 | ||
119 | <div *ngIf="formErrors.privacy" class="form-error"> | |
120 | {{ formErrors.privacy }} | |
121 | </div> | |
122 | </div> | |
123 | ||
124 | <div *ngIf="schedulePublicationEnabled" class="form-group"> | |
125 | <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label> | |
126 | <p-calendar | |
127 | id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat" | |
128 | [locale]="calendarLocale" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true" | |
129 | > | |
130 | </p-calendar> | |
131 | ||
132 | <div *ngIf="formErrors.schedulePublicationAt" class="form-error"> | |
133 | {{ formErrors.schedulePublicationAt }} | |
134 | </div> | |
135 | </div> | |
136 | ||
137 | <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right"> | |
138 | <ng-template ptTemplate="label"> | |
139 | <ng-container i18n>This video contains mature or explicit content</ng-container> | |
140 | </ng-template> | |
141 | ||
142 | <ng-template ptTemplate="help"> | |
143 | <ng-container i18n>Some instances do not list videos containing mature or explicit content by default.</ng-container> | |
144 | </ng-template> | |
145 | </my-peertube-checkbox> | |
146 | ||
147 | <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> | |
148 | <ng-template ptTemplate="label"> | |
149 | <ng-container i18n>Wait transcoding before publishing the video</ng-container> | |
150 | </ng-template> | |
151 | ||
152 | <ng-template ptTemplate="help"> | |
153 | <ng-container i18n>If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends.</ng-container> | |
154 | </ng-template> | |
155 | </my-peertube-checkbox> | |
156 | ||
157 | </div> | |
158 | </div> | |
159 | </ng-template> | |
160 | </ng-container> | |
161 | ||
162 | <ng-container ngbNavItem> | |
163 | <a ngbNavLink i18n>Captions</a> | |
164 | ||
165 | <ng-template ngbNavContent> | |
166 | <div class="captions"> | |
167 | ||
168 | <div class="captions-header"> | |
169 | <a (click)="openAddCaptionModal()" class="create-caption"> | |
170 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> | |
171 | <ng-container i18n>Add another caption</ng-container> | |
172 | </a> | |
173 | </div> | |
174 | ||
175 | <div class="form-group" *ngFor="let videoCaption of videoCaptions"> | |
176 | ||
177 | <div class="caption-entry"> | |
178 | <ng-container *ngIf="!videoCaption.action"> | |
179 | <a | |
180 | i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer" | |
181 | [href]="videoCaption.captionPath" | |
182 | >{{ videoCaption.language.label }}</a> | |
183 | ||
184 | <div i18n class="caption-entry-state">Already uploaded ✔</div> | |
185 | ||
186 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span> | |
187 | </ng-container> | |
188 | ||
189 | <ng-container *ngIf="videoCaption.action === 'CREATE'"> | |
190 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
191 | ||
192 | <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div> | |
193 | ||
194 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span> | |
195 | </ng-container> | |
196 | ||
197 | <ng-container *ngIf="videoCaption.action === 'REMOVE'"> | |
198 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
199 | ||
200 | <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div> | |
201 | ||
202 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span> | |
203 | </ng-container> | |
204 | </div> | |
205 | </div> | |
206 | ||
207 | <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0"> | |
208 | No captions for now. | |
209 | </div> | |
210 | ||
211 | </div> | |
212 | </ng-template> | |
213 | </ng-container> | |
214 | ||
215 | <ng-container ngbNavItem> | |
216 | <a ngbNavLink i18n>Advanced settings</a> | |
217 | ||
218 | <ng-template ngbNavContent> | |
219 | <div class="row advanced-settings"> | |
220 | <div class="col-md-12 col-xl-8"> | |
221 | ||
222 | <div class="form-group"> | |
223 | <label i18n for="previewfile">Video preview</label> | |
224 | ||
225 | <my-preview-upload | |
226 | i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile" | |
227 | previewWidth="360px" previewHeight="200px" | |
228 | ></my-preview-upload> | |
229 | </div> | |
230 | ||
231 | <div class="form-group"> | |
232 | <label i18n for="support">Support</label> | |
233 | <my-help helpType="markdownEnhanced"> | |
234 | <ng-template ptTemplate="preHtml"> | |
235 | <ng-container i18n> | |
236 | Short text to tell people how they can support you (membership platform...). | |
237 | </ng-container> | |
238 | </ng-template> | |
239 | </my-help> | |
240 | <my-markdown-textarea | |
241 | id="support" formControlName="support" markdownType="enhanced" | |
242 | [classes]="{ 'input-error': formErrors['support'] }" | |
243 | ></my-markdown-textarea> | |
244 | <div *ngIf="formErrors.support" class="form-error"> | |
245 | {{ formErrors.support }} | |
246 | </div> | |
247 | </div> | |
248 | </div> | |
249 | ||
250 | <div class="col-md-12 col-xl-4"> | |
251 | <div class="form-group originally-published-at"> | |
252 | <label i18n for="originallyPublishedAt">Original publication date</label> | |
253 | <my-help> | |
254 | <ng-template ptTemplate="preHtml"> | |
255 | <ng-container i18n> | |
256 | This is the date when the content was originally published (e.g. the release date for a film) | |
257 | </ng-container> | |
258 | </ng-template> | |
259 | </my-help> | |
260 | <p-calendar | |
261 | id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" | |
262 | [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange" | |
263 | > | |
264 | </p-calendar> | |
265 | ||
266 | <div *ngIf="formErrors.originallyPublishedAt" class="form-error"> | |
267 | {{ formErrors.originallyPublishedAt }} | |
268 | </div> | |
269 | </div> | |
270 | ||
271 | <my-peertube-checkbox | |
272 | inputName="commentsEnabled" formControlName="commentsEnabled" | |
273 | i18n-labelText labelText="Enable video comments" | |
274 | ></my-peertube-checkbox> | |
275 | ||
276 | <my-peertube-checkbox | |
277 | inputName="downloadEnabled" formControlName="downloadEnabled" | |
278 | i18n-labelText labelText="Enable download" | |
279 | ></my-peertube-checkbox> | |
280 | </div> | |
281 | </div> | |
282 | </ng-template> | |
283 | </ng-container> | |
284 | ||
285 | </div> | |
286 | ||
287 | <div [ngbNavOutlet]="nav"></div> | |
288 | </div> | |
289 | ||
290 | <my-video-caption-add-modal | |
291 | #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)" | |
292 | ></my-video-caption-add-modal> |