import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type'
import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
import { HttpClient } from '@angular/common/http'
+import { AuthService } from '@app/core'
import { RestExtractor } from '@app/shared/rest'
import { PluginType } from '@shared/models/plugins/plugin.type'
import { PublicServerSetting } from '@shared/models/plugins/public-server.setting'
constructor (
private router: Router,
+ private authService: AuthService,
private server: ServerService,
private zone: NgZone,
private authHttp: HttpClient,
.toPromise()
},
+ isLoggedIn: () => {
+ return this.authService.isLoggedIn()
+ },
+
translate: (value: string) => {
return this.translationsObservable
.pipe(map(allTranslations => allTranslations[npmName]))
export type RegisterClientHelpers = {
getBaseStaticRoute: () => string
+ isLoggedIn: () => boolean
+
getSettings: () => Promise<{ [ name: string ]: string }>
translate: (toTranslate: string) => Promise<string>