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