]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add.component.ts
Add tests regarding video import
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add.component.ts
index 64071b40c37753dc4f0dc9f3c4bf5dba418d5c3f..d38a53db90a89150ddabdfb967b93ffae960b1c1 100644 (file)
@@ -2,6 +2,7 @@ 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 { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component'
+import { ServerService } from '@app/core'
 
 @Component({
   selector: 'my-videos-add',
@@ -15,6 +16,10 @@ export class VideoAddComponent implements CanComponentDeactivate {
   secondStepType: 'upload' | 'import'
   videoName: string
 
+  constructor (
+    private serverService: ServerService
+  ) {}
+
   onFirstStepDone (type: 'upload' | 'import', videoName: string) {
     this.secondStepType = type
     this.videoName = videoName
@@ -26,4 +31,8 @@ export class VideoAddComponent implements CanComponentDeactivate {
 
     return { canDeactivate: true }
   }
+
+  isVideoImportEnabled () {
+    return this.serverService.getConfig().import.video.http.enabled
+  }
 }