diff options
Diffstat (limited to 'client/src/app/videos/+video-edit/video-add.component.ts')
-rw-r--r-- | client/src/app/videos/+video-edit/video-add.component.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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' | |||
2 | import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' | 2 | import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' |
3 | import { VideoImportComponent } from '@app/videos/+video-edit/video-import.component' | 3 | import { VideoImportComponent } from '@app/videos/+video-edit/video-import.component' |
4 | import { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component' | 4 | import { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component' |
5 | import { ServerService } from '@app/core' | ||
5 | 6 | ||
6 | @Component({ | 7 | @Component({ |
7 | selector: 'my-videos-add', | 8 | selector: 'my-videos-add', |
@@ -15,6 +16,10 @@ export class VideoAddComponent implements CanComponentDeactivate { | |||
15 | secondStepType: 'upload' | 'import' | 16 | secondStepType: 'upload' | 'import' |
16 | videoName: string | 17 | videoName: string |
17 | 18 | ||
19 | constructor ( | ||
20 | private serverService: ServerService | ||
21 | ) {} | ||
22 | |||
18 | onFirstStepDone (type: 'upload' | 'import', videoName: string) { | 23 | onFirstStepDone (type: 'upload' | 'import', videoName: string) { |
19 | this.secondStepType = type | 24 | this.secondStepType = type |
20 | this.videoName = videoName | 25 | this.videoName = videoName |
@@ -26,4 +31,8 @@ export class VideoAddComponent implements CanComponentDeactivate { | |||
26 | 31 | ||
27 | return { canDeactivate: true } | 32 | return { canDeactivate: true } |
28 | } | 33 | } |
34 | |||
35 | isVideoImportEnabled () { | ||
36 | return this.serverService.getConfig().import.video.http.enabled | ||
37 | } | ||
29 | } | 38 | } |