]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add-components/video-send.ts
Add ability to set a public to private in client
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add-components / video-send.ts
index efd182269b96e28a9c8052d35f242fd1e9fafb79..580c123a029a59cc10a857545a441b9c60cdc28c 100644 (file)
@@ -1,37 +1,36 @@
 import { EventEmitter, OnInit } from '@angular/core'
 import { LoadingBarService } from '@ngx-loading-bar/core'
-import { NotificationsService } from 'angular2-notifications'
+import { AuthService, Notifier, ServerService } from '@app/core'
 import { catchError, switchMap, tap } from 'rxjs/operators'
 import { FormReactive } from '@app/shared'
-import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service'
 import { VideoConstant, VideoPrivacy } from '../../../../../../shared'
-import { AuthService, ServerService } from '@app/core'
 import { VideoService } from '@app/shared/video/video.service'
 import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
 import { VideoCaptionService } from '@app/shared/video-caption'
 import { VideoEdit } from '@app/shared/video/video-edit.model'
 import { populateAsyncUserVideoChannels } from '@app/shared/misc/utils'
+import { CanComponentDeactivateResult } from '@app/shared/guards/can-deactivate-guard.service'
 
-export abstract class VideoSend extends FormReactive implements OnInit, CanComponentDeactivate {
-
+export abstract class VideoSend extends FormReactive implements OnInit {
   userVideoChannels: { id: number, label: string, support: string }[] = []
-  videoPrivacies: VideoConstant<string>[] = []
+  videoPrivacies: VideoConstant<VideoPrivacy>[] = []
   videoCaptions: VideoCaptionEdit[] = []
 
   firstStepPrivacyId = 0
   firstStepChannelId = 0
 
   abstract firstStepDone: EventEmitter<string>
+  abstract firstStepError: EventEmitter<void>
   protected abstract readonly DEFAULT_VIDEO_PRIVACY: VideoPrivacy
 
   protected loadingBar: LoadingBarService
-  protected notificationsService: NotificationsService
+  protected notifier: Notifier
   protected authService: AuthService
   protected serverService: ServerService
   protected videoService: VideoService
   protected videoCaptionService: VideoCaptionService
 
-  abstract canDeactivate ()
+  abstract canDeactivate (): CanComponentDeactivateResult
 
   ngOnInit () {
     this.buildForm({})