videoQuota: -1
}
}
- private videoCategories: Array<VideoConstant<number>> = []
- private videoLicences: Array<VideoConstant<number>> = []
+ private videoCategories: Array<VideoConstant<string>> = []
+ private videoLicences: Array<VideoConstant<string>> = []
private videoLanguages: Array<VideoConstant<string>> = []
- private videoPrivacies: Array<VideoConstant<VideoPrivacy>> = []
+ private videoPrivacies: Array<VideoConstant<string>> = []
constructor (
private http: HttpClient,
private loadVideoAttributeEnum (
attributeName: 'categories' | 'licences' | 'languages' | 'privacies',
- hashToPopulate: VideoConstant<number | string>[],
+ hashToPopulate: VideoConstant<string>[],
notifier: ReplaySubject<boolean>,
sort = false
) {
import { VideoCaptionAddModalComponent } from '@app/videos/+video-edit/shared/video-caption-add-modal.component'
import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
import { removeElementFromArray } from '@app/shared/misc/utils'
+import { VideoConstant } from '../../../../../../shared'
@Component({
selector: 'my-video-edit',
styleUrls: [ './video-edit.component.scss' ],
templateUrl: './video-edit.component.html'
})
-
export class VideoEditComponent implements OnInit, OnDestroy {
@Input() form: FormGroup
@Input() formErrors: { [ id: string ]: string } = {}
@Input() validationMessages: FormReactiveValidationMessages = {}
- @Input() videoPrivacies = []
+ @Input() videoPrivacies: { id: number, label: string }[] = []
@Input() userVideoChannels: { id: number, label: string, support: string }[] = []
@Input() schedulePublicationPossible = true
@Input() videoCaptions: VideoCaptionEdit[] = []
// So that it can be accessed in the template
readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY
- videoCategories = []
- videoLicences = []
- videoLanguages = []
+ videoCategories: VideoConstant<string>[] = []
+ videoLicences: VideoConstant<string>[] = []
+ videoLanguages: VideoConstant<string>[] = []
tagValidators: ValidatorFn[]
tagValidatorsMessages: { [ name: string ]: string }
import { NotificationsService } from 'angular2-notifications'
import { BytesPipe } from 'ngx-pipes'
import { Subscription } from 'rxjs'
-import { VideoPrivacy } from '../../../../../shared/models/videos'
+import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
import { AuthService, ServerService } from '../../core'
import { FormReactive } from '../../shared'
import { populateAsyncUserVideoChannels } from '../../shared/misc/utils'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
import { switchMap } from 'rxjs/operators'
import { VideoCaptionService } from '@app/shared/video-caption'
+import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
@Component({
selector: 'my-videos-add',
userVideoChannels: { id: number, label: string, support: string }[] = []
userVideoQuotaUsed = 0
- videoPrivacies = []
+ videoPrivacies: VideoConstant<string>[] = []
firstStepPrivacyId = 0
firstStepChannelId = 0
- videoCaptions = []
+ videoCaptions: VideoCaptionEdit[] = []
constructor (
protected formValidatorService: FormValidatorService,
import { ActivatedRoute, Router } from '@angular/router'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { NotificationsService } from 'angular2-notifications'
-import { VideoPrivacy } from '../../../../../shared/models/videos'
+import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
import { ServerService } from '../../core'
import { AuthService } from '../../core/auth'
import { FormReactive } from '../../shared'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
import { VideoCaptionService } from '@app/shared/video-caption'
+import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
@Component({
selector: 'my-videos-update',
video: VideoEdit
isUpdatingVideo = false
- videoPrivacies = []
- userVideoChannels = []
+ videoPrivacies: VideoConstant<string>[] = []
+ userVideoChannels: { id: number, label: string, support: string }[] = []
schedulePublicationPossible = false
- videoCaptions = []
+ videoCaptions: VideoCaptionEdit[] = []
constructor (
protected formValidatorService: FormValidatorService,