aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-16 14:36:51 +0200
committerChocobozzz <me@florianbigard.com>2022-06-16 14:44:14 +0200
commit5e93a6d142b1151d1ebc16123206f87998839108 (patch)
tree71dff17c1a79bb87e753216a83e317ad6efebf47 /client/src/app/+admin
parent3256771725430ab6fc716e937b88ca2b2b85263b (diff)
downloadPeerTube-5e93a6d142b1151d1ebc16123206f87998839108.tar.gz
PeerTube-5e93a6d142b1151d1ebc16123206f87998839108.tar.zst
PeerTube-5e93a6d142b1151d1ebc16123206f87998839108.zip
Improve theme label
Diffstat (limited to 'client/src/app/+admin')
-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.ts12
2 files changed, 9 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 c62ea7700..68126281f 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
@@ -15,7 +15,7 @@
15 15
16 <div class="peertube-select-container"> 16 <div class="peertube-select-container">
17 <select formControlName="default" id="themeDefault" class="form-control"> 17 <select formControlName="default" id="themeDefault" class="form-control">
18 <option i18n value="default">default</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 getAvailableThemes()" [value]="theme">{{ theme }}</option>
21 </select> 21 </select>
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'
2import { SelectOptionsItem } from 'src/types/select-options-item.model' 2import { SelectOptionsItem } from 'src/types/select-options-item.model'
3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' 3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
4import { FormGroup } from '@angular/forms' 4import { FormGroup } from '@angular/forms'
5import { MenuService } from '@app/core' 5import { MenuService, ThemeService } from '@app/core'
6import { HTMLServerConfig } from '@shared/models' 6import { HTMLServerConfig } from '@shared/models'
7import { ConfigService } from '../shared/config.service' 7import { 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