aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/plugins')
-rw-r--r--client/src/app/core/plugins/hooks.service.ts10
-rw-r--r--client/src/app/core/plugins/plugin.service.ts10
2 files changed, 9 insertions, 11 deletions
diff --git a/client/src/app/core/plugins/hooks.service.ts b/client/src/app/core/plugins/hooks.service.ts
index ddde198d2..062083fd1 100644
--- a/client/src/app/core/plugins/hooks.service.ts
+++ b/client/src/app/core/plugins/hooks.service.ts
@@ -27,9 +27,8 @@ export class HooksService {
27 }) 27 })
28 } 28 }
29 29
30 wrapObsFun 30 wrapObsFun <P, R, H1 extends ClientFilterHookName, H2 extends ClientFilterHookName>
31 <P, R, H1 extends ClientFilterHookName, H2 extends ClientFilterHookName> 31 (fun: ObservableFunction<P, R>, params: P, scope: PluginClientScope, hookParamName: H1, hookResultName: H2) {
32 (fun: ObservableFunction<P, R>, params: P, scope: PluginClientScope, hookParamName: H1, hookResultName: H2) {
33 return from(this.pluginService.ensurePluginsAreLoaded(scope)) 32 return from(this.pluginService.ensurePluginsAreLoaded(scope))
34 .pipe( 33 .pipe(
35 mergeMap(() => this.wrapObjectWithoutScopeLoad(params, hookParamName)), 34 mergeMap(() => this.wrapObjectWithoutScopeLoad(params, hookParamName)),
@@ -38,9 +37,8 @@ export class HooksService {
38 ) 37 )
39 } 38 }
40 39
41 async wrapFun 40 async wrapFun <P, R, H1 extends ClientFilterHookName, H2 extends ClientFilterHookName>
42 <P, R, H1 extends ClientFilterHookName, H2 extends ClientFilterHookName> 41 (fun: RawFunction<P, R>, params: P, scope: PluginClientScope, hookParamName: H1, hookResultName: H2) {
43 (fun: RawFunction<P, R>, params: P, scope: PluginClientScope, hookParamName: H1, hookResultName: H2) {
44 await this.pluginService.ensurePluginsAreLoaded(scope) 42 await this.pluginService.ensurePluginsAreLoaded(scope)
45 43
46 const newParams = await this.wrapObjectWithoutScopeLoad(params, hookParamName) 44 const newParams = await this.wrapObjectWithoutScopeLoad(params, hookParamName)
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index 774c03964..89391c2c5 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -188,7 +188,7 @@ export class PluginService implements ClientHook {
188 if (!this.authService.isLoggedIn()) return undefined 188 if (!this.authService.isLoggedIn()) return undefined
189 189
190 const value = this.authService.getRequestHeaderValue() 190 const value = this.authService.getRequestHeaderValue()
191 return { 'Authorization': value } 191 return { Authorization: value }
192 }, 192 },
193 193
194 notifier: { 194 notifier: {
@@ -198,10 +198,10 @@ export class PluginService implements ClientHook {
198 }, 198 },
199 199
200 showModal: (input: { 200 showModal: (input: {
201 title: string, 201 title: string
202 content: string, 202 content: string
203 close?: boolean, 203 close?: boolean
204 cancel?: { value: string, action?: () => void }, 204 cancel?: { value: string, action?: () => void }
205 confirm?: { value: string, action?: () => void } 205 confirm?: { value: string, action?: () => void }
206 }) => { 206 }) => {
207 this.zone.run(() => this.customModal.show(input)) 207 this.zone.run(() => this.customModal.show(input))