mirror of https://github.com/Chocobozzz/PeerTube
Better plugin notifier typings
parent
74c2dece42
commit
f757be65b8
|
@ -273,7 +273,11 @@ export class PluginService implements ClientHook {
|
||||||
return this.authService.isLoggedIn()
|
return this.authService.isLoggedIn()
|
||||||
},
|
},
|
||||||
|
|
||||||
notifier: this.notifier,
|
notifier: {
|
||||||
|
info: (text: string, title?: string, timeout?: number) => this.notifier.info(text, title, timeout),
|
||||||
|
error: (text: string, title?: string, timeout?: number) => this.notifier.error(text, title, timeout),
|
||||||
|
success: (text: string, title?: string, timeout?: number) => this.notifier.success(text, title, timeout)
|
||||||
|
},
|
||||||
|
|
||||||
translate: (value: string) => {
|
translate: (value: string) => {
|
||||||
return this.translationsObservable
|
return this.translationsObservable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
|
import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
|
||||||
import { Notifier } from '@app/core'
|
|
||||||
|
|
||||||
export type RegisterClientOptions = {
|
export type RegisterClientOptions = {
|
||||||
registerHook: (options: RegisterClientHookOptions) => void
|
registerHook: (options: RegisterClientHookOptions) => void
|
||||||
|
@ -14,7 +13,11 @@ export type RegisterClientHelpers = {
|
||||||
|
|
||||||
getSettings: () => Promise<{ [ name: string ]: string }>
|
getSettings: () => Promise<{ [ name: string ]: string }>
|
||||||
|
|
||||||
notifier: Notifier
|
notifier: {
|
||||||
|
info: (text: string, title?: string, timeout?: number) => void,
|
||||||
|
error: (text: string, title?: string, timeout?: number) => void,
|
||||||
|
success: (text: string, title?: string, timeout?: number) => void
|
||||||
|
}
|
||||||
|
|
||||||
translate: (toTranslate: string) => Promise<string>
|
translate: (toTranslate: string) => Promise<string>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{"ngccVersion":"9.1.0","configFileHash":"87c535c3ce0eac2a54c246892e0e21a1","lockFileHash":"d04bf20520f2518af162e882d32081e4","entryPointPaths":[]}
|
|
Loading…
Reference in New Issue