diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-10 18:30:27 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | d00dc28dd73ad9dd419d5a5ac6ac747cefbc6e8b (patch) | |
tree | c94c2b22de6707eaafcc4348f69934f265c52f52 /client/src/app/core | |
parent | ad91e7006e41f8ee5b8dcefee30f99e8ca44133a (diff) | |
download | PeerTube-d00dc28dd73ad9dd419d5a5ac6ac747cefbc6e8b.tar.gz PeerTube-d00dc28dd73ad9dd419d5a5ac6ac747cefbc6e8b.tar.zst PeerTube-d00dc28dd73ad9dd419d5a5ac6ac747cefbc6e8b.zip |
WIP plugins: list installed plugins in client
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 2 | ||||
-rw-r--r-- | client/src/app/core/theme/theme.service.ts | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index 4abe9ee8d..86bde2d02 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts | |||
@@ -5,7 +5,7 @@ import { ServerService } from '@app/core/server/server.service' | |||
5 | import { ClientScript } from '@shared/models/plugins/plugin-package-json.model' | 5 | import { ClientScript } from '@shared/models/plugins/plugin-package-json.model' |
6 | import { PluginScope } from '@shared/models/plugins/plugin-scope.type' | 6 | import { PluginScope } from '@shared/models/plugins/plugin-scope.type' |
7 | import { environment } from '../../../environments/environment' | 7 | import { environment } from '../../../environments/environment' |
8 | import { RegisterHookOptions } from '@shared/models/plugins/register.model' | 8 | import { RegisterHookOptions } from '@shared/models/plugins/register-hook.model' |
9 | import { ReplaySubject } from 'rxjs' | 9 | import { ReplaySubject } from 'rxjs' |
10 | import { first, shareReplay } from 'rxjs/operators' | 10 | import { first, shareReplay } from 'rxjs/operators' |
11 | 11 | ||
diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts index ad59c203b..76199d1cc 100644 --- a/client/src/app/core/theme/theme.service.ts +++ b/client/src/app/core/theme/theme.service.ts | |||
@@ -83,6 +83,7 @@ export class ThemeService { | |||
83 | console.log('Enabling %s theme.', currentTheme) | 83 | console.log('Enabling %s theme.', currentTheme) |
84 | 84 | ||
85 | this.loadTheme(currentTheme) | 85 | this.loadTheme(currentTheme) |
86 | |||
86 | const theme = this.getTheme(currentTheme) | 87 | const theme = this.getTheme(currentTheme) |
87 | if (theme) { | 88 | if (theme) { |
88 | console.log('Adding scripts of theme %s.', currentTheme) | 89 | console.log('Adding scripts of theme %s.', currentTheme) |
@@ -95,6 +96,10 @@ export class ThemeService { | |||
95 | } | 96 | } |
96 | 97 | ||
97 | private listenUserTheme () { | 98 | private listenUserTheme () { |
99 | if (!this.auth.isLoggedIn()) { | ||
100 | this.updateCurrentTheme() | ||
101 | } | ||
102 | |||
98 | this.auth.userInformationLoaded | 103 | this.auth.userInformationLoaded |
99 | .subscribe(() => this.updateCurrentTheme()) | 104 | .subscribe(() => this.updateCurrentTheme()) |
100 | } | 105 | } |