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