aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/plugins/plugin.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/plugins/plugin.service.ts')
-rw-r--r--client/src/app/core/plugins/plugin.service.ts6
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
12import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type' 12import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type'
13import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' 13import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
14import { HttpClient } from '@angular/common/http' 14import { HttpClient } from '@angular/common/http'
15import { AuthService } from '@app/core'
15import { RestExtractor } from '@app/shared/rest' 16import { RestExtractor } from '@app/shared/rest'
16import { PluginType } from '@shared/models/plugins/plugin.type' 17import { PluginType } from '@shared/models/plugins/plugin.type'
17import { PublicServerSetting } from '@shared/models/plugins/public-server.setting' 18import { 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]))