aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-27 09:59:10 +0200
committerChocobozzz <me@florianbigard.com>2022-06-27 09:59:10 +0200
commit00fe5d61369b1769c62686e5bd8e6e666f867598 (patch)
tree1130aa8a764b9e2276344243290d93e84ff75baa /client/src/app/+admin/config
parentb713976afbe47d06941222ad462bc68b3decd723 (diff)
downloadPeerTube-00fe5d61369b1769c62686e5bd8e6e666f867598.tar.gz
PeerTube-00fe5d61369b1769c62686e5bd8e6e666f867598.tar.zst
PeerTube-00fe5d61369b1769c62686e5bd8e6e666f867598.zip
Fix setting theme in client
Diffstat (limited to 'client/src/app/+admin/config')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html2
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts7
2 files changed, 4 insertions, 5 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
index 315cd1749..7dfe5f5f9 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
@@ -17,7 +17,7 @@
17 <select formControlName="default" id="themeDefault" class="form-control"> 17 <select formControlName="default" id="themeDefault" class="form-control">
18 <option i18n value="default">{{ getDefaultThemeLabel() }}</option> 18 <option i18n value="default">{{ getDefaultThemeLabel() }}</option>
19 19
20 <option *ngFor="let theme of getAvailableThemes()" [value]="theme">{{ theme }}</option> 20 <option *ngFor="let theme of availableThemes" [value]="theme.id">{{ theme.label }}</option>
21 </select> 21 </select>
22 </div> 22 </div>
23 </div> 23 </div>
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 f8f257671..56227d11c 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
@@ -19,6 +19,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges {
19 19
20 signupAlertMessage: string 20 signupAlertMessage: string
21 defaultLandingPageOptions: SelectOptionsItem[] = [] 21 defaultLandingPageOptions: SelectOptionsItem[] = []
22 availableThemes: SelectOptionsItem[]
22 23
23 constructor ( 24 constructor (
24 private configService: ConfigService, 25 private configService: ConfigService,
@@ -29,6 +30,8 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges {
29 ngOnInit () { 30 ngOnInit () {
30 this.buildLandingPageOptions() 31 this.buildLandingPageOptions()
31 this.checkSignupField() 32 this.checkSignupField()
33
34 this.availableThemes = this.themeService.buildAvailableThemes()
32 } 35 }
33 36
34 ngOnChanges (changes: SimpleChanges) { 37 ngOnChanges (changes: SimpleChanges) {
@@ -49,10 +52,6 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges {
49 return this.configService.videoQuotaDailyOptions 52 return this.configService.videoQuotaDailyOptions
50 } 53 }
51 54
52 getAvailableThemes () {
53 return this.themeService.getAvailableThemeLabels()
54 }
55
56 doesTrendingVideosAlgorithmsEnabledInclude (algorithm: string) { 55 doesTrendingVideosAlgorithmsEnabledInclude (algorithm: string) {
57 const enabled = this.form.value['trending']['videos']['algorithms']['enabled'] 56 const enabled = this.form.value['trending']['videos']['algorithms']['enabled']
58 if (!Array.isArray(enabled)) return false 57 if (!Array.isArray(enabled)) return false