diff options
Diffstat (limited to 'client/src/app/videos/+video-edit/shared')
5 files changed, 28 insertions, 31 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 30aefdbfc..19043eee6 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 | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | <div class="modal-header"> | 4 | <div class="modal-header"> |
5 | <h4 i18n class="modal-title">Add caption</h4> | 5 | <h4 i18n class="modal-title">Add caption</h4> |
6 | <span class="close" aria-label="Close" role="button" (click)="hide()"></span> | 6 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon> |
7 | </div> | 7 | </div> |
8 | 8 | ||
9 | <div class="modal-body"> | 9 | <div class="modal-body"> |
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 07c33030a..1413e7262 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 | |||
@@ -5,6 +5,7 @@ import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validator | |||
5 | import { ServerService } from '@app/core' | 5 | import { ServerService } from '@app/core' |
6 | 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' | 7 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
8 | import { VideoConstant } from '../../../../../../shared' | ||
8 | 9 | ||
9 | @Component({ | 10 | @Component({ |
10 | selector: 'my-video-caption-add-modal', | 11 | selector: 'my-video-caption-add-modal', |
@@ -19,7 +20,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
19 | 20 | ||
20 | @ViewChild('modal') modal: ElementRef | 21 | @ViewChild('modal') modal: ElementRef |
21 | 22 | ||
22 | videoCaptionLanguages = [] | 23 | videoCaptionLanguages: VideoConstant<string>[] = [] |
23 | 24 | ||
24 | private openedModal: NgbModalRef | 25 | private openedModal: NgbModalRef |
25 | private closingModal = false | 26 | private closingModal = false |
@@ -59,6 +60,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
59 | hide () { | 60 | hide () { |
60 | this.closingModal = true | 61 | this.closingModal = true |
61 | this.openedModal.close() | 62 | this.openedModal.close() |
63 | this.form.reset() | ||
62 | } | 64 | } |
63 | 65 | ||
64 | isReplacingExistingCaption () { | 66 | isReplacingExistingCaption () { |
@@ -70,8 +72,6 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
70 | } | 72 | } |
71 | 73 | ||
72 | async addCaption () { | 74 | async addCaption () { |
73 | this.hide() | ||
74 | |||
75 | const languageId = this.form.value[ 'language' ] | 75 | const languageId = this.form.value[ 'language' ] |
76 | const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) | 76 | const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) |
77 | 77 | ||
@@ -80,6 +80,6 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
80 | captionfile: this.form.value[ 'captionfile' ] | 80 | captionfile: this.form.value[ 'captionfile' ] |
81 | }) | 81 | }) |
82 | 82 | ||
83 | this.form.reset() | 83 | this.hide() |
84 | } | 84 | } |
85 | } | 85 | } |
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 8c74a1ca6..7fd9af208 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 | |||
@@ -127,10 +127,11 @@ | |||
127 | 127 | ||
128 | <my-peertube-checkbox | 128 | <my-peertube-checkbox |
129 | inputName="downloadEnabled" formControlName="downloadEnabled" | 129 | inputName="downloadEnabled" formControlName="downloadEnabled" |
130 | i18n-labelText labelText="Disable downloading" | 130 | i18n-labelText labelText="Download enabled" |
131 | ></my-peertube-checkbox> | 131 | ></my-peertube-checkbox> |
132 | 132 | ||
133 | <my-peertube-checkbox | 133 | <my-peertube-checkbox |
134 | *ngIf="waitTranscodingEnabled" | ||
134 | inputName="waitTranscoding" formControlName="waitTranscoding" | 135 | inputName="waitTranscoding" formControlName="waitTranscoding" |
135 | i18n-labelText labelText="Wait transcoding before publishing the video" | 136 | 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 | i18n-helpHtml helpHtml="If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends." |
@@ -147,7 +148,7 @@ | |||
147 | 148 | ||
148 | <div class="captions-header"> | 149 | <div class="captions-header"> |
149 | <a (click)="openAddCaptionModal()" class="create-caption"> | 150 | <a (click)="openAddCaptionModal()" class="create-caption"> |
150 | <span class="icon icon-add"></span> | 151 | <my-global-icon iconName="add"></my-global-icon> |
151 | <ng-container i18n>Add another caption</ng-container> | 152 | <ng-container i18n>Add another caption</ng-container> |
152 | </a> | 153 | </a> |
153 | </div> | 154 | </div> |
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 b039d7ad4..bb775cb0a 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 | |||
@@ -5,6 +5,11 @@ | |||
5 | @include peertube-select-container(auto); | 5 | @include peertube-select-container(auto); |
6 | } | 6 | } |
7 | 7 | ||
8 | my-peertube-checkbox { | ||
9 | display: block; | ||
10 | margin-bottom: 1rem; | ||
11 | } | ||
12 | |||
8 | .video-edit { | 13 | .video-edit { |
9 | height: 100%; | 14 | height: 100%; |
10 | min-height: 300px; | 15 | min-height: 300px; |
@@ -18,10 +23,6 @@ | |||
18 | display: block; | 23 | display: block; |
19 | } | 24 | } |
20 | 25 | ||
21 | input, select { | ||
22 | font-size: 15px | ||
23 | } | ||
24 | |||
25 | .label-tags + span { | 26 | .label-tags + span { |
26 | font-size: 15px; | 27 | font-size: 15px; |
27 | } | 28 | } |
@@ -37,7 +38,7 @@ | |||
37 | text-align: right; | 38 | text-align: right; |
38 | 39 | ||
39 | .create-caption { | 40 | .create-caption { |
40 | @include create-button('../../../../assets/images/global/add.svg'); | 41 | @include create-button; |
41 | } | 42 | } |
42 | } | 43 | } |
43 | 44 | ||
@@ -95,13 +96,14 @@ | |||
95 | display: inline-block; | 96 | display: inline-block; |
96 | margin-right: 25px; | 97 | margin-right: 25px; |
97 | 98 | ||
98 | color: #585858; | 99 | color: $grey-foreground-color; |
99 | font-size: 15px; | 100 | font-size: 15px; |
100 | } | 101 | } |
101 | 102 | ||
102 | .submit-button { | 103 | .submit-button { |
103 | @include peertube-button; | 104 | @include peertube-button; |
104 | @include orange-button; | 105 | @include orange-button; |
106 | @include button-with-icon(20px, 1px); | ||
105 | 107 | ||
106 | display: inline-block; | 108 | display: inline-block; |
107 | 109 | ||
@@ -114,16 +116,6 @@ | |||
114 | color: inherit; | 116 | color: inherit; |
115 | font-weight: $font-semibold; | 117 | font-weight: $font-semibold; |
116 | } | 118 | } |
117 | |||
118 | .icon.icon-validate { | ||
119 | @include icon(20px); | ||
120 | |||
121 | cursor: inherit; | ||
122 | position: relative; | ||
123 | top: -1px; | ||
124 | margin-right: 4px; | ||
125 | background-image: url('../../../../assets/images/global/validate.svg'); | ||
126 | } | ||
127 | } | 119 | } |
128 | } | 120 | } |
129 | 121 | ||
@@ -171,10 +163,10 @@ p-calendar { | |||
171 | } | 163 | } |
172 | 164 | ||
173 | tag { | 165 | tag { |
174 | background-color: var(--inputColor) !important; | 166 | background-color: $grey-background-color !important; |
167 | color: #000 !important; | ||
175 | border-radius: 3px !important; | 168 | border-radius: 3px !important; |
176 | font-size: 15px !important; | 169 | font-size: 15px !important; |
177 | color: var(--mainForegroundColor) !important; | ||
178 | height: 30px !important; | 170 | height: 30px !important; |
179 | line-height: 30px !important; | 171 | line-height: 30px !important; |
180 | margin: 0 5px 0 0 !important; | 172 | margin: 0 5px 0 0 !important; |
@@ -197,7 +189,10 @@ p-calendar { | |||
197 | top: -1px; | 189 | top: -1px; |
198 | height: auto !important; | 190 | height: auto !important; |
199 | vertical-align: middle !important; | 191 | vertical-align: middle !important; |
200 | fill: #585858 !important; | 192 | |
193 | path { | ||
194 | fill: $grey-foreground-color !important; | ||
195 | } | ||
201 | } | 196 | } |
202 | 197 | ||
203 | &:hover { | 198 | &:hover { |
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts index 1dae931e2..3ed7a4a10 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core' | |||
2 | import { FormArray, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms' | 2 | import { FormArray, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { FormReactiveValidationMessages, VideoValidatorsService } from '@app/shared' | 4 | import { FormReactiveValidationMessages, VideoValidatorsService } from '@app/shared' |
5 | import { NotificationsService } from 'angular2-notifications' | 5 | import { Notifier } from '@app/core' |
6 | import { ServerService } from '../../../core/server' | 6 | import { ServerService } from '../../../core/server' |
7 | import { VideoEdit } from '../../../shared/video/video-edit.model' | 7 | import { VideoEdit } from '../../../shared/video/video-edit.model' |
8 | import { map } from 'rxjs/operators' | 8 | import { map } from 'rxjs/operators' |
@@ -27,6 +27,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
27 | @Input() userVideoChannels: { id: number, label: string, support: string }[] = [] | 27 | @Input() userVideoChannels: { id: number, label: string, support: string }[] = [] |
28 | @Input() schedulePublicationPossible = true | 28 | @Input() schedulePublicationPossible = true |
29 | @Input() videoCaptions: VideoCaptionEdit[] = [] | 29 | @Input() videoCaptions: VideoCaptionEdit[] = [] |
30 | @Input() waitTranscodingEnabled = true | ||
30 | 31 | ||
31 | @ViewChild('videoCaptionAddModal') videoCaptionAddModal: VideoCaptionAddModalComponent | 32 | @ViewChild('videoCaptionAddModal') videoCaptionAddModal: VideoCaptionAddModalComponent |
32 | 33 | ||
@@ -48,7 +49,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
48 | calendarTimezone: string | 49 | calendarTimezone: string |
49 | calendarDateFormat: string | 50 | calendarDateFormat: string |
50 | 51 | ||
51 | private schedulerInterval | 52 | private schedulerInterval: any |
52 | private firstPatchDone = false | 53 | private firstPatchDone = false |
53 | private initialVideoCaptions: string[] = [] | 54 | private initialVideoCaptions: string[] = [] |
54 | 55 | ||
@@ -58,7 +59,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
58 | private videoCaptionService: VideoCaptionService, | 59 | private videoCaptionService: VideoCaptionService, |
59 | private route: ActivatedRoute, | 60 | private route: ActivatedRoute, |
60 | private router: Router, | 61 | private router: Router, |
61 | private notificationsService: NotificationsService, | 62 | private notifier: Notifier, |
62 | private serverService: ServerService, | 63 | private serverService: ServerService, |
63 | private i18nPrimengCalendarService: I18nPrimengCalendarService | 64 | private i18nPrimengCalendarService: I18nPrimengCalendarService |
64 | ) { | 65 | ) { |
@@ -77,14 +78,14 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
77 | } | 78 | } |
78 | 79 | ||
79 | updateForm () { | 80 | updateForm () { |
80 | const defaultValues = { | 81 | const defaultValues: any = { |
81 | nsfw: 'false', | 82 | nsfw: 'false', |
82 | commentsEnabled: 'true', | 83 | commentsEnabled: 'true', |
83 | downloadEnabled: 'true', | 84 | downloadEnabled: 'true', |
84 | waitTranscoding: 'true', | 85 | waitTranscoding: 'true', |
85 | tags: [] | 86 | tags: [] |
86 | } | 87 | } |
87 | const obj = { | 88 | const obj: any = { |
88 | name: this.videoValidatorsService.VIDEO_NAME, | 89 | name: this.videoValidatorsService.VIDEO_NAME, |
89 | privacy: this.videoValidatorsService.VIDEO_PRIVACY, | 90 | privacy: this.videoValidatorsService.VIDEO_PRIVACY, |
90 | channelId: this.videoValidatorsService.VIDEO_CHANNEL, | 91 | channelId: this.videoValidatorsService.VIDEO_CHANNEL, |