diff options
Diffstat (limited to 'packages/models/src/plugins/client/register-client-form-field.model.ts')
-rw-r--r-- | packages/models/src/plugins/client/register-client-form-field.model.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/models/src/plugins/client/register-client-form-field.model.ts b/packages/models/src/plugins/client/register-client-form-field.model.ts new file mode 100644 index 000000000..153c4a6ea --- /dev/null +++ b/packages/models/src/plugins/client/register-client-form-field.model.ts | |||
@@ -0,0 +1,30 @@ | |||
1 | export type RegisterClientFormFieldOptions = { | ||
2 | name?: string | ||
3 | label?: string | ||
4 | type: 'input' | 'input-checkbox' | 'input-password' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' | 'select' | 'html' | ||
5 | |||
6 | // For select type | ||
7 | options?: { value: string, label: string }[] | ||
8 | |||
9 | // For html type | ||
10 | html?: string | ||
11 | |||
12 | descriptionHTML?: string | ||
13 | |||
14 | // Default setting value | ||
15 | default?: string | boolean | ||
16 | |||
17 | // Not supported by plugin setting registration, use registerSettingsScript instead | ||
18 | hidden?: (options: any) => boolean | ||
19 | |||
20 | // Return undefined | null if there is no error or return a string with the detailed error | ||
21 | // Not supported by plugin setting registration | ||
22 | error?: (options: any) => Promise<{ error: boolean, text?: string }> | ||
23 | } | ||
24 | |||
25 | export interface RegisterClientVideoFieldOptions { | ||
26 | type: 'update' | 'upload' | 'import-url' | 'import-torrent' | 'go-live' | ||
27 | |||
28 | // Default to 'plugin-settings' | ||
29 | tab?: 'main' | 'plugin-settings' | ||
30 | } | ||