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