X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-edit%2Fshared%2Fvideo-edit.component.ts;h=83645294846dc97df1ee678a965cdc569a710d2e;hb=b718fd22374d64534bcfe69932cf562894abed6a;hp=a56733e5752bf48631868e16e0a1de2ab3265301;hpb=244b4ae3973bc1511464a08158a123767f83179c;p=oweals%2Fpeertube.git 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 a56733e57..836452948 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' import { FormArray, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms' import { ActivatedRoute, Router } from '@angular/router' import { FormReactiveValidationMessages, VideoValidatorsService } from '@app/shared' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { ServerService } from '../../../core/server' import { VideoEdit } from '../../../shared/video/video-edit.model' import { map } from 'rxjs/operators' @@ -27,6 +27,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { @Input() userVideoChannels: { id: number, label: string, support: string }[] = [] @Input() schedulePublicationPossible = true @Input() videoCaptions: VideoCaptionEdit[] = [] + @Input() waitTranscodingEnabled = true @ViewChild('videoCaptionAddModal') videoCaptionAddModal: VideoCaptionAddModalComponent @@ -44,6 +45,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { calendarLocale: any = {} minScheduledDate = new Date() + myYearRange = '1880:' + (new Date()).getFullYear() calendarTimezone: string calendarDateFormat: string @@ -58,7 +60,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { private videoCaptionService: VideoCaptionService, private route: ActivatedRoute, private router: Router, - private notificationsService: NotificationsService, + private notifier: Notifier, private serverService: ServerService, private i18nPrimengCalendarService: I18nPrimengCalendarService ) { @@ -80,6 +82,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { const defaultValues: any = { nsfw: 'false', commentsEnabled: 'true', + downloadEnabled: 'true', waitTranscoding: 'true', tags: [] } @@ -89,6 +92,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { channelId: this.videoValidatorsService.VIDEO_CHANNEL, nsfw: null, commentsEnabled: null, + downloadEnabled: null, waitTranscoding: null, category: this.videoValidatorsService.VIDEO_CATEGORY, licence: this.videoValidatorsService.VIDEO_LICENCE, @@ -98,7 +102,8 @@ export class VideoEditComponent implements OnInit, OnDestroy { thumbnailfile: null, previewfile: null, support: this.videoValidatorsService.VIDEO_SUPPORT, - schedulePublicationAt: this.videoValidatorsService.VIDEO_SCHEDULE_PUBLICATION_AT + schedulePublicationAt: this.videoValidatorsService.VIDEO_SCHEDULE_PUBLICATION_AT, + originallyPublishedAt: this.videoValidatorsService.VIDEO_ORIGINALLY_PUBLISHED_AT } this.formValidatorService.updateForm(