diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 6 | ||||
-rw-r--r-- | client/src/types/register-client-option.model.ts | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index b9d55a7e4..aa6823060 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts | |||
@@ -273,7 +273,11 @@ export class PluginService implements ClientHook { | |||
273 | return this.authService.isLoggedIn() | 273 | return this.authService.isLoggedIn() |
274 | }, | 274 | }, |
275 | 275 | ||
276 | notifier: this.notifier, | 276 | notifier: { |
277 | info: (text: string, title?: string, timeout?: number) => this.notifier.info(text, title, timeout), | ||
278 | error: (text: string, title?: string, timeout?: number) => this.notifier.error(text, title, timeout), | ||
279 | success: (text: string, title?: string, timeout?: number) => this.notifier.success(text, title, timeout) | ||
280 | }, | ||
277 | 281 | ||
278 | translate: (value: string) => { | 282 | translate: (value: string) => { |
279 | return this.translationsObservable | 283 | return this.translationsObservable |
diff --git a/client/src/types/register-client-option.model.ts b/client/src/types/register-client-option.model.ts index 1faf13c42..b64652a0f 100644 --- a/client/src/types/register-client-option.model.ts +++ b/client/src/types/register-client-option.model.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' | 1 | import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' |
2 | import { Notifier } from '@app/core' | ||
3 | 2 | ||
4 | export type RegisterClientOptions = { | 3 | export type RegisterClientOptions = { |
5 | registerHook: (options: RegisterClientHookOptions) => void | 4 | registerHook: (options: RegisterClientHookOptions) => void |
@@ -14,7 +13,11 @@ export type RegisterClientHelpers = { | |||
14 | 13 | ||
15 | getSettings: () => Promise<{ [ name: string ]: string }> | 14 | getSettings: () => Promise<{ [ name: string ]: string }> |
16 | 15 | ||
17 | notifier: Notifier | 16 | notifier: { |
17 | info: (text: string, title?: string, timeout?: number) => void, | ||
18 | error: (text: string, title?: string, timeout?: number) => void, | ||
19 | success: (text: string, title?: string, timeout?: number) => void | ||
20 | } | ||
18 | 21 | ||
19 | translate: (toTranslate: string) => Promise<string> | 22 | translate: (toTranslate: string) => Promise<string> |
20 | } | 23 | } |