aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-user-settings/user-interface-settings.component.ts')
-rw-r--r--client/src/app/shared/shared-user-settings/user-interface-settings.component.ts8
1 files changed, 4 insertions, 4 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 24ad54b1d..13e2e5424 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
@@ -3,6 +3,7 @@ import { Component, Input, OnDestroy, OnInit } from '@angular/core'
3import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core' 3import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core'
4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5import { HTMLServerConfig, User, UserUpdateMe } from '@shared/models' 5import { HTMLServerConfig, User, UserUpdateMe } from '@shared/models'
6import { SelectOptionsItem } from 'src/types'
6 7
7@Component({ 8@Component({
8 selector: 'my-user-interface-settings', 9 selector: 'my-user-interface-settings',
@@ -15,6 +16,7 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
15 @Input() notifyOnUpdate = true 16 @Input() notifyOnUpdate = true
16 @Input() userInformationLoaded: Subject<any> 17 @Input() userInformationLoaded: Subject<any>
17 18
19 availableThemes: SelectOptionsItem[]
18 formValuesWatcher: Subscription 20 formValuesWatcher: Subscription
19 21
20 private serverConfig: HTMLServerConfig 22 private serverConfig: HTMLServerConfig
@@ -37,6 +39,8 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
37 ngOnInit () { 39 ngOnInit () {
38 this.serverConfig = this.serverService.getHTMLConfig() 40 this.serverConfig = this.serverService.getHTMLConfig()
39 41
42 this.availableThemes = this.themeService.buildAvailableThemes()
43
40 this.buildForm({ 44 this.buildForm({
41 theme: null 45 theme: null
42 }) 46 })
@@ -61,10 +65,6 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
61 return this.themeService.getDefaultThemeLabel() 65 return this.themeService.getDefaultThemeLabel()
62 } 66 }
63 67
64 getAvailableThemes () {
65 return this.themeService.getAvailableThemeLabels()
66 }
67
68 getDefaultInstanceThemeLabel () { 68 getDefaultInstanceThemeLabel () {
69 const theme = this.serverConfig.theme.default 69 const theme = this.serverConfig.theme.default
70 70