aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins/server/settings
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-11 12:04:47 +0200
committerChocobozzz <me@florianbigard.com>2021-05-11 13:33:11 +0200
commit428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba (patch)
treeb75329b64f5e201abdfb39961f2db09a08292b77 /shared/models/plugins/server/settings
parent2b02c520e66ea452687cab39401b371711caa9ed (diff)
downloadPeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.tar.gz
PeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.tar.zst
PeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.zip
Reorganize plugin models
Diffstat (limited to 'shared/models/plugins/server/settings')
-rw-r--r--shared/models/plugins/server/settings/index.ts2
-rw-r--r--shared/models/plugins/server/settings/public-server.setting.ts3
-rw-r--r--shared/models/plugins/server/settings/register-server-setting.model.ts12
3 files changed, 17 insertions, 0 deletions
diff --git a/shared/models/plugins/server/settings/index.ts b/shared/models/plugins/server/settings/index.ts
new file mode 100644
index 000000000..b456de019
--- /dev/null
+++ b/shared/models/plugins/server/settings/index.ts
@@ -0,0 +1,2 @@
1export * from './public-server.setting'
2export * from './register-server-setting.model'
diff --git a/shared/models/plugins/server/settings/public-server.setting.ts b/shared/models/plugins/server/settings/public-server.setting.ts
new file mode 100644
index 000000000..9802c4d7d
--- /dev/null
+++ b/shared/models/plugins/server/settings/public-server.setting.ts
@@ -0,0 +1,3 @@
1export interface PublicServerSetting {
2 publicSettings: { [ name: string ]: string }
3}
diff --git a/shared/models/plugins/server/settings/register-server-setting.model.ts b/shared/models/plugins/server/settings/register-server-setting.model.ts
new file mode 100644
index 000000000..d9a798cac
--- /dev/null
+++ b/shared/models/plugins/server/settings/register-server-setting.model.ts
@@ -0,0 +1,12 @@
1import { RegisterClientFormFieldOptions } from '../../client'
2
3export type RegisterServerSettingOptions = RegisterClientFormFieldOptions & {
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
6 // Mainly used by the PeerTube client to get admin config
7 private: boolean
8}
9
10export interface RegisteredServerSettings {
11 registeredSettings: RegisterServerSettingOptions[]
12}