diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-09 14:55:06 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-09 14:55:06 +0200 |
commit | 63347a0ff966c7863e5b7431effa1cb0668df893 (patch) | |
tree | 8f89d9b4a73f7157103574c05832eff21e338272 /client/src/app/videos/+video-edit/shared | |
parent | b34a444e291c8ec90b4c2c965f7d0d6904d1faa7 (diff) | |
download | PeerTube-63347a0ff966c7863e5b7431effa1cb0668df893.tar.gz PeerTube-63347a0ff966c7863e5b7431effa1cb0668df893.tar.zst PeerTube-63347a0ff966c7863e5b7431effa1cb0668df893.zip |
Migrate to bootstrap 4 and ng-bootstrap
Diffstat (limited to 'client/src/app/videos/+video-edit/shared')
5 files changed, 240 insertions, 241 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.html b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.html index 9cd303b29..30aefdbfc 100644 --- a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.html +++ b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.html | |||
@@ -1,47 +1,45 @@ | |||
1 | <div bsModal #modal="bs-modal" class="modal" tabindex="-1"> | 1 | <ng-template #modal> |
2 | <div class="modal-dialog"> | 2 | <ng-container [formGroup]="form"> |
3 | <div class="modal-content" [formGroup]="form"> | ||
4 | 3 | ||
5 | <div class="modal-header"> | 4 | <div class="modal-header"> |
6 | <span class="close" aria-hidden="true" (click)="hide()"></span> | 5 | <h4 i18n class="modal-title">Add caption</h4> |
7 | <h4 i18n class="modal-title">Add caption</h4> | 6 | <span class="close" aria-label="Close" role="button" (click)="hide()"></span> |
8 | </div> | 7 | </div> |
9 | 8 | ||
10 | <div class="modal-body"> | 9 | <div class="modal-body"> |
11 | <label i18n for="language">Language</label> | 10 | <label i18n for="language">Language</label> |
12 | <div class="peertube-select-container"> | 11 | <div class="peertube-select-container"> |
13 | <select id="language" formControlName="language"> | 12 | <select id="language" formControlName="language"> |
14 | <option></option> | 13 | <option></option> |
15 | <option *ngFor="let language of videoCaptionLanguages" [value]="language.id">{{ language.label }}</option> | 14 | <option *ngFor="let language of videoCaptionLanguages" [value]="language.id">{{ language.label }}</option> |
16 | </select> | 15 | </select> |
17 | </div> | 16 | </div> |
18 | 17 | ||
19 | <div *ngIf="formErrors.language" class="form-error"> | 18 | <div *ngIf="formErrors.language" class="form-error"> |
20 | {{ formErrors.language }} | 19 | {{ formErrors.language }} |
21 | </div> | 20 | </div> |
22 | 21 | ||
23 | <div class="caption-file"> | 22 | <div class="caption-file"> |
24 | <my-reactive-file | 23 | <my-reactive-file |
25 | formControlName="captionfile" inputName="captionfile" i18n-inputLabel inputLabel="Select the caption file" | 24 | formControlName="captionfile" inputName="captionfile" i18n-inputLabel inputLabel="Select the caption file" |
26 | [extensions]="videoCaptionExtensions" [maxFileSize]="videoCaptionMaxSize" [displayFilename]="true" | 25 | [extensions]="videoCaptionExtensions" [maxFileSize]="videoCaptionMaxSize" [displayFilename]="true" |
27 | ></my-reactive-file> | 26 | ></my-reactive-file> |
28 | </div> | 27 | </div> |
29 | 28 | ||
30 | <div *ngIf="isReplacingExistingCaption()" class="warning-replace-caption" i18n> | 29 | <div *ngIf="isReplacingExistingCaption()" class="warning-replace-caption" i18n> |
31 | This will replace an existing caption! | 30 | This will replace an existing caption! |
32 | </div> | 31 | </div> |
32 | </div> | ||
33 | 33 | ||
34 | <div class="form-group inputs"> | 34 | <div class="modal-footer inputs"> |
35 | <span i18n class="action-button action-button-cancel" (click)="hide()"> | 35 | <span i18n class="action-button action-button-cancel" (click)="hide()"> |
36 | Cancel | 36 | Cancel |
37 | </span> | 37 | </span> |
38 | 38 | ||
39 | <input | 39 | <input |
40 | type="submit" i18n-value value="Add this caption" class="action-button-submit" | 40 | type="submit" i18n-value value="Add this caption" class="action-button-submit" |
41 | [disabled]="!form.valid" (click)="addCaption()" | 41 | [disabled]="!form.valid" (click)="addCaption()" |
42 | > | 42 | > |
43 | </div> | ||
44 | </div> | ||
45 | </div> | 43 | </div> |
46 | </div> | 44 | </ng-container> |
47 | </div> | 45 | </ng-template> |
diff --git a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts index d084a4908..07c33030a 100644 --- a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { ModalDirective } from 'ngx-bootstrap/modal' | ||
3 | import { FormReactive } from '@app/shared' | 2 | import { FormReactive } from '@app/shared' |
4 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 3 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
5 | import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validators/video-captions-validators.service' | 4 | import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validators/video-captions-validators.service' |
6 | import { ServerService } from '@app/core' | 5 | import { ServerService } from '@app/core' |
7 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' | 6 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' |
7 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | ||
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-video-caption-add-modal', | 10 | selector: 'my-video-caption-add-modal', |
@@ -17,14 +17,16 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
17 | 17 | ||
18 | @Output() captionAdded = new EventEmitter<VideoCaptionEdit>() | 18 | @Output() captionAdded = new EventEmitter<VideoCaptionEdit>() |
19 | 19 | ||
20 | @ViewChild('modal') modal: ModalDirective | 20 | @ViewChild('modal') modal: ElementRef |
21 | 21 | ||
22 | videoCaptionLanguages = [] | 22 | videoCaptionLanguages = [] |
23 | 23 | ||
24 | private openedModal: NgbModalRef | ||
24 | private closingModal = false | 25 | private closingModal = false |
25 | 26 | ||
26 | constructor ( | 27 | constructor ( |
27 | protected formValidatorService: FormValidatorService, | 28 | protected formValidatorService: FormValidatorService, |
29 | private modalService: NgbModal, | ||
28 | private serverService: ServerService, | 30 | private serverService: ServerService, |
29 | private videoCaptionsValidatorsService: VideoCaptionsValidatorsService | 31 | private videoCaptionsValidatorsService: VideoCaptionsValidatorsService |
30 | ) { | 32 | ) { |
@@ -51,13 +53,12 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
51 | show () { | 53 | show () { |
52 | this.closingModal = false | 54 | this.closingModal = false |
53 | 55 | ||
54 | this.modal.show() | 56 | this.openedModal = this.modalService.open(this.modal, { keyboard: false }) |
55 | } | 57 | } |
56 | 58 | ||
57 | hide () { | 59 | hide () { |
58 | this.closingModal = true | 60 | this.closingModal = true |
59 | 61 | this.openedModal.close() | |
60 | this.modal.hide() | ||
61 | } | 62 | } |
62 | 63 | ||
63 | isReplacingExistingCaption () { | 64 | isReplacingExistingCaption () { |
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 | ||
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.scss b/client/src/app/videos/+video-edit/shared/video-edit.component.scss index f3d9ee44a..4d1871231 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.scss +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.scss | |||
@@ -111,6 +111,8 @@ | |||
111 | border: none; | 111 | border: none; |
112 | padding: 0; | 112 | padding: 0; |
113 | outline: 0; | 113 | outline: 0; |
114 | color: inherit; | ||
115 | font-weight: $font-semibold; | ||
114 | } | 116 | } |
115 | 117 | ||
116 | .icon.icon-validate { | 118 | .icon.icon-validate { |
@@ -143,15 +145,7 @@ p-calendar { | |||
143 | 145 | ||
144 | /deep/ { | 146 | /deep/ { |
145 | .root-tabset > .nav { | 147 | .root-tabset > .nav { |
146 | margin-left: 15px; | ||
147 | margin-bottom: 15px; | 148 | margin-bottom: 15px; |
148 | |||
149 | .nav-link { | ||
150 | display: flex !important; | ||
151 | align-items: center; | ||
152 | height: 30px !important; | ||
153 | padding: 0 15px !important; | ||
154 | } | ||
155 | } | 149 | } |
156 | 150 | ||
157 | .ng2-tag-input { | 151 | .ng2-tag-input { |
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.module.ts b/client/src/app/videos/+video-edit/shared/video-edit.module.ts index f6bd65fdc..f441d3fde 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.module.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.module.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { TabsModule } from 'ngx-bootstrap/tabs' | ||
3 | import { TagInputModule } from 'ngx-chips' | 2 | import { TagInputModule } from 'ngx-chips' |
4 | import { SharedModule } from '../../../shared/' | 3 | import { SharedModule } from '../../../shared/' |
5 | import { VideoEditComponent } from './video-edit.component' | 4 | import { VideoEditComponent } from './video-edit.component' |
@@ -23,7 +22,6 @@ import { VideoCaptionAddModalComponent } from './video-caption-add-modal.compone | |||
23 | 22 | ||
24 | exports: [ | 23 | exports: [ |
25 | TagInputModule, | 24 | TagInputModule, |
26 | TabsModule, | ||
27 | CalendarModule, | 25 | CalendarModule, |
28 | 26 | ||
29 | VideoEditComponent | 27 | VideoEditComponent |