2021-04-09 11:19:14 +02:00
|
|
|
export type RegisterClientFormFieldOptions = {
|
|
|
|
name?: string
|
|
|
|
label?: string
|
|
|
|
type: 'input' | 'input-checkbox' | 'input-password' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' | 'select' | 'html'
|
|
|
|
|
|
|
|
// For select type
|
|
|
|
options?: { value: string, label: string }[]
|
|
|
|
|
|
|
|
// For html type
|
|
|
|
html?: string
|
2020-08-20 16:18:16 +02:00
|
|
|
|
2020-08-21 14:45:57 +02:00
|
|
|
descriptionHTML?: string
|
|
|
|
|
2020-08-20 16:18:16 +02:00
|
|
|
// Default setting value
|
|
|
|
default?: string | boolean
|
2021-04-22 14:25:32 +02:00
|
|
|
|
|
|
|
// Not supported by plugin setting registration, use registerSettingsScript instead
|
|
|
|
hidden?: (options: any) => boolean
|
2021-12-22 18:02:36 +01:00
|
|
|
|
|
|
|
// Return undefined | null if there is no error or return a string with the detailed error
|
|
|
|
// Not supported by plugin setting registration
|
2021-12-29 15:33:24 +01:00
|
|
|
error?: (options: any) => Promise<{ error: boolean, text?: string }>
|
2020-08-20 16:18:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface RegisterClientVideoFieldOptions {
|
2021-04-22 12:00:23 +02:00
|
|
|
type: 'update' | 'upload' | 'import-url' | 'import-torrent' | 'go-live'
|
2021-12-22 18:02:36 +01:00
|
|
|
|
|
|
|
// Default to 'plugin-settings'
|
|
|
|
tab?: 'main' | 'plugin-settings'
|
2020-08-20 16:18:16 +02:00
|
|
|
}
|