X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Ftypes%2Fregister-client-option.model.ts;h=2c09f15a7c655acf21523ef753fc1a9fc27f3fff;hb=ae51278920aab47f1a04d66cb6fc06293fbb03c6;hp=8802edc3299461fde42baf867a53f45786f16339;hpb=4eca42ffb4a1f17779d931b84da96ef8d9b3997e;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 8802edc32..2c09f15a7 100644 --- a/client/src/types/register-client-option.model.ts +++ b/client/src/types/register-client-option.model.ts @@ -1,9 +1,10 @@ import { RegisterClientFormFieldOptions, RegisterClientHookOptions, - RegisterClientSettingsScript, + RegisterClientRouteOptions, + RegisterClientSettingsScriptOptions, RegisterClientVideoFieldOptions, - ServerConfig + ServerConfig, SettingEntries } from '@shared/models' export type RegisterClientOptions = { @@ -11,7 +12,9 @@ export type RegisterClientOptions = { registerVideoField: (commonOptions: RegisterClientFormFieldOptions, videoFormOptions: RegisterClientVideoFieldOptions) => void - registerSettingsScript: (options: RegisterClientSettingsScript) => void + registerSettingsScript: (options: RegisterClientSettingsScriptOptions) => void + + registerClientRoute: (options: RegisterClientRouteOptions) => void peertubeHelpers: RegisterClientHelpers } @@ -19,25 +22,32 @@ export type RegisterClientOptions = { export type RegisterClientHelpers = { getBaseStaticRoute: () => string + getBaseRouterRoute: () => string + + // PeerTube >= 5.0 + getBaseWebSocketRoute: () => string + + getBasePluginClientPath: () => string + isLoggedIn: () => boolean getAuthHeader: () => { 'Authorization': string } | undefined - getSettings: () => Promise<{ [ name: string ]: string }> + 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