X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Ftypes%2Fregister-client-option.model.ts;h=b64652a0ff8ca4bd99a6ad13c9bc9527bd214997;hb=27d48bc30b09cff26afc3f1b4006092364e71a20;hp=473c2500f0d82e947b47702d0a97d77d444fa808;hpb=23bdacf8ec24ce47a15529830e116911d7478598;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/types/register-client-option.model.ts b/client/src/types/register-client-option.model.ts index 473c2500f..b64652a0f 100644 --- a/client/src/types/register-client-option.model.ts +++ b/client/src/types/register-client-option.model.ts @@ -3,9 +3,21 @@ import { RegisterClientHookOptions } from '@shared/models/plugins/register-clien export type RegisterClientOptions = { registerHook: (options: RegisterClientHookOptions) => void - peertubeHelpers: { - getBaseStaticRoute: () => string + peertubeHelpers: RegisterClientHelpers +} + +export type RegisterClientHelpers = { + getBaseStaticRoute: () => string + + isLoggedIn: () => boolean - getSettings: () => Promise<{ [ name: string ]: string }> + getSettings: () => Promise<{ [ name: string ]: string }> + + 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 }