diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-18 15:31:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-18 15:40:59 +0100 |
commit | ba430d7516bc5b1324b60571ba7594460969b7fb (patch) | |
tree | df5c6952c82f49a94c0a884bbc97d4a0cbd9f867 /client/src/app/+my-account/my-account-video-channels | |
parent | 5dfb7c1dec8222b0bbccac5b56ad46da1438747e (diff) | |
download | PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.gz PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.zst PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.zip |
Lazy load static objects
Diffstat (limited to 'client/src/app/+my-account/my-account-video-channels')
-rw-r--r-- | client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts index 081e956d2..9c948b367 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts | |||
@@ -9,6 +9,7 @@ import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | |||
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | 9 | import { I18n } from '@ngx-translate/i18n-polyfill' |
10 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 10 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
11 | import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' | 11 | import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' |
12 | import { ServerConfig } from '@shared/models' | ||
12 | 13 | ||
13 | @Component({ | 14 | @Component({ |
14 | selector: 'my-account-video-channel-update', | 15 | selector: 'my-account-video-channel-update', |
@@ -21,6 +22,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
21 | 22 | ||
22 | private paramsSub: Subscription | 23 | private paramsSub: Subscription |
23 | private oldSupportField: string | 24 | private oldSupportField: string |
25 | private serverConfig: ServerConfig | ||
24 | 26 | ||
25 | constructor ( | 27 | constructor ( |
26 | protected formValidatorService: FormValidatorService, | 28 | protected formValidatorService: FormValidatorService, |
@@ -37,6 +39,10 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
37 | } | 39 | } |
38 | 40 | ||
39 | ngOnInit () { | 41 | ngOnInit () { |
42 | this.serverConfig = this.serverService.getTmpConfig() | ||
43 | this.serverService.getConfig() | ||
44 | .subscribe(config => this.serverConfig = config) | ||
45 | |||
40 | this.buildForm({ | 46 | this.buildForm({ |
41 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, | 47 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, |
42 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, | 48 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, |
@@ -109,11 +115,11 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
109 | } | 115 | } |
110 | 116 | ||
111 | get maxAvatarSize () { | 117 | get maxAvatarSize () { |
112 | return this.serverService.getConfig().avatar.file.size.max | 118 | return this.serverConfig.avatar.file.size.max |
113 | } | 119 | } |
114 | 120 | ||
115 | get avatarExtensions () { | 121 | get avatarExtensions () { |
116 | return this.serverService.getConfig().avatar.file.extensions.join(',') | 122 | return this.serverConfig.avatar.file.extensions.join(',') |
117 | } | 123 | } |
118 | 124 | ||
119 | isCreation () { | 125 | isCreation () { |