diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-03 11:10:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-06 11:19:16 +0200 |
commit | 5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e (patch) | |
tree | dd992ea798c620b8bdb5bf5fd9b8f1b97d4410f2 /client/src/app/videos/+video-edit/video-add.component.ts | |
parent | 7e5f9f001d5de22c54748f935edc0c069028bb0e (diff) | |
download | PeerTube-5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e.tar.gz PeerTube-5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e.tar.zst PeerTube-5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e.zip |
Add import http enabled configuration
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 | } |