]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-edit/shared/video-edit.component.html
Lazy load static objects
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / shared / video-edit.component.html
1 <div class="video-edit" [formGroup]="form">
2 <ngb-tabset class="root-tabset bootstrap">
3
4 <ngb-tab i18n-title title="Basic info">
5 <ng-template ngbTabContent>
6 <div class="row">
7 <div class="col-md-8">
8 <div class="form-group">
9 <label i18n for="name">Title</label>
10 <input type="text" id="name" formControlName="name" />
11 <div *ngIf="formErrors.name" class="form-error">
12 {{ formErrors.name }}
13 </div>
14 </div>
15
16 <div class="form-group">
17 <label i18n class="label-tags">Tags</label>
18
19 <my-help>
20 <ng-template ptTemplate="customHtml">
21 <ng-container i18n>
22 Tags could be used to suggest relevant recommendations. <br />
23 There is a maximum of 5 tags. <br />
24 Press Enter to add a new tag.
25 </ng-container>
26 </ng-template>
27 </my-help>
28
29 <tag-input
30 [validators]="tagValidators" [errorMessages]="tagValidatorsMessages"
31 i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a new tag"
32 formControlName="tags" maxItems="5" modelAsStrings="true"
33 ></tag-input>
34 </div>
35
36 <div class="form-group">
37 <label i18n for="description">Description</label>
38
39 <my-help helpType="markdownText">
40 <ng-template ptTemplate="preHtml">
41 <ng-container i18n>
42 Video descriptions are truncated by default and require manual action to expand them.
43 </ng-container>
44 </ng-template>
45 </my-help>
46
47 <my-markdown-textarea truncate="250" formControlName="description" markdownVideo="true"></my-markdown-textarea>
48
49 <div *ngIf="formErrors.description" class="form-error">
50 {{ formErrors.description }}
51 </div>
52 </div>
53 </div>
54
55 <div class="col-md-4">
56 <div class="form-group">
57 <label i18n>Channel</label>
58 <div class="peertube-select-container">
59 <select formControlName="channelId">
60 <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
61 </select>
62 </div>
63 </div>
64
65 <div class="form-group">
66 <label i18n for="category">Category</label>
67 <div class="peertube-select-container">
68 <select id="category" formControlName="category">
69 <option></option>
70 <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option>
71 </select>
72 </div>
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>
81 <div class="peertube-select-container">
82 <select id="licence" formControlName="licence">
83 <option></option>
84 <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option>
85 </select>
86 </div>
87
88 <div *ngIf="formErrors.licence" class="form-error">
89 {{ formErrors.licence }}
90 </div>
91 </div>
92
93 <div class="form-group">
94 <label i18n for="language">Language</label>
95 <div class="peertube-select-container">
96 <select id="language" formControlName="language">
97 <option></option>
98 <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option>
99 </select>
100 </div>
101
102 <div *ngIf="formErrors.language" class="form-error">
103 {{ formErrors.language }}
104 </div>
105 </div>
106
107 <div class="form-group">
108 <label i18n for="privacy">Privacy</label>
109 <div class="peertube-select-container">
110 <select id="privacy" formControlName="privacy">
111 <option></option>
112 <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
113 <option *ngIf="schedulePublicationPossible" [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option>
114 </select>
115 </div>
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"
126 [locale]="calendarLocale" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true"
127 >
128 </p-calendar>
129
130 <div *ngIf="formErrors.schedulePublicationAt" class="form-error">
131 {{ formErrors.schedulePublicationAt }}
132 </div>
133 </div>
134
135 <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right">
136 <ng-template ptTemplate="label">
137 <ng-container i18n>This video contains mature or explicit content</ng-container>
138 </ng-template>
139
140 <ng-template ptTemplate="help">
141 <ng-container i18n>Some instances do not list videos containing mature or explicit content by default.</ng-container>
142 </ng-template>
143 </my-peertube-checkbox>
144
145 <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
146 <ng-template ptTemplate="label">
147 <ng-container i18n>Wait transcoding before publishing the video</ng-container>
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>
154
155 </div>
156 </div>
157 </ng-template>
158 </ngb-tab>
159
160 <ngb-tab i18n-title title="Captions">
161 <ng-template ngbTabContent>
162 <div class="captions">
163
164 <div class="captions-header">
165 <a (click)="openAddCaptionModal()" class="create-caption">
166 <my-global-icon iconName="add"></my-global-icon>
167 <ng-container i18n>Add another caption</ng-container>
168 </a>
169 </div>
170
171 <div class="form-group" *ngFor="let videoCaption of videoCaptions">
172
173 <div class="caption-entry">
174 <ng-container *ngIf="!videoCaption.action">
175 <a
176 i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer"
177 [href]="videoCaption.captionPath"
178 >{{ videoCaption.language.label }}</a>
179
180 <div i18n class="caption-entry-state">Already uploaded &#10004;</div>
181
182 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span>
183 </ng-container>
184
185 <ng-container *ngIf="videoCaption.action === 'CREATE'">
186 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
187
188 <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div>
189
190 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span>
191 </ng-container>
192
193 <ng-container *ngIf="videoCaption.action === 'REMOVE'">
194 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
195
196 <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div>
197
198 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span>
199 </ng-container>
200 </div>
201 </div>
202
203 <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0">
204 No captions for now.
205 </div>
206
207 </div>
208 </ng-template>
209 </ngb-tab>
210
211 <ngb-tab i18n-title title="Advanced settings">
212 <ng-template ngbTabContent>
213 <div class="row advanced-settings">
214 <div class="col-md-12 col-xl-8">
215
216 <div class="form-group">
217 <label i18n for="previewfile">Video preview</label>
218
219 <my-preview-upload
220 i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile"
221 previewWidth="360px" previewHeight="200px"
222 ></my-preview-upload>
223 </div>
224
225 <div class="form-group">
226 <label i18n for="support">Support</label>
227 <my-help helpType="markdownEnhanced" i18n-preHtml preHtml="Short text to tell people how they can support you (membership platform...)."></my-help>
228 <my-markdown-textarea
229 id="support" formControlName="support" textareaWidth="500px" [previewColumn]="true" markdownType="enhanced"
230 [classes]="{ 'input-error': formErrors['support'] }"
231 ></my-markdown-textarea>
232 <div *ngIf="formErrors.support" class="form-error">
233 {{ formErrors.support }}
234 </div>
235 </div>
236 </div>
237
238 <div class="col-md-12 col-xl-4">
239 <div class="form-group originally-published-at">
240 <label i18n for="originallyPublishedAt">Original publication date</label>
241 <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>
242 <p-calendar
243 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat"
244 [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange"
245 >
246 </p-calendar>
247
248 <div *ngIf="formErrors.originallyPublishedAt" class="form-error">
249 {{ formErrors.originallyPublishedAt }}
250 </div>
251 </div>
252
253 <my-peertube-checkbox
254 inputName="commentsEnabled" formControlName="commentsEnabled"
255 i18n-labelText labelText="Enable video comments"
256 ></my-peertube-checkbox>
257
258 <my-peertube-checkbox
259 inputName="downloadEnabled" formControlName="downloadEnabled"
260 i18n-labelText labelText="Enable download"
261 ></my-peertube-checkbox>
262 </div>
263 </div>
264 </ng-template>
265 </ngb-tab>
266
267 </ngb-tabset>
268
269 </div>
270
271 <my-video-caption-add-modal
272 #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)"
273 ></my-video-caption-add-modal>