X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-edit%2Fvideo-add.component.ts;h=d38a53db90a89150ddabdfb967b93ffae960b1c1;hb=590fb5069038e69898123bb795f789683216d837;hp=64071b40c37753dc4f0dc9f3c4bf5dba418d5c3f;hpb=fbad87b0472f574409f7aa3ae7f8b54927d0cdd6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 64071b40c..d38a53db9 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts @@ -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 + } }