diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index 52ba4215a..3f96ef6de 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts | |||
@@ -12,6 +12,7 @@ import { ClientHook, ClientHookName, clientHookObject } from '@shared/models/plu | |||
12 | import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type' | 12 | import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type' |
13 | import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' | 13 | import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' |
14 | import { HttpClient } from '@angular/common/http' | 14 | import { HttpClient } from '@angular/common/http' |
15 | import { AuthService } from '@app/core' | ||
15 | import { RestExtractor } from '@app/shared/rest' | 16 | import { RestExtractor } from '@app/shared/rest' |
16 | import { PluginType } from '@shared/models/plugins/plugin.type' | 17 | import { PluginType } from '@shared/models/plugins/plugin.type' |
17 | import { PublicServerSetting } from '@shared/models/plugins/public-server.setting' | 18 | import { PublicServerSetting } from '@shared/models/plugins/public-server.setting' |
@@ -58,6 +59,7 @@ export class PluginService implements ClientHook { | |||
58 | 59 | ||
59 | constructor ( | 60 | constructor ( |
60 | private router: Router, | 61 | private router: Router, |
62 | private authService: AuthService, | ||
61 | private server: ServerService, | 63 | private server: ServerService, |
62 | private zone: NgZone, | 64 | private zone: NgZone, |
63 | private authHttp: HttpClient, | 65 | private authHttp: HttpClient, |
@@ -266,6 +268,10 @@ export class PluginService implements ClientHook { | |||
266 | .toPromise() | 268 | .toPromise() |
267 | }, | 269 | }, |
268 | 270 | ||
271 | isLoggedIn: () => { | ||
272 | return this.authService.isLoggedIn() | ||
273 | }, | ||
274 | |||
269 | translate: (value: string) => { | 275 | translate: (value: string) => { |
270 | return this.translationsObservable | 276 | return this.translationsObservable |
271 | .pipe(map(allTranslations => allTranslations[npmName])) | 277 | .pipe(map(allTranslations => allTranslations[npmName])) |