From d00dc28dd73ad9dd419d5a5ac6ac747cefbc6e8b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Jul 2019 18:30:27 +0200 Subject: WIP plugins: list installed plugins in client --- client/src/app/core/plugins/plugin.service.ts | 2 +- client/src/app/core/theme/theme.service.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'client/src/app/core') 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' import { ClientScript } from '@shared/models/plugins/plugin-package-json.model' import { PluginScope } from '@shared/models/plugins/plugin-scope.type' import { environment } from '../../../environments/environment' -import { RegisterHookOptions } from '@shared/models/plugins/register.model' +import { RegisterHookOptions } from '@shared/models/plugins/register-hook.model' import { ReplaySubject } from 'rxjs' import { first, shareReplay } from 'rxjs/operators' 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 { console.log('Enabling %s theme.', currentTheme) this.loadTheme(currentTheme) + const theme = this.getTheme(currentTheme) if (theme) { console.log('Adding scripts of theme %s.', currentTheme) @@ -95,6 +96,10 @@ export class ThemeService { } private listenUserTheme () { + if (!this.auth.isLoggedIn()) { + this.updateCurrentTheme() + } + this.auth.userInformationLoaded .subscribe(() => this.updateCurrentTheme()) } -- cgit v1.2.3