From 00fe5d61369b1769c62686e5bd8e6e666f867598 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Jun 2022 09:59:10 +0200 Subject: Fix setting theme in client --- .../shared-user-settings/user-interface-settings.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/app/shared/shared-user-settings/user-interface-settings.component.ts') 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' import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core' import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' import { HTMLServerConfig, User, UserUpdateMe } from '@shared/models' +import { SelectOptionsItem } from 'src/types' @Component({ selector: 'my-user-interface-settings', @@ -15,6 +16,7 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn @Input() notifyOnUpdate = true @Input() userInformationLoaded: Subject + availableThemes: SelectOptionsItem[] formValuesWatcher: Subscription private serverConfig: HTMLServerConfig @@ -37,6 +39,8 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn ngOnInit () { this.serverConfig = this.serverService.getHTMLConfig() + this.availableThemes = this.themeService.buildAvailableThemes() + this.buildForm({ theme: null }) @@ -61,10 +65,6 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn return this.themeService.getDefaultThemeLabel() } - getAvailableThemes () { - return this.themeService.getAvailableThemeLabels() - } - getDefaultInstanceThemeLabel () { const theme = this.serverConfig.theme.default -- cgit v1.2.3