]>
Commit | Line | Data |
---|---|---|
1 | import { RegisterClientFormFieldOptions, RegisterClientVideoFieldOptions } from '@shared/models/plugins/register-client-form-field.model' | |
2 | import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' | |
3 | ||
4 | export type RegisterClientOptions = { | |
5 | registerHook: (options: RegisterClientHookOptions) => void | |
6 | ||
7 | registerVideoField: (commonOptions: RegisterClientFormFieldOptions, videoFormOptions: RegisterClientVideoFieldOptions) => void | |
8 | ||
9 | peertubeHelpers: RegisterClientHelpers | |
10 | } | |
11 | ||
12 | export type RegisterClientHelpers = { | |
13 | getBaseStaticRoute: () => string | |
14 | ||
15 | isLoggedIn: () => boolean | |
16 | ||
17 | getSettings: () => Promise<{ [ name: string ]: string }> | |
18 | ||
19 | notifier: { | |
20 | info: (text: string, title?: string, timeout?: number) => void, | |
21 | error: (text: string, title?: string, timeout?: number) => void, | |
22 | success: (text: string, title?: string, timeout?: number) => void | |
23 | } | |
24 | ||
25 | showModal: (input: { | |
26 | title: string, | |
27 | content: string, | |
28 | close?: boolean, | |
29 | cancel?: { value: string, action?: () => void }, | |
30 | confirm?: { value: string, action?: () => void } | |
31 | }) => void | |
32 | ||
33 | markdownRenderer: { | |
34 | textMarkdownToHTML: (textMarkdown: string) => Promise<string> | |
35 | enhancedMarkdownToHTML: (enhancedMarkdown: string) => Promise<string> | |
36 | } | |
37 | ||
38 | translate: (toTranslate: string) => Promise<string> | |
39 | } |