From 5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Aug 2018 11:10:31 +0200 Subject: Add import http enabled configuration --- client/src/app/videos/+video-edit/video-add.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'client/src/app/videos/+video-edit/video-add.component.ts') 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 + } } -- cgit v1.2.3