diff options
Diffstat (limited to 'client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts index 81457bd36..f8f257671 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts | |||
@@ -2,7 +2,7 @@ import { pairwise } from 'rxjs/operators' | |||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | 2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' |
3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { MenuService } from '@app/core' | 5 | import { MenuService, ThemeService } from '@app/core' |
6 | import { HTMLServerConfig } from '@shared/models' | 6 | import { HTMLServerConfig } from '@shared/models' |
7 | import { ConfigService } from '../shared/config.service' | 7 | import { ConfigService } from '../shared/config.service' |
8 | 8 | ||
@@ -22,7 +22,8 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { | |||
22 | 22 | ||
23 | constructor ( | 23 | constructor ( |
24 | private configService: ConfigService, | 24 | private configService: ConfigService, |
25 | private menuService: MenuService | 25 | private menuService: MenuService, |
26 | private themeService: ThemeService | ||
26 | ) { } | 27 | ) { } |
27 | 28 | ||
28 | ngOnInit () { | 29 | ngOnInit () { |
@@ -49,8 +50,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { | |||
49 | } | 50 | } |
50 | 51 | ||
51 | getAvailableThemes () { | 52 | getAvailableThemes () { |
52 | return this.serverConfig.theme.registered | 53 | return this.themeService.getAvailableThemeLabels() |
53 | .map(t => t.name) | ||
54 | } | 54 | } |
55 | 55 | ||
56 | doesTrendingVideosAlgorithmsEnabledInclude (algorithm: string) { | 56 | doesTrendingVideosAlgorithmsEnabledInclude (algorithm: string) { |
@@ -94,6 +94,10 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { | |||
94 | })) | 94 | })) |
95 | } | 95 | } |
96 | 96 | ||
97 | getDefaultThemeLabel () { | ||
98 | return this.themeService.getDefaultThemeLabel() | ||
99 | } | ||
100 | |||
97 | private checkSignupField () { | 101 | private checkSignupField () { |
98 | const signupControl = this.form.get('signup.enabled') | 102 | const signupControl = this.form.get('signup.enabled') |
99 | 103 | ||