diff options
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared/video-edit.component.html')
-rw-r--r-- | client/src/app/+videos/+video-edit/shared/video-edit.component.html | 280 |
1 files changed, 280 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html new file mode 100644 index 000000000..c11a60dce --- /dev/null +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html | |||
@@ -0,0 +1,280 @@ | |||
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 Enter 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" i18n-preHtml preHtml="Short text to tell people how they can support you (membership platform...)."></my-help> | ||
234 | <my-markdown-textarea | ||
235 | id="support" formControlName="support" markdownType="enhanced" | ||
236 | [classes]="{ 'input-error': formErrors['support'] }" | ||
237 | ></my-markdown-textarea> | ||
238 | <div *ngIf="formErrors.support" class="form-error"> | ||
239 | {{ formErrors.support }} | ||
240 | </div> | ||
241 | </div> | ||
242 | </div> | ||
243 | |||
244 | <div class="col-md-12 col-xl-4"> | ||
245 | <div class="form-group originally-published-at"> | ||
246 | <label i18n for="originallyPublishedAt">Original publication date</label> | ||
247 | <my-help i18n-preHtml preHtml="This is the date when the content was originally published (e.g. the release date for a film)"></my-help> | ||
248 | <p-calendar | ||
249 | id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" | ||
250 | [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange" | ||
251 | > | ||
252 | </p-calendar> | ||
253 | |||
254 | <div *ngIf="formErrors.originallyPublishedAt" class="form-error"> | ||
255 | {{ formErrors.originallyPublishedAt }} | ||
256 | </div> | ||
257 | </div> | ||
258 | |||
259 | <my-peertube-checkbox | ||
260 | inputName="commentsEnabled" formControlName="commentsEnabled" | ||
261 | i18n-labelText labelText="Enable video comments" | ||
262 | ></my-peertube-checkbox> | ||
263 | |||
264 | <my-peertube-checkbox | ||
265 | inputName="downloadEnabled" formControlName="downloadEnabled" | ||
266 | i18n-labelText labelText="Enable download" | ||
267 | ></my-peertube-checkbox> | ||
268 | </div> | ||
269 | </div> | ||
270 | </ng-template> | ||
271 | </ng-container> | ||
272 | |||
273 | </div> | ||
274 | |||
275 | <div [ngbNavOutlet]="nav"></div> | ||
276 | </div> | ||
277 | |||
278 | <my-video-caption-add-modal | ||
279 | #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)" | ||
280 | ></my-video-caption-add-modal> | ||