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