aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-add-components/video-send.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-18 15:31:54 +0100
committerChocobozzz <me@florianbigard.com>2019-12-18 15:40:59 +0100
commitba430d7516bc5b1324b60571ba7594460969b7fb (patch)
treedf5c6952c82f49a94c0a884bbc97d4a0cbd9f867 /client/src/app/videos/+video-edit/video-add-components/video-send.ts
parent5dfb7c1dec8222b0bbccac5b56ad46da1438747e (diff)
downloadPeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.gz
PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.zst
PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.zip
Lazy load static objects
Diffstat (limited to 'client/src/app/videos/+video-edit/video-add-components/video-send.ts')
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-send.ts13
1 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-send.ts b/client/src/app/videos/+video-edit/video-add-components/video-send.ts
index 580c123a0..b32f16950 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-send.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-send.ts
@@ -3,7 +3,7 @@ import { LoadingBarService } from '@ngx-loading-bar/core'
3import { AuthService, Notifier, ServerService } from '@app/core' 3import { AuthService, Notifier, ServerService } from '@app/core'
4import { catchError, switchMap, tap } from 'rxjs/operators' 4import { catchError, switchMap, tap } from 'rxjs/operators'
5import { FormReactive } from '@app/shared' 5import { FormReactive } from '@app/shared'
6import { VideoConstant, VideoPrivacy } from '../../../../../../shared' 6import { ServerConfig, VideoConstant, VideoPrivacy } from '../../../../../../shared'
7import { VideoService } from '@app/shared/video/video.service' 7import { VideoService } from '@app/shared/video/video.service'
8import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' 8import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
9import { VideoCaptionService } from '@app/shared/video-caption' 9import { VideoCaptionService } from '@app/shared/video-caption'
@@ -29,6 +29,7 @@ export abstract class VideoSend extends FormReactive implements OnInit {
29 protected serverService: ServerService 29 protected serverService: ServerService
30 protected videoService: VideoService 30 protected videoService: VideoService
31 protected videoCaptionService: VideoCaptionService 31 protected videoCaptionService: VideoCaptionService
32 protected serverConfig: ServerConfig
32 33
33 abstract canDeactivate (): CanComponentDeactivateResult 34 abstract canDeactivate (): CanComponentDeactivateResult
34 35
@@ -38,10 +39,14 @@ export abstract class VideoSend extends FormReactive implements OnInit {
38 populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) 39 populateAsyncUserVideoChannels(this.authService, this.userVideoChannels)
39 .then(() => this.firstStepChannelId = this.userVideoChannels[ 0 ].id) 40 .then(() => this.firstStepChannelId = this.userVideoChannels[ 0 ].id)
40 41
41 this.serverService.videoPrivaciesLoaded 42 this.serverConfig = this.serverService.getTmpConfig()
43 this.serverService.getConfig()
44 .subscribe(config => this.serverConfig = config)
45
46 this.serverService.getVideoPrivacies()
42 .subscribe( 47 .subscribe(
43 () => { 48 privacies => {
44 this.videoPrivacies = this.serverService.getVideoPrivacies() 49 this.videoPrivacies = privacies
45 50
46 this.firstStepPrivacyId = this.DEFAULT_VIDEO_PRIVACY 51 this.firstStepPrivacyId = this.DEFAULT_VIDEO_PRIVACY
47 }) 52 })