X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Ftypes%2Fregister-client-option.model.ts;h=2460a7499e205211159b2633c220839ff79b34d2;hb=04262b4092b109debd31cfe3466ddd8b09ed300f;hp=7e5356a2b4fe9f35d9c2908b4bd0eb40b1b71f0f;hpb=dc48fdbe68e9dd3a3a6028181e61d8595d98e654;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 7e5356a2b..2460a7499 100644 --- a/client/src/types/register-client-option.model.ts +++ b/client/src/types/register-client-option.model.ts @@ -1,35 +1,50 @@ -import { RegisterClientFormFieldOptions, RegisterClientVideoFieldOptions } from '@shared/models/plugins/register-client-form-field.model' -import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' -import { ServerConfig } from '@shared/models/server' +import { + RegisterClientFormFieldOptions, + RegisterClientHookOptions, + RegisterClientRouteOptions, + RegisterClientSettingsScriptOptions, + RegisterClientVideoFieldOptions, + ServerConfig, SettingEntries +} from '@shared/models' export type RegisterClientOptions = { registerHook: (options: RegisterClientHookOptions) => void registerVideoField: (commonOptions: RegisterClientFormFieldOptions, videoFormOptions: RegisterClientVideoFieldOptions) => void + registerSettingsScript: (options: RegisterClientSettingsScriptOptions) => void + + registerClientRoute: (options: RegisterClientRouteOptions) => void + peertubeHelpers: RegisterClientHelpers } export type RegisterClientHelpers = { getBaseStaticRoute: () => string + getBaseRouterRoute: () => string + + getBasePluginClientPath: () => string + isLoggedIn: () => boolean - getSettings: () => Promise<{ [ name: string ]: string }> + getAuthHeader: () => { 'Authorization': string } | undefined + + getSettings: () => Promise getServerConfig: () => Promise notifier: { - info: (text: string, title?: string, timeout?: number) => void, - error: (text: string, title?: string, timeout?: number) => void, + info: (text: string, title?: string, timeout?: number) => void + error: (text: string, title?: string, timeout?: number) => void success: (text: string, title?: string, timeout?: number) => void } showModal: (input: { - title: string, - content: string, - close?: boolean, - cancel?: { value: string, action?: () => void }, + title: string + content: string + close?: boolean + cancel?: { value: string, action?: () => void } confirm?: { value: string, action?: () => void } }) => void