aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-09 11:19:14 +0200
committerChocobozzz <me@florianbigard.com>2021-04-09 11:19:14 +0200
commit32d13b203b3abf756e751994836c28ddd1f4ebd9 (patch)
tree4fdaf486ecf57d39d0fa6cf45aebe1167d7a9438 /shared
parent55b84d5346f6db35454a1bd102997769021d6470 (diff)
downloadPeerTube-32d13b203b3abf756e751994836c28ddd1f4ebd9.tar.gz
PeerTube-32d13b203b3abf756e751994836c28ddd1f4ebd9.tar.zst
PeerTube-32d13b203b3abf756e751994836c28ddd1f4ebd9.zip
Plugins can register html/select settings
Diffstat (limited to 'shared')
-rw-r--r--shared/models/plugins/register-client-form-field.model.ts14
-rw-r--r--shared/models/plugins/register-server-setting.model.ts2
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 @@
1export interface RegisterClientFormFieldOptions { 1export 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 @@
1import { RegisterClientFormFieldOptions } from './register-client-form-field.model' 1import { RegisterClientFormFieldOptions } from './register-client-form-field.model'
2 2
3export interface RegisterServerSettingOptions extends RegisterClientFormFieldOptions { 3export 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