diff options
Diffstat (limited to 'shared/models/plugins')
-rw-r--r-- | shared/models/plugins/register-client-form-field.model.ts | 14 | ||||
-rw-r--r-- | shared/models/plugins/register-server-setting.model.ts | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/shared/models/plugins/register-client-form-field.model.ts b/shared/models/plugins/register-client-form-field.model.ts index 641d7490c..cdcdaa181 100644 --- a/shared/models/plugins/register-client-form-field.model.ts +++ b/shared/models/plugins/register-client-form-field.model.ts | |||
@@ -1,7 +1,13 @@ | |||
1 | export interface RegisterClientFormFieldOptions { | 1 | export type RegisterClientFormFieldOptions = { |
2 | name: string | 2 | name?: string |
3 | label: string | 3 | label?: string |
4 | type: 'input' | 'input-checkbox' | 'input-password' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' | 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 | ||
5 | 11 | ||
6 | descriptionHTML?: string | 12 | descriptionHTML?: string |
7 | 13 | ||
diff --git a/shared/models/plugins/register-server-setting.model.ts b/shared/models/plugins/register-server-setting.model.ts index 6872dc53e..6bc25b4ae 100644 --- a/shared/models/plugins/register-server-setting.model.ts +++ b/shared/models/plugins/register-server-setting.model.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { RegisterClientFormFieldOptions } from './register-client-form-field.model' | 1 | import { RegisterClientFormFieldOptions } from './register-client-form-field.model' |
2 | 2 | ||
3 | export interface RegisterServerSettingOptions extends RegisterClientFormFieldOptions { | 3 | export type RegisterServerSettingOptions = RegisterClientFormFieldOptions & { |
4 | // If the setting is not private, anyone can view its value (client code included) | 4 | // If the setting is not private, anyone can view its value (client code included) |
5 | // If the setting is private, only server-side hooks can access it | 5 | // If the setting is private, only server-side hooks can access it |
6 | // Mainly used by the PeerTube client to get admin config | 6 | // Mainly used by the PeerTube client to get admin config |