diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-09 11:45:19 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 7cd4d2ba10106c10602c86f74f55743ded588896 (patch) | |
tree | 81f0dd7a7ef763511158d1035f3e09e09d5dcd2c /client/src/app/+admin/config | |
parent | 8d76959e11ab7172040853fa4fadaf8d53e6aa12 (diff) | |
download | PeerTube-7cd4d2ba10106c10602c86f74f55743ded588896.tar.gz PeerTube-7cd4d2ba10106c10602c86f74f55743ded588896.tar.zst PeerTube-7cd4d2ba10106c10602c86f74f55743ded588896.zip |
WIP plugins: add theme support
Diffstat (limited to 'client/src/app/+admin/config')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html | 17 | ||||
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index d5b625d9c..fe9d856d0 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html | |||
@@ -85,6 +85,23 @@ | |||
85 | </ng-container> | 85 | </ng-container> |
86 | 86 | ||
87 | 87 | ||
88 | <div i18n class="inner-form-title">Theme</div> | ||
89 | |||
90 | <ng-container formGroupName="theme"> | ||
91 | <div class="form-group"> | ||
92 | <label i18n for="themeDefault">Global theme</label> | ||
93 | |||
94 | <div class="peertube-select-container"> | ||
95 | <select formControlName="default" id="themeDefault"> | ||
96 | <option i18n value="default">default</option> | ||
97 | |||
98 | <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> | ||
99 | </select> | ||
100 | </div> | ||
101 | </div> | ||
102 | </ng-container> | ||
103 | |||
104 | |||
88 | <div i18n class="inner-form-title">Signup</div> | 105 | <div i18n class="inner-form-title">Signup</div> |
89 | 106 | ||
90 | <ng-container formGroupName="signup"> | 107 | <ng-container formGroupName="signup"> |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 055bae851..19a408425 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | |||
@@ -73,6 +73,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
73 | return this.configService.videoQuotaDailyOptions | 73 | return this.configService.videoQuotaDailyOptions |
74 | } | 74 | } |
75 | 75 | ||
76 | get availableThemes () { | ||
77 | return this.serverService.getConfig().theme.registered | ||
78 | } | ||
79 | |||
76 | getResolutionKey (resolution: string) { | 80 | getResolutionKey (resolution: string) { |
77 | return 'transcoding.resolutions.' + resolution | 81 | return 'transcoding.resolutions.' + resolution |
78 | } | 82 | } |
@@ -92,6 +96,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
92 | css: null | 96 | css: null |
93 | } | 97 | } |
94 | }, | 98 | }, |
99 | theme: { | ||
100 | default: null | ||
101 | }, | ||
95 | services: { | 102 | services: { |
96 | twitter: { | 103 | twitter: { |
97 | username: this.customConfigValidatorsService.SERVICES_TWITTER_USERNAME, | 104 | username: this.customConfigValidatorsService.SERVICES_TWITTER_USERNAME, |