]>
Commit | Line | Data |
---|---|---|
63347a0f C |
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"> | |
b0c36821 J |
17 | <label i18n class="label-tags">Tags</label> |
18 | <my-help i18n-preHtml preHtml="Tags could be used to suggest relevant recommendations.</br>Press Enter to add a new tag."></my-help> | |
63347a0f C |
19 | <tag-input |
20 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" | |
baf0a8c9 | 21 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a new tag" |
63347a0f C |
22 | formControlName="tags" maxItems="5" modelAsStrings="true" |
23 | ></tag-input> | |
24 | </div> | |
25 | ||
26 | <div class="form-group"> | |
27 | <label i18n for="description">Description</label> | |
28 | <my-help helpType="markdownText" i18n-preHtml preHtml="Video descriptions are truncated by default and require manual action to expand them."></my-help> | |
29 | <my-markdown-textarea truncate="250" formControlName="description"></my-markdown-textarea> | |
30 | ||
31 | <div *ngIf="formErrors.description" class="form-error"> | |
32 | {{ formErrors.description }} | |
33 | </div> | |
34 | </div> | |
6de36768 | 35 | </div> |
6de36768 | 36 | |
63347a0f C |
37 | <div class="col-md-4"> |
38 | <div class="form-group"> | |
39 | <label i18n>Channel</label> | |
40 | <div class="peertube-select-container"> | |
41 | <select formControlName="channelId"> | |
42 | <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option> | |
43 | </select> | |
44 | </div> | |
45 | </div> | |
46 | ||
47 | <div class="form-group"> | |
48 | <label i18n for="category">Category</label> | |
49 | <div class="peertube-select-container"> | |
50 | <select id="category" formControlName="category"> | |
51 | <option></option> | |
52 | <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option> | |
53 | </select> | |
54 | </div> | |
55 | ||
56 | <div *ngIf="formErrors.category" class="form-error"> | |
57 | {{ formErrors.category }} | |
58 | </div> | |
59 | </div> | |
60 | ||
61 | <div class="form-group"> | |
62 | <label i18n for="licence">Licence</label> | |
63 | <div class="peertube-select-container"> | |
64 | <select id="licence" formControlName="licence"> | |
65 | <option></option> | |
66 | <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option> | |
67 | </select> | |
68 | </div> | |
69 | ||
70 | <div *ngIf="formErrors.licence" class="form-error"> | |
71 | {{ formErrors.licence }} | |
72 | </div> | |
73 | </div> | |
74 | ||
75 | <div class="form-group"> | |
76 | <label i18n for="language">Language</label> | |
77 | <div class="peertube-select-container"> | |
78 | <select id="language" formControlName="language"> | |
79 | <option></option> | |
80 | <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option> | |
81 | </select> | |
82 | </div> | |
83 | ||
84 | <div *ngIf="formErrors.language" class="form-error"> | |
85 | {{ formErrors.language }} | |
86 | </div> | |
87 | </div> | |
88 | ||
89 | <div class="form-group"> | |
90 | <label i18n for="privacy">Privacy</label> | |
91 | <div class="peertube-select-container"> | |
92 | <select id="privacy" formControlName="privacy"> | |
93 | <option></option> | |
94 | <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option> | |
95 | <option *ngIf="schedulePublicationPossible" [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option> | |
96 | </select> | |
97 | </div> | |
98 | ||
99 | <div *ngIf="formErrors.privacy" class="form-error"> | |
100 | {{ formErrors.privacy }} | |
101 | </div> | |
102 | </div> | |
103 | ||
104 | <div *ngIf="schedulePublicationEnabled" class="form-group"> | |
105 | <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label> | |
106 | <p-calendar | |
107 | id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat" | |
108 | [locale]="calendarLocale" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true" | |
109 | > | |
110 | </p-calendar> | |
111 | ||
112 | <div *ngIf="formErrors.schedulePublicationAt" class="form-error"> | |
113 | {{ formErrors.schedulePublicationAt }} | |
114 | </div> | |
115 | </div> | |
116 | ||
117 | <my-peertube-checkbox | |
118 | inputName="nsfw" formControlName="nsfw" | |
119 | i18n-labelText labelText="This video contains mature or explicit content" | |
120 | i18n-helpHtml helpHtml="Some instances do not list videos containing mature or explicit content by default." | |
121 | ></my-peertube-checkbox> | |
122 | ||
123 | <my-peertube-checkbox | |
124 | inputName="commentsEnabled" formControlName="commentsEnabled" | |
125 | i18n-labelText labelText="Enable video comments" | |
126 | ></my-peertube-checkbox> | |
127 | ||
e0d827e2 | 128 | <my-peertube-checkbox |
7f2cfe3a | 129 | inputName="downloadEnabled" formControlName="downloadEnabled" |
4ffdcfc6 | 130 | i18n-labelText labelText="Disable downloading" |
e0d827e2 LD |
131 | ></my-peertube-checkbox> |
132 | ||
63347a0f C |
133 | <my-peertube-checkbox |
134 | inputName="waitTranscoding" formControlName="waitTranscoding" | |
135 | i18n-labelText labelText="Wait transcoding before publishing the video" | |
136 | i18n-helpHtml helpHtml="If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends." | |
137 | ></my-peertube-checkbox> | |
6de36768 | 138 | |
6de36768 C |
139 | </div> |
140 | </div> | |
63347a0f C |
141 | </ng-template> |
142 | </ngb-tab> | |
143 | ||
144 | <ngb-tab i18n-title title="Captions"> | |
145 | <ng-template ngbTabContent> | |
146 | <div class="captions"> | |
147 | ||
148 | <div class="captions-header"> | |
149 | <a (click)="openAddCaptionModal()" class="create-caption"> | |
150 | <span class="icon icon-add"></span> | |
151 | <ng-container i18n>Add another caption</ng-container> | |
152 | </a> | |
6de36768 | 153 | </div> |
6de36768 | 154 | |
63347a0f | 155 | <div class="form-group" *ngFor="let videoCaption of videoCaptions"> |
6de36768 | 156 | |
63347a0f C |
157 | <div class="caption-entry"> |
158 | <ng-container *ngIf="!videoCaption.action"> | |
159 | <a | |
160 | i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer" | |
161 | [href]="videoCaption.captionPath" | |
162 | >{{ videoCaption.language.label }}</a> | |
6de36768 | 163 | |
cc3d1dce | 164 | <div i18n class="caption-entry-state">Already uploaded ✔</div> |
6de36768 | 165 | |
63347a0f C |
166 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span> |
167 | </ng-container> | |
6de36768 | 168 | |
63347a0f C |
169 | <ng-container *ngIf="videoCaption.action === 'CREATE'"> |
170 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 171 | |
cc3d1dce | 172 | <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div> |
6de36768 | 173 | |
63347a0f C |
174 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span> |
175 | </ng-container> | |
6de36768 | 176 | |
63347a0f C |
177 | <ng-container *ngIf="videoCaption.action === 'REMOVE'"> |
178 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 179 | |
cc3d1dce | 180 | <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div> |
bbe0f064 | 181 | |
63347a0f C |
182 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span> |
183 | </ng-container> | |
184 | </div> | |
bbe0f064 | 185 | </div> |
bbe0f064 | 186 | |
cc3d1dce | 187 | <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0"> |
63347a0f | 188 | No captions for now. |
40e87e9e | 189 | </div> |
40e87e9e | 190 | |
6de36768 | 191 | </div> |
63347a0f C |
192 | </ng-template> |
193 | </ngb-tab> | |
194 | ||
195 | <ngb-tab i18n-title title="Advanced settings"> | |
196 | <ng-template ngbTabContent> | |
197 | <div class="advanced-settings"> | |
198 | <div class="form-group"> | |
199 | <my-video-image | |
200 | i18n-inputLabel inputLabel="Upload thumbnail" inputName="thumbnailfile" formControlName="thumbnailfile" | |
201 | previewWidth="200px" previewHeight="110px" | |
202 | ></my-video-image> | |
203 | </div> | |
6de36768 | 204 | |
63347a0f C |
205 | <div class="form-group"> |
206 | <my-video-image | |
207 | i18n-inputLabel inputLabel="Upload preview" inputName="previewfile" formControlName="previewfile" | |
208 | previewWidth="360px" previewHeight="200px" | |
209 | ></my-video-image> | |
210 | </div> | |
07fa4c97 | 211 | |
63347a0f C |
212 | <div class="form-group"> |
213 | <label i18n for="support">Support</label> | |
214 | <my-help helpType="markdownEnhanced" i18n-preHtml preHtml="Short text to tell people how they can support you (membership platform...)."></my-help> | |
215 | <my-markdown-textarea | |
216 | id="support" formControlName="support" textareaWidth="500px" [previewColumn]="true" markdownType="enhanced" | |
217 | [classes]="{ 'input-error': formErrors['support'] }" | |
218 | ></my-markdown-textarea> | |
219 | <div *ngIf="formErrors.support" class="form-error"> | |
220 | {{ formErrors.support }} | |
221 | </div> | |
07fa4c97 C |
222 | </div> |
223 | </div> | |
63347a0f C |
224 | </ng-template> |
225 | </ngb-tab> | |
ff249f49 | 226 | |
63347a0f | 227 | </ngb-tabset> |
47564bbe | 228 | |
ff249f49 | 229 | </div> |
40e87e9e C |
230 | |
231 | <my-video-caption-add-modal | |
f4001cf4 | 232 | #videoCaptionAddModal [existingCaptions]="existingCaptions" (captionAdded)="onCaptionAdded($event)" |
b0c36821 | 233 | ></my-video-caption-add-modal> |