register-client-form-field.model.ts 942 B

123456789101112131415161718192021222324252627282930
  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. // For select type
  6. options?: { value: string, label: string }[]
  7. // For html type
  8. html?: string
  9. descriptionHTML?: string
  10. // Default setting value
  11. default?: string | boolean
  12. // Not supported by plugin setting registration, use registerSettingsScript instead
  13. hidden?: (options: any) => boolean
  14. // Return undefined | null if there is no error or return a string with the detailed error
  15. // Not supported by plugin setting registration
  16. error?: (options: any) => Promise<{ error: boolean, text?: string }>
  17. }
  18. export interface RegisterClientVideoFieldOptions {
  19. type: 'update' | 'upload' | 'import-url' | 'import-torrent' | 'go-live'
  20. // Default to 'plugin-settings'
  21. tab?: 'main' | 'plugin-settings'
  22. }