aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-10 14:06:19 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commitffb321bedca46d6987c7b31dd58e5dea96ea2ea2 (patch)
tree019f0427c1860ae0b00694c43f1be8d5fe1aa995 /client/src/app/+my-account
parent7cd4d2ba10106c10602c86f74f55743ded588896 (diff)
downloadPeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.tar.gz
PeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.tar.zst
PeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.zip
WIP plugins: load theme on client side
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.html5
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.ts5
2 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.html
index f34e77f6a..f034c6bb3 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.html
+++ b/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.html
@@ -4,10 +4,13 @@
4 4
5 <div class="peertube-select-container"> 5 <div class="peertube-select-container">
6 <select formControlName="theme" id="theme"> 6 <select formControlName="theme" id="theme">
7 <option i18n value="default">default</option> 7 <option i18n value="instance-default">instance default</option>
8 <option i18n value="default">peertube default</option>
8 9
9 <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> 10 <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option>
10 </select> 11 </select>
11 </div> 12 </div>
12 </div> 13 </div>
14
15 <input type="submit" i18n-value value="Save" [disabled]="!form.valid">
13</form> 16</form>
diff --git a/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.ts
index f7055072f..5ec1c9f8f 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.ts
@@ -29,6 +29,7 @@ export class MyAccountInterfaceSettingsComponent extends FormReactive implements
29 29
30 get availableThemes () { 30 get availableThemes () {
31 return this.serverService.getConfig().theme.registered 31 return this.serverService.getConfig().theme.registered
32 .map(t => t.name)
32 } 33 }
33 34
34 ngOnInit () { 35 ngOnInit () {
@@ -53,9 +54,9 @@ export class MyAccountInterfaceSettingsComponent extends FormReactive implements
53 54
54 this.userService.updateMyProfile(details).subscribe( 55 this.userService.updateMyProfile(details).subscribe(
55 () => { 56 () => {
56 this.notifier.success(this.i18n('Interface settings updated.')) 57 this.authService.refreshUserInformation()
57 58
58 window.location.reload() 59 this.notifier.success(this.i18n('Interface settings updated.'))
59 }, 60 },
60 61
61 err => this.notifier.error(err.message) 62 err => this.notifier.error(err.message)