aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-user-settings
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-user-settings')
-rw-r--r--client/src/app/shared/shared-user-settings/user-interface-settings.component.ts8
-rw-r--r--client/src/app/shared/shared-user-settings/user-video-settings.component.ts6
2 files changed, 6 insertions, 8 deletions
diff --git a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
index 80b88c129..b721604e5 100644
--- a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
@@ -2,7 +2,7 @@ import { Subject, Subscription } from 'rxjs'
2import { Component, Input, OnDestroy, OnInit } from '@angular/core' 2import { Component, Input, OnDestroy, OnInit } from '@angular/core'
3import { AuthService, Notifier, ServerService, UserService } from '@app/core' 3import { AuthService, Notifier, ServerService, UserService } from '@app/core'
4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5import { ServerConfig, User, UserUpdateMe } from '@shared/models' 5import { HTMLServerConfig, User, UserUpdateMe } from '@shared/models'
6 6
7@Component({ 7@Component({
8 selector: 'my-user-interface-settings', 8 selector: 'my-user-interface-settings',
@@ -17,7 +17,7 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
17 17
18 formValuesWatcher: Subscription 18 formValuesWatcher: Subscription
19 19
20 private serverConfig: ServerConfig 20 private serverConfig: HTMLServerConfig
21 21
22 constructor ( 22 constructor (
23 protected formValidatorService: FormValidatorService, 23 protected formValidatorService: FormValidatorService,
@@ -35,9 +35,7 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
35 } 35 }
36 36
37 ngOnInit () { 37 ngOnInit () {
38 this.serverConfig = this.serverService.getTmpConfig() 38 this.serverConfig = this.serverService.getHTMLConfig()
39 this.serverService.getConfig()
40 .subscribe(config => this.serverConfig = config)
41 39
42 this.buildForm({ 40 this.buildForm({
43 theme: null 41 theme: null
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
index ae95030c7..8b0eaea4f 100644
--- a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
@@ -48,9 +48,8 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
48 48
49 forkJoin([ 49 forkJoin([
50 this.serverService.getVideoLanguages(), 50 this.serverService.getVideoLanguages(),
51 this.serverService.getConfig(),
52 this.userInformationLoaded.pipe(first()) 51 this.userInformationLoaded.pipe(first())
53 ]).subscribe(([ languages, config ]) => { 52 ]).subscribe(([ languages ]) => {
54 const group = this.allLanguagesGroup 53 const group = this.allLanguagesGroup
55 54
56 this.languageItems = [ { label: $localize`Unknown language`, id: '_unknown', group } ] 55 this.languageItems = [ { label: $localize`Unknown language`, id: '_unknown', group } ]
@@ -61,7 +60,8 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
61 ? this.user.videoLanguages.map(l => ({ id: l })) 60 ? this.user.videoLanguages.map(l => ({ id: l }))
62 : [ { group } ] 61 : [ { group } ]
63 62
64 this.defaultNSFWPolicy = config.instance.defaultNSFWPolicy 63 const serverConfig = this.serverService.getHTMLConfig()
64 this.defaultNSFWPolicy = serverConfig.instance.defaultNSFWPolicy
65 65
66 this.form.patchValue({ 66 this.form.patchValue({
67 nsfwPolicy: this.user.nsfwPolicy || this.defaultNSFWPolicy, 67 nsfwPolicy: this.user.nsfwPolicy || this.defaultNSFWPolicy,