]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add.component.ts
video-import -> video-import-url
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add.component.ts
index 69b364ddd01943683fbd94487d7c01f12463b8ee..377ea5dd217f0a3907df9969d175e5f57bd567bd 100644 (file)
@@ -1,6 +1,6 @@
 import { Component, ViewChild } from '@angular/core'
 import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service'
-import { VideoImportComponent } from '@app/videos/+video-edit/video-import.component'
+import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-import-url.component'
 import { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component'
 import { ServerService } from '@app/core'
 
@@ -11,23 +11,23 @@ import { ServerService } from '@app/core'
 })
 export class VideoAddComponent implements CanComponentDeactivate {
   @ViewChild('videoUpload') videoUpload: VideoUploadComponent
-  @ViewChild('videoImport') videoImport: VideoImportComponent
+  @ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent
 
-  secondStepType: 'upload' | 'import'
+  secondStepType: 'upload' | 'import-url'
   videoName: string
 
   constructor (
     private serverService: ServerService
   ) {}
 
-  onFirstStepDone (type: 'upload' | 'import', videoName: string) {
+  onFirstStepDone (type: 'upload' | 'import-url', videoName: string) {
     this.secondStepType = type
     this.videoName = videoName
   }
 
   canDeactivate () {
     if (this.secondStepType === 'upload') return this.videoUpload.canDeactivate()
-    if (this.secondStepType === 'import') return this.videoImport.canDeactivate()
+    if (this.secondStepType === 'import-url') return this.videoImportUrl.canDeactivate()
 
     return { canDeactivate: true }
   }